| 程序包 | 说明 |
|---|---|
| gu.sql2java |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
TableListener.afterDelete(B bean)
Invoked just after deleting a B record in the database.
|
void |
TableListener.Adapter.afterDelete(B bean) |
void |
ListenerContainer.afterDelete(B bean) |
void |
TableListener.afterInsert(B bean)
Invoked just after a B record is inserted in the database.
|
void |
TableListener.Adapter.afterInsert(B bean) |
void |
ListenerContainer.afterInsert(B bean) |
void |
TableListener.afterUpdate(B bean)
Invoked just after updating a B record in the database.
|
void |
TableListener.Adapter.afterUpdate(B bean) |
void |
ListenerContainer.afterUpdate(B bean) |
void |
TableListener.beforeDelete(B bean)
Invoked just before deleting a B record in the database.
|
void |
TableListener.Adapter.beforeDelete(B bean) |
void |
TableCache.beforeDelete(B bean) |
void |
ListenerContainer.beforeDelete(B bean) |
void |
TableListener.beforeInsert(B bean)
Invoked just before inserting a B record into the database.
|
void |
TableListener.Adapter.beforeInsert(B bean) |
void |
TableCache.beforeInsert(B bean) |
void |
ListenerContainer.beforeInsert(B bean) |
void |
TableListener.beforeUpdate(B bean)
Invoked just before updating a B record in the database.
|
void |
TableListener.Adapter.beforeUpdate(B bean) |
void |
TableCache.beforeUpdate(B bean) |
void |
ListenerContainer.beforeUpdate(B bean) |
B |
TableManager.checkDuplicate(B bean)
Check duplicated row by primary keys,if row exists throw exception
|
B |
BaseTableManager.checkDuplicate(B bean) |
int |
TableManager.countAll()
Retrieves the number of rows of the table.
|
int |
BaseTableManager.countAll() |
int |
TableManager.countUsingTemplate(B bean)
count the number of elements of a specific bean
|
int |
BaseTableManager.countUsingTemplate(B bean) |
int |
TableManager.countUsingTemplate(B bean,
int searchType)
count the number of elements of a specific bean given the search type
|
int |
TableManager.countWhere(java.lang.String where)
Retrieves the number of rows of the table with a 'where' clause.
|
int |
TableManager.delete(B... beans)
Delete beans.
|
int |
BaseTableManager.delete(B... beans) |
int |
TableManager.delete(B bean)
Delete row according to primary keys of bean.
|
int |
TableManager.delete(java.util.Collection<B> beans)
Delete beans.
|
int |
BaseTableManager.delete(java.util.Collection<B> beans) |
int |
TableManager.deleteAll()
Deletes all rows from table.
|
int |
BaseTableManager.deleteAll() |
int |
TableManager.deleteByIndex(java.lang.String indexName,
java.lang.Object... indexValues)
Deletes rows using key.
|
int |
BaseTableManager.deleteByIndex(java.lang.String indexName,
java.lang.Object... indexValues) |
int |
TableManager.deleteByPrimaryKey(java.lang.Object... keys)
Delete row according to its primary keys.
|
int |
BaseTableManager.deleteByPrimaryKey(java.lang.Object... keys) |
int |
TableManager.deleteByWhere(java.lang.String where)
Deletes rows from the table using a 'where' clause.
|
int |
TableManager.deleteImportedBeans(B bean,
java.lang.String fkName)
delete all imported beans by fkName
|
protected int |
BaseTableManager.deleteImportedBeans(java.util.Map<java.lang.Integer,java.lang.Object> idValueMap,
java.lang.String fkName) |
protected int |
BaseTableManager.deleteImportedBeans(java.lang.String fkName,
java.lang.Object... keys) |
int |
TableManager.deleteUsingTemplate(B bean)
Deletes rows using a template.
|
protected boolean |
BaseTableManager.doExistsPrimaryKey(java.lang.Object... keys) |
protected B |
BaseTableManager.doLoadByPrimaryKeyChecked(java.lang.Object... keys) |
protected B |
BaseTableManager.doLoadUniqueByIndex(java.lang.String indexName,
java.lang.Object... indexValues) |
void |
TableListener.done()
Invoked in finally block, just after insert,update,delete.
|
void |
TableListener.Adapter.done() |
void |
TableCache.done() |
void |
ListenerContainer.done() |
boolean |
TableManager.existsByPrimaryKey(B bean)
Returns true if this table contains row specified by primary key fields of B.
|
boolean |
BaseTableManager.existsByPrimaryKey(B bean) |
boolean |
TableManager.existsPrimaryKey(java.lang.Object... keys)
Returns true if this table contains row with primary key fields.
|
boolean |
BaseTableManager.existsPrimaryKey(java.lang.Object... keys) |
<T extends BaseBean> |
TableManager.getImportedBeans(B bean,
java.lang.String fkName)
Retrieves imported T objects by fkIndex.
|
<T extends BaseBean> |
BaseTableManager.getImportedBeans(B bean,
java.lang.String fkName) |
protected <T extends BaseBean> |
BaseTableManager.getImportedBeans(java.lang.String fkName,
java.lang.Object... keys) |
<T extends BaseBean> |
TableManager.getImportedBeansAsList(B bean,
java.lang.String fkname)
Retrieves imported T objects by ikIndex.
|
<T extends BaseBean> |
BaseTableManager.getImportedBeansAsList(B bean,
java.lang.String fkName) |
protected <T extends BaseBean> |
BaseTableManager.getImportedBeansAsList(java.lang.String fkName,
java.lang.Object... keys) |
<T extends BaseBean> |
TableManager.getReferencedBean(B bean,
java.lang.String fkName)
Retrieves the T object referenced by fkName.
|
<T extends BaseBean> |
BaseTableManager.getReferencedBean(B bean,
java.lang.String fkName) |
B[] |
TableManager.loadAll()
Loads all the rows from table.
|
B[] |
BaseTableManager.loadAll() |
B[] |
TableManager.loadAll(int startRow,
int numRows)
Loads the given number of rows from table, given the start row.
|
B[] |
BaseTableManager.loadAll(int startRow,
int numRows) |
int |
TableManager.loadAll(int startRow,
int numRows,
TableManager.Action<B> action)
Loads the given number of rows from table, given the start row and dealt with action.
|
int |
BaseTableManager.loadAll(int startRow,
int numRows,
TableManager.Action<B> action) |
int |
TableManager.loadAll(TableManager.Action<B> action)
Loads each row from table and dealt with action.
|
int |
BaseTableManager.loadAll(TableManager.Action<B> action) |
java.util.List<B> |
TableManager.loadAllAsList()
Loads all the rows from table.
|
java.util.List<B> |
BaseTableManager.loadAllAsList() |
java.util.List<B> |
TableManager.loadAllAsList(int startRow,
int numRows)
Loads the given number of rows from table, given the start row.
|
java.util.List<B> |
BaseTableManager.loadAllAsList(int startRow,
int numRows) |
B[] |
TableManager.loadByIndex(java.lang.String indexName,
java.lang.Object... indexValues)
Retrieves a array of B bean using the index specified by keyIndex.
|
B[] |
BaseTableManager.loadByIndex(java.lang.String indexName,
java.lang.Object... keys) |
java.util.List<B> |
TableManager.loadByIndexAsList(java.lang.String indexName,
java.lang.Object... indexValues)
Retrieves a list of B bean using the index specified by indexName.
|
java.util.List<B> |
BaseTableManager.loadByIndexAsList(java.lang.String indexName,
java.lang.Object... indexValues) |
B |
TableManager.loadByPrimaryKey(B bean)
Loads a B bean from the table using primary key fields of
bean. |
B |
BaseTableManager.loadByPrimaryKey(B bean) |
B |
TableManager.loadByPrimaryKey(java.lang.Object... keys)
Loads a B bean from the table using primary key fields.
|
B |
BaseTableManager.loadByPrimaryKey(java.lang.Object... keys) |
B |
TableManager.loadByPrimaryKeyChecked(B bean)
|
B |
BaseTableManager.loadByPrimaryKeyChecked(B bean) |
B |
TableManager.loadByPrimaryKeyChecked(java.lang.Object... keys)
|
B |
BaseTableManager.loadByPrimaryKeyChecked(java.lang.Object... keys) |
B[] |
TableManager.loadByWhere(java.lang.String where)
Retrieves an array of B given a sql 'where' clause.
|
B[] |
BaseTableManager.loadByWhere(java.lang.String where) |
B[] |
TableManager.loadByWhere(java.lang.String where,
int[] fieldList)
Retrieves an array of B bean given a sql where clause, and a list of fields.
|
B[] |
BaseTableManager.loadByWhere(java.lang.String where,
int[] fieldList) |
B[] |
TableManager.loadByWhere(java.lang.String where,
int[] fieldList,
int startRow,
int numRows)
Retrieves an array of B bean given a sql where clause and a list of fields, and startRow and numRows.
|
B[] |
BaseTableManager.loadByWhere(java.lang.String where,
int[] fieldList,
int startRow,
int numRows) |
int |
TableManager.loadByWhere(java.lang.String where,
int[] fieldList,
int startRow,
int numRows,
TableManager.Action<B> action)
Retrieves each row of B bean given a sql where clause and a list of fields, and startRow and numRows,
and dealt with action.
|
int |
BaseTableManager.loadByWhere(java.lang.String where,
int[] fieldList,
int startRow,
int numRows,
TableManager.Action<B> action) |
int |
TableManager.loadByWhere(java.lang.String where,
int[] fieldList,
TableManager.Action<B> action)
Retrieves each row of B bean given a sql where clause, and a list of fields,
and dealt with action.
|
int |
BaseTableManager.loadByWhere(java.lang.String where,
int[] fieldList,
TableManager.Action<B> action) |
int |
TableManager.loadByWhere(java.lang.String where,
TableManager.Action<B> action)
Retrieves each row of B bean given a sql 'where' clause and dealt with action.
|
int |
BaseTableManager.loadByWhere(java.lang.String where,
TableManager.Action<B> action) |
java.util.List<B> |
TableManager.loadByWhereAsList(java.lang.String where)
Retrieves a list of B bean given a sql 'where' clause.
|
java.util.List<B> |
BaseTableManager.loadByWhereAsList(java.lang.String where) |
java.util.List<B> |
TableManager.loadByWhereAsList(java.lang.String where,
int[] fieldList)
Retrieves a list of B bean given a sql where clause, and a list of fields.
|
java.util.List<B> |
BaseTableManager.loadByWhereAsList(java.lang.String where,
int[] fieldList) |
java.util.List<B> |
TableManager.loadByWhereAsList(java.lang.String where,
int[] fieldList,
int startRow,
int numRows)
Retrieves a list of B bean given a sql where clause and a list of fields, and startRow and numRows.
|
java.util.List<B> |
BaseTableManager.loadByWhereAsList(java.lang.String where,
int[] fieldList,
int startRow,
int numRows) |
int |
TableManager.loadByWhereForAction(java.lang.String where,
int[] fieldList,
int startRow,
int numRows,
TableManager.Action<B> action)
Retrieves each row of B bean given a sql where clause and a list of fields, and startRow and numRows,
and dealt wity action
It is up to you to pass the 'WHERE' in your where clauses.
|
int |
BaseTableManager.loadByWhereForAction(java.lang.String where,
int[] fieldList,
int startRow,
int numRows,
TableManager.Action<B> action) |
<T> java.util.List<T> |
TableManager.loadColumnAsList(java.lang.String column,
boolean distinct,
java.lang.String where,
int startRow,
int numRows)
Load column from table.
|
<T> java.util.List<T> |
BaseTableManager.loadColumnAsList(java.lang.String column,
boolean distinct,
java.lang.String where,
int startRow,
int numRows) |
B |
TableManager.loadUniqueByIndex(java.lang.String indexName,
java.lang.Object... indexValues) |
B |
BaseTableManager.loadUniqueByIndex(java.lang.String indexName,
java.lang.Object... indexValues) |
B |
TableManager.loadUniqueUsingTemplate(B bean)
Loads a unique B bean from a template one giving a c
|
B |
TableManager.loadUniqueUsingTemplateChecked(B bean)
Loads a unique B bean from a template one giving a c
|
B[] |
TableManager.loadUsingTemplate(B bean)
Loads an array of B from a template one.
|
B[] |
BaseTableManager.loadUsingTemplate(B bean) |
int |
TableManager.loadUsingTemplate(B bean,
int[] fieldList,
int startRow,
int numRows,
int searchType,
TableManager.Action<B> action)
Loads each row from a template one, given the start row and number of rows and dealt with action.
|
B[] |
TableManager.loadUsingTemplate(B bean,
int startRow,
int numRows)
Loads an array of B bean from a template one, given the start row and number of rows.
|
B[] |
BaseTableManager.loadUsingTemplate(B bean,
int startRow,
int numRows) |
B[] |
TableManager.loadUsingTemplate(B bean,
int startRow,
int numRows,
int searchType)
Loads a list of B bean from a template one, given the start row and number of rows.
|
B[] |
BaseTableManager.loadUsingTemplate(B bean,
int startRow,
int numRows,
int searchType) |
int |
TableManager.loadUsingTemplate(B bean,
int startRow,
int numRows,
TableManager.Action<B> action)
Loads each row from a template one, given the start row and number of rows and dealt with action.
|
int |
BaseTableManager.loadUsingTemplate(B bean,
int startRow,
int numRows,
TableManager.Action<B> action) |
int |
TableManager.loadUsingTemplate(B bean,
TableManager.Action<B> action)
Loads each row from a template one and dealt with action.
|
int |
BaseTableManager.loadUsingTemplate(B bean,
TableManager.Action<B> action) |
java.util.List<B> |
TableManager.loadUsingTemplateAsList(B bean)
Loads a list of B bean from a template one.
|
java.util.List<B> |
BaseTableManager.loadUsingTemplateAsList(B bean) |
java.util.List<B> |
TableManager.loadUsingTemplateAsList(B bean,
int startRow,
int numRows)
Loads a list of B bean from a template one, given the start row and number of rows.
|
java.util.List<B> |
BaseTableManager.loadUsingTemplateAsList(B bean,
int startRow,
int numRows) |
java.util.List<B> |
TableManager.loadUsingTemplateAsList(B bean,
int startRow,
int numRows,
int searchType)
Loads an array of B bean from a template one, given the start row and number of rows.
|
java.util.List<B> |
BaseTableManager.loadUsingTemplateAsList(B bean,
int startRow,
int numRows,
int searchType) |
<T> T |
SqlRunner.runAsTransaction(java.util.concurrent.Callable<T> fun)
Run
Callable<T> as a transaction. |
<T> T |
Manager.runAsTransaction(java.util.concurrent.Callable<T> fun) |
void |
SqlRunner.runAsTransaction(java.lang.Runnable fun)
Run
Runnable as a transaction.no return |
void |
Manager.runAsTransaction(java.lang.Runnable fun)
Run
Runnable as a transaction.no return |
<T> java.util.List<T> |
SqlRunner.runSqlAsList(java.lang.Class<T> targetType,
java.lang.String sql,
java.lang.Object... argList)
Load all the elements using a SQL statement specifying a fields to be retrieved.
|
<T> java.util.List<T> |
Manager.runSqlAsList(java.lang.Class<T> targetType,
java.lang.String sql,
java.lang.Object... argList) |
<T> java.util.List<T> |
BaseTableManager.runSqlAsList(java.lang.Class<T> targetType,
java.lang.String sql,
java.lang.Object... argList) |
java.util.List<BaseBean> |
SqlRunner.runSqlAsList(java.lang.String sql,
java.lang.Object... argList)
Load all the elements using a SQL statement specifying a list of fields to be retrieved.
|
java.util.List<BaseBean> |
Manager.runSqlAsList(java.lang.String sql,
java.lang.Object... argList) |
java.util.List<BaseBean> |
BaseTableManager.runSqlAsList(java.lang.String sql,
java.lang.Object... argList) |
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
SqlRunner.runSqlForMap(java.util.Map<java.lang.String,java.lang.Class<?>> targetTypes,
java.lang.String sql,
java.lang.Object... argList)
Load all the elements using a SQL statement specifying a list of fields to be retrieved.
|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
Manager.runSqlForMap(java.util.Map<java.lang.String,java.lang.Class<?>> targetType,
java.lang.String sql,
java.lang.Object... argList) |
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
BaseTableManager.runSqlForMap(java.util.Map<java.lang.String,java.lang.Class<?>> targetTypes,
java.lang.String sql,
java.lang.Object... argList) |
<T> T |
SqlRunner.runSqlForValue(java.lang.Class<T> targetType,
java.lang.String sql,
java.lang.Object... argList)
Load all the elements using a SQL statement specifying a row of a field to be retrieved.
|
<T> T |
Manager.runSqlForValue(java.lang.Class<T> targetType,
java.lang.String sql,
java.lang.Object... argList) |
<T> T |
BaseTableManager.runSqlForValue(java.lang.Class<T> targetType,
java.lang.String sql,
java.lang.Object... argList) |
B |
TableManager.save(B bean)
Saves the B bean into the database.
|
B |
BaseTableManager.save(B bean) |
B[] |
TableManager.save(B[] beans)
Saves an array of B bean into the database.
|
B[] |
BaseTableManager.save(B[] beans) |
B |
TableManager.save(B bean,
java.util.Map<java.lang.String,BaseBean> referenceBeans,
java.util.Map<java.lang.String,java.util.Collection<BaseBean>> importedBeans)
Save the B bean and referenced beans and imported beans into the database.
|
B |
BaseTableManager.save(B bean,
java.util.Map<java.lang.String,BaseBean> referenceBeans,
java.util.Map<java.lang.String,java.util.Collection<BaseBean>> importedBeans) |
<C extends java.util.Collection<B>> |
TableManager.save(C beans)
Saves a collection of B bean into the database as transaction.
|
<C extends java.util.Collection<B>> |
BaseTableManager.save(C beans) |
B[] |
TableManager.saveAsTransaction(B[] beans)
Saves an array of B bean into the database as transaction.
|
B[] |
BaseTableManager.saveAsTransaction(B[] beans) |
B |
TableManager.saveAsTransaction(B bean,
java.util.Map<java.lang.String,BaseBean> referenceBeans,
java.util.Map<java.lang.String,java.util.Collection<BaseBean>> importedBeans)
Transaction version for sync save
|
B |
BaseTableManager.saveAsTransaction(B bean,
java.util.Map<java.lang.String,BaseBean> referenceBeans,
java.util.Map<java.lang.String,java.util.Collection<BaseBean>> importedBeans) |
<C extends java.util.Collection<B>> |
TableManager.saveAsTransaction(C beans)
Saves a collection of B bean into the database.
|
<C extends java.util.Collection<B>> |
BaseTableManager.saveAsTransaction(C beans) |
<T extends BaseBean,C extends java.util.Collection<T>> |
TableManager.setImportedBeans(B bean,
C importedBeans,
java.lang.String fkName)
Set the importedBeans associates to the bean by fkIndex
|
<T extends BaseBean,C extends java.util.Collection<T>> |
BaseTableManager.setImportedBeans(B bean,
C importedBeans,
java.lang.String fkName) |
<T extends BaseBean> |
TableManager.setImportedBeans(B bean,
T[] importedBeans,
java.lang.String fkName)
Set the importedBeans associates to the bean by
ikIndex |
<T extends BaseBean> |
BaseTableManager.setImportedBeans(B bean,
T[] importedBeans,
java.lang.String fkName) |
<T extends BaseBean> |
TableManager.setReferencedBean(B bean,
T beanToSet,
java.lang.String fkName)
Associates the B object to the T object by fkName field.
|
<T extends BaseBean> |
BaseTableManager.setReferencedBean(B bean,
T beanToSet,
java.lang.String fkName) |
protected B |
BaseTableManager.update(B bean)
Update the B bean record in the database according to the changes.
|
Copyright © 2019. All Rights Reserved.