| 限定符和类型 | 接口和说明 |
|---|---|
static interface |
TableManager.Action<B> |
static interface |
TableManager.DoEach<B>
interface for iterate
|
| 限定符和类型 | 方法和说明 |
|---|---|
B |
addIfAbsent(B bean)
If the specified key is not already exist, add it to database.
|
B |
checkDuplicate(B bean)
Check duplicated row by primary keys,if row exists throw exception
|
int |
countAll()
Retrieves the number of rows of the table.
|
int |
countUsingTemplate(B bean)
count the number of elements of a specific bean
|
int |
countUsingTemplate(B bean,
int searchType)
count the number of elements of a specific bean given the search type
|
int |
countWhere(java.lang.String where)
Retrieves the number of rows of the table with a 'where' clause.
|
B |
createBean()
Creates a new B instance.
|
int |
delete(B... beans)
Delete beans.
|
int |
delete(B bean)
Delete row according to primary keys of bean.
|
int |
delete(java.util.Collection<B> beans)
Delete beans.
|
int |
deleteAll()
Deletes all rows from table.
|
int |
deleteByPrimaryKey(java.lang.Object... keys)
Delete row according to its primary keys.
|
int |
deleteByWhere(java.lang.String where)
Deletes rows from the table using a 'where' clause.
|
int |
deleteUsingTemplate(B bean)
Deletes rows using a template.
|
boolean |
existsByPrimaryKey(B bean)
Returns true if this table contains row specified by primary key fields of B.
|
boolean |
existsPrimaryKey(java.lang.Object... keys)
Returns true if this table contains row with primary key fields.
|
<C extends java.lang.Iterable<B>> |
fastInsert(int[] fieldList,
C beans)
Insert the B bean list into the database.
|
void |
foreach(TableManager.DoEach<B> each,
boolean stopOnError)
Retrieves each row of B bean given a SQL where clause and a list of fields,
and dealt with each action.
|
void |
foreachByJoinWhere(TableManager.DoEach<B> each,
boolean stopOnError,
java.lang.String join,
java.lang.String where)
Retrieves each row of B bean given a SQL where clause and a list of fields,
and dealt with each action.
|
void |
foreachByWhere(TableManager.DoEach<B> each,
boolean stopOnError,
java.lang.String where)
Retrieves each row of B bean given a SQL where clause and a list of fields,
and dealt with each action.
|
IDataSourceConfig |
getDataSourceConfig() |
GeometryDataCodec |
getGeometryDataCodec() |
ListenerContainer<B> |
getListenerContainer() |
B[] |
loadAll()
Loads all the rows from table.
|
B[] |
loadAll(int startRow,
int numRows)
Loads the given number of rows from table, given the start row.
|
int |
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 |
loadAll(TableManager.Action<B> action)
Loads each row from table and dealt with action.
|
java.util.List<B> |
loadAllAsList()
Loads all the rows from table.
|
java.util.List<B> |
loadAllAsList(int startRow,
int numRows)
Loads the given number of rows from table, given the start row.
|
java.util.List<B> |
loadByJoinWhereAsList(java.lang.String join,
java.lang.String where)
Retrieves a list of B bean given a sql 'where' clause.
|
java.util.List<B> |
loadByJoinWhereAsList(java.lang.String join,
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> |
loadByJoinWhereAsList(java.lang.String join,
java.lang.String where,
java.lang.Object[] argList,
int[] fieldList)
Retrieves a list of B bean given a sql where clause, and a list of fields.
|
<T> java.util.List<T> |
loadByJoinWhereAsList(java.lang.String join,
java.lang.String where,
java.lang.Object[] argList,
int[] fieldList,
int startRow,
int numRows,
com.google.common.base.Function<B,T> transformer)
Retrieves a list of T bean given a sql where clause and a list of fields, and startRow and numRows.
|
int |
loadByJoinWhereForAction(java.lang.String join,
java.lang.String where,
java.lang.Object[] argList,
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.
|
B |
loadByPrimaryKey(B bean)
Loads a B bean from the table using primary key fields of
bean. |
B |
loadByPrimaryKey(java.lang.Object... keys)
Loads a B bean from the table using primary key fields.
|
B |
loadByPrimaryKeyChecked(B bean)
see also
loadByPrimaryKey(BaseBean) |
B |
loadByPrimaryKeyChecked(java.lang.Object... keys)
see also
loadByPrimaryKey(Object...) |
B[] |
loadByWhere(java.lang.String where)
Retrieves an array of B given a sql 'where' clause.
|
B[] |
loadByWhere(java.lang.String where,
int[] fieldList)
Retrieves an array of B bean given a sql where clause, and a list of fields.
|
B[] |
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.
|
int |
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 |
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 |
loadByWhere(java.lang.String where,
TableManager.Action<B> action)
Retrieves each row of B bean given a sql 'where' clause and dealt with action.
|
java.util.List<B> |
loadByWhereAsList(java.lang.String where)
Retrieves a list of B bean given a sql 'where' clause.
|
java.util.List<B> |
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> |
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.
|
int |
loadByWhereForAction(java.lang.String where,
java.lang.Object[] argList,
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.
|
<T> java.util.List<T> |
loadColumnAsList(java.lang.String column,
boolean distinct,
java.lang.String where,
int startRow,
int numRows)
Load column from table.
|
B |
loadUniqueUsingTemplate(B bean)
Loads a unique B bean from a template one giving a c
|
B |
loadUniqueUsingTemplateChecked(B bean)
Loads a unique B bean from a template one giving a c
|
B[] |
loadUsingTemplate(B bean)
Loads an array of B from a template one.
|
int |
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[] |
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[] |
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.
|
int |
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 |
loadUsingTemplate(B bean,
TableManager.Action<B> action)
Loads each row from a template one and dealt with action.
|
java.util.List<B> |
loadUsingTemplateAsList(B bean)
Loads a list of B bean from a template one.
|
java.util.List<B> |
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> |
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.
|
void |
registerListener(TableListener<B> listener)
Registers a unique
TableListener listener. |
int |
rowCountWhere(java.lang.String where,
java.lang.Object... argList)
Retrieves the number of rows of the table with a 'where' clause.
|
B |
save(B bean)
Saves the B bean into the database.
|
B[] |
save(B[] beans)
Saves an array of B bean into the database.
|
<C extends java.util.Collection<B>> |
save(C beans)
Saves a collection of B bean into the database as transaction.
|
B[] |
saveAsTransaction(B[] beans)
Saves an array of B bean into the database as transaction.
|
<C extends java.util.Collection<B>> |
saveAsTransaction(C beans)
Saves a collection of B bean into the database.
|
boolean |
setValueIfNonEqual(B bean,
java.lang.String column,
java.lang.Object value)
set a value to the given field in bean if value is not equal to the given field of old record in database
|
boolean |
setValueIfNonNull(B bean,
java.lang.String column,
java.lang.Object value)
set a value to the given field in bean if the given field of old record in database is not null
|
void |
unregisterListener(TableListener<B> listener)
remove listener.
|
rowCountOf, runAsTransaction, runAsTransaction, runSql, runSql, runSqlAsList, runSqlAsList, runSqlAsList, runSqlForMap, runSqlForValue, runWithNoPage, runWithNoPageB createBean()
int countAll()
throws RuntimeDaoException
RuntimeDaoExceptionint countUsingTemplate(B bean) throws RuntimeDaoException
bean - the bean to look for ant countRuntimeDaoExceptionint countUsingTemplate(B bean, int searchType) throws RuntimeDaoException
bean - the template to look forsearchType - exact ? like ? starting like ? ending link ? Constant.SEARCH_EXACT Constant.SEARCH_LIKE Constant.SEARCH_STARTING_LIKE Constant.SEARCH_ENDING_LIKE RuntimeDaoExceptionint countWhere(java.lang.String where)
throws RuntimeDaoException
where - the restriction clauseRuntimeDaoExceptionint rowCountWhere(java.lang.String where,
java.lang.Object... argList)
throws RuntimeDaoException
where - the restriction clauseargList - the arguments to use fill given prepared statement,may be nullRuntimeDaoExceptionint deleteAll()
throws RuntimeDaoException
RuntimeDaoExceptionint deleteByWhere(java.lang.String where)
throws RuntimeDaoException
where - the sql 'where' clauseRuntimeDaoExceptionint deleteUsingTemplate(B bean) throws RuntimeDaoException
bean - the template object(s) to be deletedRuntimeDaoExceptionint deleteByPrimaryKey(java.lang.Object... keys)
throws RuntimeDaoException
keys - primary keys valueRuntimeDaoExceptionint delete(B bean) throws RuntimeDaoException
bean - will be deleted ,all keys must not be nullRuntimeDaoExceptionint delete(B... beans) throws RuntimeDaoException
beans - B array will be deletedRuntimeDaoExceptionint delete(java.util.Collection<B> beans) throws RuntimeDaoException
beans - B collection will be deletedRuntimeDaoExceptionboolean setValueIfNonNull(B bean, java.lang.String column, java.lang.Object value)
bean - column - column namevalue - boolean setValueIfNonEqual(B bean, java.lang.String column, java.lang.Object value)
bean - column - column namevalue - B[] loadAll() throws RuntimeDaoException
RuntimeDaoExceptionint loadAll(TableManager.Action<B> action) throws RuntimeDaoException
action - Action object for do something(not null)RuntimeDaoExceptionB[] loadAll(int startRow, int numRows) throws RuntimeDaoException
startRow - the start row to be used (first row = 1, last row = -1)numRows - the number of rows to be retrieved (all rows = a negative number)RuntimeDaoExceptionint loadAll(int startRow,
int numRows,
TableManager.Action<B> action)
throws RuntimeDaoException
startRow - the start row to be used (first row = 1, last row = -1)numRows - the number of rows to be retrieved (all rows = a negative number)action - Action object for do something(not null)RuntimeDaoExceptionjava.util.List<B> loadAllAsList() throws RuntimeDaoException
RuntimeDaoExceptionjava.util.List<B> loadAllAsList(int startRow, int numRows) throws RuntimeDaoException
startRow - the start row to be used (first row = 1, last row = -1)numRows - the number of rows to be retrieved (all rows = a negative number)RuntimeDaoExceptionB loadByPrimaryKey(B bean) throws RuntimeDaoException
bean.bean - the B bean with primary key fieldsnull if not found or bean is nullRuntimeDaoExceptionB loadByPrimaryKeyChecked(B bean) throws RuntimeDaoException, ObjectRetrievalException
loadByPrimaryKey(BaseBean)bean - ObjectRetrievalException - not foundRuntimeDaoExceptionB loadByPrimaryKey(java.lang.Object... keys) throws RuntimeDaoException
keys - primary keys value:null if not foundRuntimeDaoExceptionB loadByPrimaryKeyChecked(java.lang.Object... keys) throws RuntimeDaoException, ObjectRetrievalException
loadByPrimaryKey(Object...)keys - ObjectRetrievalException - not foundRuntimeDaoExceptionboolean existsPrimaryKey(java.lang.Object... keys)
throws RuntimeDaoException
keys - primary keys valueRuntimeDaoExceptionloadByPrimaryKey(Object...)boolean existsByPrimaryKey(B bean) throws RuntimeDaoException
bean - the B bean with primary key fieldsRuntimeDaoExceptionloadByPrimaryKey(BaseBean)B checkDuplicate(B bean) throws RuntimeDaoException, ObjectRetrievalException
bean - the B bean with primary key fieldsObjectRetrievalException - has duplicated recordRuntimeDaoExceptionexistsByPrimaryKey(BaseBean)B[] loadByWhere(java.lang.String where) throws RuntimeDaoException
where - the sql 'where' clauseRuntimeDaoExceptionint loadByWhere(java.lang.String where,
TableManager.Action<B> action)
throws RuntimeDaoException
where - the sql 'where' clauseaction - Action object for do something(not null)RuntimeDaoExceptionB[] loadByWhere(java.lang.String where, int[] fieldList) throws RuntimeDaoException
where - the sql 'WHERE' clausefieldList - array of field's IDRuntimeDaoExceptionint loadByWhere(java.lang.String where,
int[] fieldList,
TableManager.Action<B> action)
throws RuntimeDaoException
where - the sql 'WHERE' clausefieldList - array of field's IDaction - Action object for do something(not null)RuntimeDaoExceptionB[] loadByWhere(java.lang.String where, int[] fieldList, int startRow, int numRows) throws RuntimeDaoException
where - the sql 'where' clausefieldList - table of the field's associated constantsstartRow - the start row to be used (first row = 1, last row = -1)numRows - the number of rows to be retrieved (all rows = a negative number)RuntimeDaoExceptionint loadByWhere(java.lang.String where,
int[] fieldList,
int startRow,
int numRows,
TableManager.Action<B> action)
throws RuntimeDaoException
where - the sql 'where' clausefieldList - table of the field's associated constantsstartRow - the start row to be used (first row = 1, last row = -1)numRows - the number of rows to be retrieved (all rows = a negative number)action - Action object for do something(not null)RuntimeDaoExceptionjava.util.List<B> loadByWhereAsList(java.lang.String where) throws RuntimeDaoException
where - the sql 'where' clauseRuntimeDaoExceptionjava.util.List<B> loadByJoinWhereAsList(java.lang.String join, java.lang.String where) throws RuntimeDaoException
join - the sql 'join' clausewhere - the sql 'where' clauseRuntimeDaoExceptionjava.util.List<B> loadByWhereAsList(java.lang.String where, int[] fieldList) throws RuntimeDaoException
where - the sql 'WHERE' clausefieldList - array of field's IDRuntimeDaoExceptionjava.util.List<B> loadByJoinWhereAsList(java.lang.String join, java.lang.String where, java.lang.Object[] argList, int[] fieldList) throws RuntimeDaoException
join - the sql 'join' clausewhere - the sql 'WHERE' clauseargList - the arguments to use fill given prepared statement,may be nullfieldList - array of field's IDRuntimeDaoExceptionjava.util.List<B> loadByWhereAsList(java.lang.String where, int[] fieldList, int startRow, int numRows) throws RuntimeDaoException
where - the sql 'where' clausefieldList - table of the field's associated constantsstartRow - the start row to be used (first row = 1, last row = -1)numRows - the number of rows to be retrieved (all rows = a negative number)RuntimeDaoExceptionjava.util.List<B> loadByJoinWhereAsList(java.lang.String join, java.lang.String where, int[] fieldList, int startRow, int numRows) throws RuntimeDaoException
join - the sql 'join' clausewhere - the sql 'where' clausefieldList - table of the field's associated constantsstartRow - the start row to be used (first row = 1, last row = -1)numRows - the number of rows to be retrieved (all rows = a negative number)RuntimeDaoException<T> java.util.List<T> loadByJoinWhereAsList(java.lang.String join,
java.lang.String where,
java.lang.Object[] argList,
int[] fieldList,
int startRow,
int numRows,
com.google.common.base.Function<B,T> transformer)
throws RuntimeDaoException
join - the sql 'join' clausewhere - the sql 'where' clauseargList - the arguments to use fill given prepared statement,may be nullfieldList - table of the field's associated constantsstartRow - the start row to be used (first row = 1, last row = -1)numRows - the number of rows to be retrieved (all rows = a negative number)transformer - cast B to TRuntimeDaoExceptionint loadByWhereForAction(java.lang.String where,
java.lang.Object[] argList,
int[] fieldList,
int startRow,
int numRows,
TableManager.Action<B> action)
throws RuntimeDaoException
where - the sql 'where' clauseargList - the arguments to use fill given prepared statement,may be nullfieldList - table of the field's associated constantsstartRow - the start row to be used (first row = 1, last row = -1)numRows - the number of rows to be retrieved (all rows = a negative number)action - Action object for do something(not null)RuntimeDaoExceptionint loadByJoinWhereForAction(java.lang.String join,
java.lang.String where,
java.lang.Object[] argList,
int[] fieldList,
int startRow,
int numRows,
TableManager.Action<B> action)
throws RuntimeDaoException
join - the sql 'join' clausewhere - the sql 'where' clauseargList - the arguments to use fill given prepared statement,may be nullfieldList - table of the field's associated constantsstartRow - the start row to be used (first row = 1, last row = -1)numRows - the number of rows to be retrieved (all rows = a negative number)action - Action object for do something(not null)RuntimeDaoExceptionB loadUniqueUsingTemplate(B bean) throws RuntimeDaoException
bean - the B bean to look fornull if not found or null input argumentObjectRetrievalException - more than one rowRuntimeDaoExceptionB loadUniqueUsingTemplateChecked(B bean) throws RuntimeDaoException, ObjectRetrievalException
bean - the B bean to look forObjectRetrievalException - not found or more than one rowRuntimeDaoExceptionB[] loadUsingTemplate(B bean) throws RuntimeDaoException
bean - the B bean template to look forRuntimeDaoExceptionint loadUsingTemplate(B bean, TableManager.Action<B> action) throws RuntimeDaoException
bean - the B bean template to look foraction - Action object for do something(not null)RuntimeDaoExceptionB[] loadUsingTemplate(B bean, int startRow, int numRows) throws RuntimeDaoException
bean - the B bean template to look forstartRow - the start row to be used (first row = 1, last row=-1)numRows - the number of rows to be retrieved (all rows = a negative number)RuntimeDaoExceptionint loadUsingTemplate(B bean, int startRow, int numRows, TableManager.Action<B> action) throws RuntimeDaoException
bean - the B bean template to look forstartRow - the start row to be used (first row = 1, last row=-1)numRows - the number of rows to be retrieved (all rows = a negative number)action - Action object for do something(not null)RuntimeDaoExceptionint loadUsingTemplate(B bean, int[] fieldList, int startRow, int numRows, int searchType, TableManager.Action<B> action) throws RuntimeDaoException
bean - the B template to look forfieldList - table of the field's associated constantsstartRow - the start row to be used (first row = 1, last row=-1)numRows - the number of rows to be retrieved (all rows = a negative number)searchType - exact ? like ? starting like ? ending link ? Constant.SEARCH_EXACT Constant.SEARCH_LIKE Constant.SEARCH_STARTING_LIKE Constant.SEARCH_ENDING_LIKE action - Action object for do something(not null)RuntimeDaoExceptionB[] loadUsingTemplate(B bean, int startRow, int numRows, int searchType) throws RuntimeDaoException
bean - the B bean template to look forstartRow - the start row to be used (first row = 1, last row=-1)numRows - the number of rows to be retrieved (all rows = a negative number)searchType - exact ? like ? starting like ? ending link ? Constant.SEARCH_EXACT Constant.SEARCH_LIKE Constant.SEARCH_STARTING_LIKE Constant.SEARCH_ENDING_LIKE RuntimeDaoExceptionjava.util.List<B> loadUsingTemplateAsList(B bean) throws RuntimeDaoException
bean - the B bean template to look forRuntimeDaoExceptionjava.util.List<B> loadUsingTemplateAsList(B bean, int startRow, int numRows) throws RuntimeDaoException
bean - the B bean template to look forstartRow - the start row to be used (first row = 1, last row=-1)numRows - the number of rows to be retrieved (all rows = a negative number)RuntimeDaoExceptionjava.util.List<B> loadUsingTemplateAsList(B bean, int startRow, int numRows, int searchType) throws RuntimeDaoException
bean - the B bean template to look forstartRow - the start row to be used (first row = 1, last row=-1)numRows - the number of rows to be retrieved (all rows = a negative number)searchType - exact ? like ? starting like ? ending link? Constant.SEARCH_EXACT Constant.SEARCH_LIKE Constant.SEARCH_STARTING_LIKE Constant.SEARCH_ENDING_LIKE RuntimeDaoExceptionvoid foreachByWhere(TableManager.DoEach<B> each, boolean stopOnError, java.lang.String where) throws RuntimeDaoException
each - DoForEach object for do something(not null)stopOnError - stop on errorwhere - the SQL 'where' clause, retrieves all rows if null or emptyRuntimeDaoExceptionvoid foreachByJoinWhere(TableManager.DoEach<B> each, boolean stopOnError, java.lang.String join, java.lang.String where) throws RuntimeDaoException
each - DoForEach object for do something(not null)stopOnError - stop on errorjoin - the sql 'join' clausewhere - the SQL 'where' clause, retrieves all rows if null or emptyRuntimeDaoExceptionvoid foreach(TableManager.DoEach<B> each, boolean stopOnError) throws RuntimeDaoException
each - DoForEach object for do something(not null)stopOnError - stop on errorRuntimeDaoExceptionvoid registerListener(TableListener<B> listener)
listener - void unregisterListener(TableListener<B> listener)
listener - B save(B bean) throws RuntimeDaoException
bean - the B bean to be savedRuntimeDaoExceptionB addIfAbsent(B bean) throws RuntimeDaoException
if (!existsByPrimaryKey(bean))
return insert(bean);
else
return loadByPrimaryKey(bean);
except that the action is performed atomically .bean - the B bean to be savednull if bean is nullRuntimeDaoExceptionB[] save(B[] beans) throws RuntimeDaoException
beans - the array of B bean to be savedRuntimeDaoException<C extends java.util.Collection<B>> C saveAsTransaction(C beans) throws RuntimeDaoException
beans - the B bean table to be savedRuntimeDaoExceptionB[] saveAsTransaction(B[] beans) throws RuntimeDaoException
beans - the B bean table to be savedRuntimeDaoExceptionsave(BaseBean[])<C extends java.util.Collection<B>> C save(C beans) throws RuntimeDaoException
beans - the B bean table to be savedRuntimeDaoException<C extends java.lang.Iterable<B>> void fastInsert(int[] fieldList, C beans)
TableListenerfieldList - table of the field's associated constants,if null as all fieldbeans - the B bean list to be savedRuntimeDaoException<T> java.util.List<T> loadColumnAsList(java.lang.String column,
boolean distinct,
java.lang.String where,
int startRow,
int numRows)
throws RuntimeDaoException
column - column name or java file name of Bdistinct - select distinct valueswhere - the sql 'where' clausestartRow - the start row to be used (first row = 1, last row = -1)numRows - the number of rows to be retrieved (all rows = a negative number)RuntimeDaoExceptionListenerContainer<B> getListenerContainer()
IDataSourceConfig getDataSourceConfig()
GeometryDataCodec getGeometryDataCodec()
Copyright © 2025. All Rights Reserved.