|
Produced by Siminov Software Solution LLP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsiminov.orm.database.Database
public abstract class Database
Exposes methods to deal with database. It has methods to create, delete, and perform other common database management tasks.
Field Summary |
---|
Constructor Summary | |
---|---|
Database()
|
Method Summary | |
---|---|
IAverage |
avg()
Returns the average based on column name provided. |
static void |
beginTransaction(DatabaseDescriptor databaseDescriptor)
Begins a transaction in EXCLUSIVE mode. |
static void |
commitTransaction(DatabaseDescriptor databaseDescriptor)
Marks the current transaction as successful. |
ICount |
count()
Returns the count of rows based on information provided. |
static DatabaseBundle |
createDatabase(DatabaseDescriptor databaseDescriptor)
It is used to create instance of IDatabase implementation. |
void |
createIndex(DatabaseMappingDescriptor.Index index)
Is used to create a new index on a table in database. |
static void |
createIndex(DatabaseMappingDescriptor databaseMappingDescriptor,
DatabaseMappingDescriptor.Index index)
Is used to create a new index on a table in database. |
static void |
createTable(DatabaseMappingDescriptor databaseMappingDescriptor)
Is used to create a new table in an database. |
static void |
createTables(java.util.Iterator<DatabaseMappingDescriptor> databaseMappings)
Is used to create a new table in an database. |
IDelete |
delete()
It deletes a record to any single table in a relational database. |
static void |
dropDatabase(DatabaseDescriptor databaseDescriptor)
It drop's the whole database based on database-descriptor. |
void |
dropIndex(DatabaseMappingDescriptor.Index index)
Is used to drop a index on a table in database. |
static void |
dropIndex(DatabaseMappingDescriptor databaseMapping,
DatabaseMappingDescriptor.Index index)
|
static void |
dropIndex(DatabaseMappingDescriptor databaseMappingDescriptor,
java.lang.String indexName)
Is used to drop a index on a table in database. |
void |
dropIndex(java.lang.String indexName)
|
void |
dropTable()
It drop's the table from database |
static void |
dropTable(DatabaseMappingDescriptor databaseMappingDescriptor)
It drop's the table from database based on database-mapping. |
static void |
endTransaction(DatabaseDescriptor databaseDescriptor)
End the current transaction. |
java.util.Iterator<java.lang.String> |
getColumnNames()
Returns all column names of mapped table. |
java.util.Map<java.lang.String,java.lang.String> |
getColumnTypes()
Returns all columns with there data types for invoked class object. |
java.util.Map<java.lang.String,java.lang.Object> |
getColumnValues()
Returns all column values in the same order of column names for invoked class object. |
DatabaseDescriptor |
getDatabaseDescriptor()
Returns database descriptor object based on the POJO class called. |
static DatabaseDescriptor |
getDatabaseDescriptor(java.lang.String className)
|
DatabaseMappingDescriptor |
getDatabaseMappingDescriptor()
Returns the actual database mapping object mapped for invoked class object. |
java.util.Iterator<java.lang.String> |
getForeignKeys()
Returns all foreign keys of mapped table for invoked class object. |
java.util.Iterator<java.lang.String> |
getMandatoryFields()
Returns all mandatory fields which are associated with mapped table for invoked class object. |
java.util.Iterator<java.lang.String> |
getPrimaryKeys()
Returns all primary keys of mapped table for invoked class object. |
java.lang.String |
getTableName()
Returns the mapped table name for invoked class object. |
java.util.Iterator<java.lang.String> |
getUniqueFields()
Returns all unique fields which are associated with mapped table for invoked class object. |
IGroupConcat |
groupConcat()
Returns the group concat based on column name provided. |
IMax |
max()
Returns the minimum based on column name provided. |
IMin |
min()
Returns the minimum based on column name provided. |
void |
save()
It adds a record to any single table in a relational database. |
void |
saveOrUpdate()
It finds out whether tuple exists in table or not. |
ISelect |
select()
Fetch tuples from table. |
java.lang.Object[] |
select(java.lang.String query)
Returns all tuples based on manual query from mapped table for invoked class object. |
ISum |
sum()
Returns the sum based on column name provided. |
ITotal |
total()
Returns the total based on column name provided. |
void |
update()
It updates a record to any single table in a relational database. |
static void |
upgradeDatabase(DatabaseDescriptor databaseDescriptor)
Upgrade Existing Database. |
static void |
upgradeTable(DatabaseMappingDescriptor databaseMappingDescriptor)
Upgrade Table. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Database()
Method Detail |
---|
public static DatabaseBundle createDatabase(DatabaseDescriptor databaseDescriptor) throws DatabaseException
databaseDescriptor
-
DatabaseException
public static void upgradeDatabase(DatabaseDescriptor databaseDescriptor) throws DatabaseException
databaseDescriptor
-
DatabaseException
- throws If any exception thrown.public static void upgradeTable(DatabaseMappingDescriptor databaseMappingDescriptor) throws DatabaseException
databaseMappingDescriptor
- object related to table.
DatabaseException
- If any exception thrown while upgrating table.public static void createTables(java.util.Iterator<DatabaseMappingDescriptor> databaseMappings) throws DatabaseException
Using SIMINOV there are three ways to create table in database.
SIMINOV will parse each DATABASE-MAPPING-DESCRIPTOR XML defined by developer and create table's in database.
Example:
<database-mapping>
<table table_name="LIQUOR" class_name="com.core.template.model.Liquor">
<column variable_name="liquorType" column_name="LIQUOR_TYPE">
<property name="type">TEXT</property>
<property name="primary_key">true</property>
<property name="not_null">true</property>
<property name="unique">true</property>
</column>
<column variable_name="description" column_name="DESCRIPTION">
<property name="type">TEXT</property>
</column>
<column variable_name="history" column_name="HISTORY">
<property name="type">TEXT</property>
</column>
<column variable_name="link" column_name="LINK">
<property name="type">TEXT</property>
<property name="default">www.wikipedia.org</property>
</column>
<column variable_name="alcholContent" column_name="ALCHOL_CONTENT">
<property name="type">TEXT</property>
</column>
<maps>
<map map="liquorBrands" map_to="com.core.template.model.LiquorBrand">
<property name="load">false</property>
<property name="relationship_type">ONE-TO-MANY</property>
</map>
</maps>
<index name="LIQUOR_INDEX_BASED_ON_LINK" unique="true">
<column>HISTORY</column>
</index>
</table>
</database-mapping>
SIMINOV will read each class Annotations defined by developer and create table's in database. Example:
databaseMappings
- Database-mapping objects which defines the structure of each table.
DatabaseException
- If not able to create table in SQLite.public static void createTable(DatabaseMappingDescriptor databaseMappingDescriptor) throws DatabaseException
Manually creating table structure using DatabaseMapping POJO class.
Example:
//Defines structure for Liquor table.
DatabaseMapping databaseMapping = new DatabaseMapping();
databaseMapping.setTableName("LIQUOR");
databaseMapping.setClassName(Liquor.class.getName());
//Add Liquor Type.
DatabaseMapping.Column liquorType = databaseMapping.new Column();
liquorType.setVariableName("liquorType");
liquorType.setColumnName("LIQUOR_TYPE");
liquorType.setType("TEXT");
liquorType.setPrimaryKey(true);
liquorType.setNotNull(true);
liquorType.setUnique(false);
liquorType.setGetterMethodName("getLiquorType");
liquorType.setSetterMethodName("setLiquorType");
databaseMapping.addColumn(liquorType);
//Add Liquor Description.
DatabaseMapping.Column description = databaseMapping.new Column();
description.setVariableName("description");
description.setColumnName("DESCRIPTION");
description.setType("TEXT");
description.setGetterMethodName("getDescription");
description.setSetterMethodName("setDescription");
databaseMapping.addColumn(description);
//Add History.
DatabaseMapping.Column history = databaseMapping.new Column();
history.setVariableName("history");
history.setColumnName("HISTORY");
history.setType("TEXT");
history.setGetterMethodName("getHistory");
history.setSetterMethodName("setHistory");
databaseMapping.addColumn(history);
//Add Link.
DatabaseMapping.Column link = databaseMapping.new Column();
link.setVariableName("history");
link.setColumnName("HISTORY");
link.setType("TEXT");
link.setDefault("www.wikipedia.org");
link.setGetterMethodName("getLink");
link.setSetterMethodName("setLink");
databaseMapping.addColumn(link);
//Add Alchol Content.
DatabaseMapping.Column alcholContent = databaseMapping.new Column();
alcholContent.setVariableName("alcholContent");
alcholContent.setColumnName("ALCHOL_CONTENT");
alcholContent.setType("TEXT");
alcholContent.setGetterMethodName("getAlcholContent");
alcholContent.setSetterMethodName("setAlcholContent");
databaseMapping.addColumn(alcholContent);
//Create Index On Liquor table.
DatabaseMapping.Index indexOnLiquor = databaseMapping.new Index();
indexOnLiquor.setName("LIQUOR_INDEX_BASED_ON_LINK");
indexOnLiquor.setUnique(true);
//Add Columns on which we need index.
indexOnLiquor.addColumn("LINK");
databaseMapping.addIndex(indexOnLiquor);
try {
Database.createTables(databaseMapping);
} catch(DatabaseException databaseException) {
//Log It.
}
databaseMappingDescriptor
- Database-mapping object which defines the structure of table.
DatabaseException
- If not able to create table in SQLite.public void dropTable() throws DatabaseException
try {
new Liquor().dropTable();
} catch(DatabaseException databaseException) {
//Log It.
}
DatabaseException
- If not able to drop table.public static void dropTable(DatabaseMappingDescriptor databaseMappingDescriptor) throws DatabaseException
Drop the Liquor table.
DatabaseMapping databaseMapping = new Liquor().getDatabaseMapping();
try {
Database.dropTable(databaseMapping);
} catch(DatabaseException databaseException) {
//Log It.
}
databaseMappingDescriptor
- Database-mapping object which defines the structure of table.
DatabaseException
- If not able to drop table.public static void createIndex(DatabaseMappingDescriptor databaseMappingDescriptor, DatabaseMappingDescriptor.Index index) throws DatabaseException
Create Index On Liquor table.
DatabaseMapping.Index indexOnLiquor = databaseMapping.new Index();
indexOnLiquor.setName("LIQUOR_INDEX_BASED_ON_LINK");
indexOnLiquor.setUnique(true);
//Add Columns on which we need index.
indexOnLiquor.addColumn("LINK");
DatabaseMapping databaseMapping = new Liquor().getDatabaseMapping();
try {
Database.createIndex(databaseMapping, indexOnLiquor);
} catch(DatabaseException databaseException) {
//Log It.
}
databaseMappingDescriptor
- Database-mapping object which defines the structure of table.index
- Index object which defines the structure of index needs to create.
DatabaseException
- If not able to create index on table.public void createIndex(DatabaseMappingDescriptor.Index index) throws DatabaseException
Create Index On Liquor table.
DatabaseMapping.Index indexOnLiquor = databaseMapping.new Index();
indexOnLiquor.setName("LIQUOR_INDEX_BASED_ON_LINK");
indexOnLiquor.setUnique(true);
//Add Columns on which we need index.
indexOnLiquor.addColumn("LINK");
try {
new Liquor().createIndex(indexOnLiquor);
} catch(DatabaseException databaseException) {
//Log It.
}
index
- Index object which defines the structure of index needs to create.
DatabaseException
- If not able to create index on table.public void dropIndex(DatabaseMappingDescriptor.Index index) throws DatabaseException
Create Index On Liquor table.
String indexName = "LIQUOR_INDEX_BASED_ON_LINK";
try {
new Liquor().dropIndex(indexName);
} catch(DatabaseException databaseException) {
//Log It.
}
index
- Name of a index needs to be drop.
DatabaseException
- If not able to drop index on table.public void dropIndex(java.lang.String indexName) throws DatabaseException
DatabaseException
public static void dropIndex(DatabaseMappingDescriptor databaseMapping, DatabaseMappingDescriptor.Index index) throws DatabaseException
DatabaseException
public static void dropIndex(DatabaseMappingDescriptor databaseMappingDescriptor, java.lang.String indexName) throws DatabaseException
Create Index On Liquor table.
String indexName = "LIQUOR_INDEX_BASED_ON_LINK";
DatabaseMapping databaseMapping = new Liquor().getDatabaseMapping();
try {
Database.dropIndex(databaseMapping, indexName);
} catch(DatabaseException databaseException) {
//Log It.
}
databaseMappingDescriptor
- Database-mapping object which defines the structure of table.indexName
- Name of a index needs to be drop.
DatabaseException
- If not able to drop index on table.public static void dropDatabase(DatabaseDescriptor databaseDescriptor) throws DatabaseException
Drop the Liquor table.
DatabaseDescriptor databaseDescriptor = new Liquor().getDatabaseDescriptor();
try {
Database.dropDatabase(databaseDescriptor);
} catch(DatabaseException databaseException) {
//Log It.
}
databaseMapping
- Database-mapping object which defines the structure of table.
DatabaseException
- If not able to drop database.public static void beginTransaction(DatabaseDescriptor databaseDescriptor) throws DatabaseException
Transactions can be nested. When the outer transaction is ended all of the work done in that transaction and all of the nested transactions will be committed or rolled back. The changes will be rolled back if any transaction is ended without being marked as clean(by calling commitTransaction). Otherwise they will be committed.
Example: Make Beer Object
Liquor beer = new Liquor();
beer.setLiquorType(Liquor.LIQUOR_TYPE_BEER);
beer.setDescription(applicationContext.getString(R.string.beer_description));
beer.setHistory(applicationContext.getString(R.string.beer_history));
beer.setLink(applicationContext.getString(R.string.beer_link));
beer.setAlcholContent(applicationContext.getString(R.string.beer_alchol_content));
DatabaseDescriptor databaseDescriptor = beer.getDatabaseDescriptor();
try {
Database.beginTransaction(databaseDescriptor);
beer.save();
Database.commitTransaction(databaseDescriptor);
} catch(DatabaseException de) {
//Log it.
} finally {
Database.endTransaction(databaseDescriptor);
}
DatabaseException
- If beginTransaction does not starts.public static void commitTransaction(DatabaseDescriptor databaseDescriptor) throws DatabaseException
Finally it will End a transaction.
Example: Make Beer Object
Liquor beer = new Liquor();
beer.setLiquorType(Liquor.LIQUOR_TYPE_BEER);
beer.setDescription(applicationContext.getString(R.string.beer_description));
beer.setHistory(applicationContext.getString(R.string.beer_history));
beer.setLink(applicationContext.getString(R.string.beer_link));
beer.setAlcholContent(applicationContext.getString(R.string.beer_alchol_content));
DatabaseDescriptor databaseDescriptor = beer.getDatabaseDescriptor();
try {
Database.beginTransaction(databaseDescriptor);
beer.save();
Database.commitTransaction(databaseDescriptor);
} catch(DatabaseException de) {
//Log it.
} finally {
Database.endTransaction(databaseDescriptor);
}
DatabaseException
- If not able to commit the transaction.public static void endTransaction(DatabaseDescriptor databaseDescriptor)
Example:
Liquor beer = new Liquor();
beer.setLiquorType(Liquor.LIQUOR_TYPE_BEER);
beer.setDescription(applicationContext.getString(R.string.beer_description));
beer.setHistory(applicationContext.getString(R.string.beer_history));
beer.setLink(applicationContext.getString(R.string.beer_link));
beer.setAlcholContent(applicationContext.getString(R.string.beer_alchol_content));
DatabaseDescriptor databaseDescriptor = beer.getDatabaseDescriptor();
try {
Database.beginTransaction(databaseDescriptor);
beer.save();
Database.commitTransaction(databaseDescriptor);
} catch(DatabaseException de) {
//Log it.
} finally {
Database.endTransaction(databaseDescriptor);
}
databaseDescriptor
- Database Descriptor Object.public ISelect select() throws DatabaseException
Example:
Liquor[] liquor = new Liquor().select()
.where(Liquor.LIQUOR_TYPE).equalTo("RUM")
.and(Liquor.ALCHOL_CONTENT).equalTo("90%")
.fetch();
DatabaseException
- if any error occur while fetching tuples from table.public java.lang.Object[] select(java.lang.String query) throws DatabaseException
Example:
String query = "SELECT * FROM LIQUOR";
Liquor[] liquors = null;
try {
liquors = new Liquor().select(query);
} catch(DatabaseException de) {
//Log it.
}
query
- Manual query on which tuples need to be fetched.
DatabaseException
- If any error occur while getting tuples from a single table.public void save() throws DatabaseException
Example: Make Liquor Object
Liquor beer = new Liquor();
beer.setLiquorType(Liquor.LIQUOR_TYPE_BEER);
beer.setDescription(applicationContext.getString(R.string.beer_description));
beer.setHistory(applicationContext.getString(R.string.beer_history));
beer.setLink(applicationContext.getString(R.string.beer_link));
beer.setAlcholContent(applicationContext.getString(R.string.beer_alchol_content));
try {
beer.save();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If any error occurs while saving tuples in database.public void update() throws DatabaseException
Example: Make Beer Object
Liquor beer = new Liquor();
beer.setLiquorType(Liquor.LIQUOR_TYPE_BEER);
beer.setDescription(applicationContext.getString(R.string.beer_description));
beer.setHistory(applicationContext.getString(R.string.beer_history));
beer.setLink(applicationContext.getString(R.string.beer_link));
beer.setAlcholContent(applicationContext.getString(R.string.beer_alchol_content));
try {
beer.update();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If any error occurs while saving tuples in database.public void saveOrUpdate() throws DatabaseException
Example: Make Beer Object
Liquor beer = new Liquor();
beer.setLiquorType(Liquor.LIQUOR_TYPE_BEER);
beer.setDescription(applicationContext.getString(R.string.beer_description));
beer.setHistory(applicationContext.getString(R.string.beer_history));
beer.setLink(applicationContext.getString(R.string.beer_link));
beer.setAlcholContent(applicationContext.getString(R.string.beer_alchol_content));
try {
beer.saveOrUpdate();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If any error occurs while saving tuples in database.public IDelete delete() throws DatabaseException
Example:
Liquor beer = new Liquor();
beer.setLiquorType(Liquor.LIQUOR_TYPE_BEER);
beer.setDescription(applicationContext.getString(R.string.beer_description));
beer.setHistory(applicationContext.getString(R.string.beer_history));
beer.setLink(applicationContext.getString(R.string.beer_link));
beer.setAlcholContent(applicationContext.getString(R.string.beer_alchol_content));
try {
beer.delete();
} catch(DatabaseException de) {
//Log it.
}
OR
try {
new Liquor().delete();
} catch(DatabaseException de) {
//Log It.
}
DatabaseException
- If any error occurs while saving tuples in database.public ICount count() throws DatabaseException
Example:
int count = 0;
try {
count = new Liquor().count().
.where(Liquor.LIQUOR_TYPE).equalTo("RUM")
.execute();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If any error occur while find count.public IAverage avg() throws DatabaseException
Example:
int average = 0;
try {
average = new Liquor().avg()
.column(Liquor.COLUMN_NAME_WHICH_CONTAIN_NUMBRIC_VALUE)
.where(Liquor.LIQUOR_TYPE).equalTo("RUM")
.execute();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If any error occur while finding average.public ISum sum() throws DatabaseException
Example:
int sum = 0;
try {
sum = new Liquor().sum()
.column(Liquor.COLUMN_NAME_WHICH_CONTAIN_NUMBRIC_VALUE)
.where(Liquor.LIQUOR_TYPE).equalTo("RUM")
.execute();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If any error occur while finding sum.public ITotal total() throws DatabaseException
Example:
int total = 0;
try {
total = new Liquor().total()
.column(Liquor.COLUMN_NAME_WHICH_CONTAIN_NUMBRIC_VALUE)
.where(Liquor.LIQUOR_TYPE).equalTo("RUM")
.execute();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If any error occur while finding total.public IMin min() throws DatabaseException
Example:
int minimum = 0;
try {
minimum = new Liquor().min()
.column(Liquor.COLUMN_NAME_WHICH_CONTAIN_NUMBRIC_VALUE)
.where(Liquor.LIQUOR_TYPE).equalTo("RUM")
.execute();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If any error occur while finding minimum.public IMax max() throws DatabaseException
Example:
int maximum = 0;
try {
maximum = new Liquor().max()
.column(Liquor.COLUMN_NAME_WHICH_CONTAIN_NUMBRIC_VALUE)
.where(Liquor.LIQUOR_TYPE).equalTo("RUM")
.execute();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If any error occur while finding minimum.public IGroupConcat groupConcat() throws DatabaseException
Example:
int groupConcat = 0;
try {
groupConcat = new Liquor().groupConcat()
.column(Liquor.COLUMN_NAME_WHICH_CONTAIN_NUMBRIC_VALUE)
.where(Liquor.LIQUOR_TYPE).equalTo("RUM")
.execute();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If any error occur while finding group concat.public DatabaseDescriptor getDatabaseDescriptor() throws DatabaseException
Example:
try {
DatabaseDescriptor databaseDescriptor = new Liquor().getDatabaseDescriptor();
} catch(DatabaseException databaseException) {
//Log It.
}
DatabaseException
- If any error occur while getting database descriptor object.public static DatabaseDescriptor getDatabaseDescriptor(java.lang.String className) throws DatabaseException
DatabaseException
public DatabaseMappingDescriptor getDatabaseMappingDescriptor() throws DatabaseException
Example:
DatabaseMapping databaseMapping = null;
try {
databaseMapping = new Liquor().getDatabaseMapping();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If database mapping object not mapped for invoked class object.public java.lang.String getTableName() throws DatabaseException
Example:
String tableName = null;
try {
tableName = new Liquor().getTableName();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If no mapped table found for invoked class object.public java.util.Iterator<java.lang.String> getColumnNames() throws DatabaseException
Example:
Iterator<String> columnNames = null;
try {
columnNames = new Liquor().getColumnNames();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If no mapped table found for invoked class object.public java.util.Map<java.lang.String,java.lang.Object> getColumnValues() throws DatabaseException
Example:
Map<String, Object> values = null;
try {
values = new Liquor().getColumnValues();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If no mapped table found for invoked class object.public java.util.Map<java.lang.String,java.lang.String> getColumnTypes() throws DatabaseException
Example:
Map<String, String> columnTypes = null;
try {
columnTypes = new Liquor().getColumnTypes();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If no mapped table found for invoked class object.public java.util.Iterator<java.lang.String> getPrimaryKeys() throws DatabaseException
Example:
Iterator<String> primaryKeys = null;
try {
primaryKeys = new Liquor().getPrimeryKeys();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If not mapped table found for invoked class object.public java.util.Iterator<java.lang.String> getMandatoryFields() throws DatabaseException
Example:
Iterator<String> mandatoryFields = null;
try {
mandatoryFields = new Liquor().getMandatoryFields();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If no mapped table found for invoked class object.public java.util.Iterator<java.lang.String> getUniqueFields() throws DatabaseException
Example:
Iterator<String> uniqueFields = null;
try {
uniqueFields = new Liquor().getUniqueFields();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If no mapped table found for invoked class object.public java.util.Iterator<java.lang.String> getForeignKeys() throws DatabaseException
Example:
Iterator<String> foreignKeys = null;
try {
foreignKeys = new Liquor().getForeignKeys();
} catch(DatabaseException de) {
//Log it.
}
DatabaseException
- If no mapped table found for invoked class object.
|
Apache License 2.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |