Method Summary |
|
void | addListener(GenericQueryManagerListener listener) Add the listener to the manager to get notifications when actions
were successful. |
int | count() Count the number of beans persisted. |
int | count(CountQuery query) Count the number of beans persisted with a custom
CountQuery . |
GenericQueryManager<OtherBeanType> | createNewManager(Class<OtherBeanType> beanClass) Create a new generic query manager of the same kind but for another
bean class. |
boolean | delete(int objectId) Delete a single identified bean
This method will delete the bean identifed by the passed in
identifier. |
boolean | delete(DeleteQuery query) Delete beans selected by the passed in
DeleteQuery This method will delete all beans identified by the passed in
DeleteQuery . |
Class | getBaseClass() |
CountQuery | getCountQuery() |
DeleteQuery | getDeleteQuery() |
DeleteQuery | getDeleteQuery(int objectId) |
String | getIdentifierName() Get the name of the property defined as the identifier. |
int | getIdentifierValue(BeanType bean) Get the value of the property defined as the identifier. |
CreateTable | getInstallTableQuery() Get the query that would be used to install the table.
This method will return the query that would be used to install the
database structure. |
RestoreQuery | getRestoreQuery() Get the base query used to restore beans.
This method will return the base query that would be used to restore
beans with
GenericQueryManager.restore() . |
RestoreQuery | getRestoreQuery(int objectId) Get the base query used to restore a single identifed bean.
This method will return the base query that would be used to restore
a single bean with
GenericQueryManager.restore(int) . |
String | getTable() |
int | insert(BeanType bean) Insert a bean in the database.
This method specifically forces insertion of the bean into the
database. |
void | install() Install the database structure into the database.
This method will cause the structure needed to persist the bean to
be installed into the database. |
void | install(CreateTable query) Install the database structure into the database using a custom query.
This method will cause the structure needed to persist the bean to
be installed into the database using the provided custom query. |
void | remove() Remove the database structure
This method will cause the database structure to be removed from the
database deleting all saved beans in the process. |
void | removeListeners() Remove all the listeners that are registered to the manager. |
List<BeanType> | restore() Restore all the beans persisted under this manager. |
BeanType | restore(int objectId) Restore a single bean using the identifier.
This method will return a single bean having the provided
identifier. |
boolean | restore(DbRowProcessor rowProcessor) Restore all beans using the row processor provided. |
List<BeanType> | restore(RestoreQuery query) Restore a list of beans that match the provided
RestoreQuery .
This method will return a list of beans that match the provided
RestoreQuery . |
boolean | restore(RestoreQuery query, DbRowProcessor rowProcessor) Restore a list of beans that match the provided
RestoreQuery and process with the
DbRowProcessor .
This method will return a list of beans that match the provided
RestoreQuery and process these matches with the provided
DbRowProcessor . |
BeanType | restoreFirst(RestoreQuery query) Restore the first bean that matches the
RestoreQuery .
This method will return the first bean that matches the
RestoreQuery . |
int | save(BeanType bean) Persist a bean.
This method allows a person to persist a bean to a DB to be later
restored. |
int | update(BeanType bean) Update an existing bean in the database.
This method specifically forces the updating of the bean into the
database. |