|
Produced by Siminov Software Solution LLP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDatabase
Exposes methods to deal with actual database object. It has methods to open, create, close, and execute query's.
Method Summary | |
---|---|
void |
close(DatabaseDescriptor databaseDescriptor)
Close the existing opened database through Database Descriptor. |
void |
executeBindQuery(DatabaseDescriptor databaseDescriptor,
DatabaseMappingDescriptor databaseMappingDescriptor,
java.lang.String query,
java.util.Iterator<java.lang.Object> columnValues)
A pre-compiled statement that can be reused. |
java.util.Iterator<java.util.Map<java.lang.String,java.lang.Object>> |
executeFetchQuery(DatabaseDescriptor databaseDescriptor,
DatabaseMappingDescriptor databaseMappingDescriptor,
java.lang.String query)
Query the given table, returning a Cursor over the result set. |
void |
executeMethod(java.lang.String methodName,
java.lang.Object parameters)
Executes the method on database object. |
void |
executeQuery(DatabaseDescriptor databaseDescriptor,
DatabaseMappingDescriptor databaseMappingDescriptor,
java.lang.String query)
Execute a single SQL statement that is NOT a SELECT or any other SQL statement that returns data. |
void |
openOrCreate(DatabaseDescriptor databaseDescriptor)
Open/Create the database through Database Descriptor. |
Method Detail |
---|
void openOrCreate(DatabaseDescriptor databaseDescriptor) throws DatabaseException
By default add CREATE_IF_NECESSARY flag so that if database does not exist it will create.
databaseMappings
- Database-Descriptor object which defines the schema of database.
DatabaseException
- If the database cannot be opened or create.void close(DatabaseDescriptor databaseDescriptor) throws DatabaseException
databaseMappings
- Database-Descriptor object which defines the schema of database.
DatabaseException
- If the database cannot be closed.void executeQuery(DatabaseDescriptor databaseDescriptor, DatabaseMappingDescriptor databaseMappingDescriptor, java.lang.String query) throws DatabaseException
It has no means to return any data (such as the number of affected rows). Instead, you're encouraged to use insert, update, delete, when possible.
databaseMappings
- Database-Descriptor object which defines the schema of database.databaseMappingDescriptor
- Database-Mapping-Descriptor object which defines the structure of table.query
- Query which needs to be executed.
DatabaseException
- If any error occur while executing query provided.void executeBindQuery(DatabaseDescriptor databaseDescriptor, DatabaseMappingDescriptor databaseMappingDescriptor, java.lang.String query, java.util.Iterator<java.lang.Object> columnValues) throws DatabaseException
databaseMappings
- Database-Descriptor object which defines the schema of database.databaseMappingDescriptor
- Database-Mapping-Descriptor object which defines the structure of table.query
- A pre-compiled statement.columnValues
- Column values
DatabaseException
- If any error occur while inserting or updating tuple.java.util.Iterator<java.util.Map<java.lang.String,java.lang.Object>> executeFetchQuery(DatabaseDescriptor databaseDescriptor, DatabaseMappingDescriptor databaseMappingDescriptor, java.lang.String query) throws DatabaseException
databaseMappings
- Database-Descriptor object which defines the schema of database.databaseMappingDescriptor
- Database-Mapping-Descriptor object which defines the structure of table.query
- Query based on which tuples will be fetched from database.
DatabaseException
- If any error occur while getting tuples from a single table.void executeMethod(java.lang.String methodName, java.lang.Object parameters) throws DatabaseException
methodName
- Name Of Database Method.parameters
- Parameters Needed By Database Method.
DatabaseException
- If any exeception occur which invoking method in database object.
|
Apache License 2.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |