| 程序包 | 说明 |
|---|---|
| gu.sql2java |
| 限定符和类型 | 方法和说明 |
|---|---|
B |
TableManager.addIfAbsent(B bean)
If the specified key is not already exist, add it to database.
|
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 |
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 |
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 |
ListenerContainer.beforeUpdate(B bean) |
B |
TableManager.checkDuplicate(B bean)
Check duplicated row by primary keys,if row exists throw exception
|
int |
TableManager.countAll()
Retrieves the number of rows of the table.
|
int |
TableManager.countUsingTemplate(B bean)
count the number of elements of a specific 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 |
TableManager.delete(B bean)
Delete row according to primary keys of bean.
|
int |
TableManager.delete(java.util.Collection<B> beans)
Delete beans.
|
int |
TableManager.deleteAll()
Deletes all rows from table.
|
int |
TableManager.deleteByPrimaryKey(java.lang.Object... keys)
Delete row according to its primary keys.
|
int |
TableManager.deleteByWhere(java.lang.String where)
Deletes rows from the table using a 'where' clause.
|
int |
TableManager.deleteUsingTemplate(B bean)
Deletes rows using a template.
|
void |
TableListener.done()
Invoked in finally block, just after insert,update,delete.
|
void |
TableListener.Adapter.done() |
void |
ListenerContainer.done() |
boolean |
TableManager.existsByPrimaryKey(B bean)
Returns true if this table contains row specified by primary key fields of B.
|
boolean |
TableManager.existsPrimaryKey(java.lang.Object... keys)
Returns true if this table contains row with primary key fields.
|
void |
TableManager.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 |
TableManager.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 |
TableManager.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.
|
B[] |
TableManager.loadAll()
Loads all the rows from table.
|
B[] |
TableManager.loadAll(int startRow,
int numRows)
Loads the given number of rows from table, given the start row.
|
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 |
TableManager.loadAll(TableManager.Action<B> action)
Loads each row from table and dealt with action.
|
java.util.List<B> |
TableManager.loadAllAsList()
Loads all the rows from table.
|
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> |
TableManager.loadByJoinWhereAsList(java.lang.String join,
java.lang.String where)
Retrieves a list of B bean given a sql 'where' clause.
|
java.util.List<B> |
TableManager.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> |
TableManager.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> |
TableManager.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 |
TableManager.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 |
TableManager.loadByPrimaryKey(B bean)
Loads a B bean from the table using primary key fields of
bean. |
B |
TableManager.loadByPrimaryKey(java.lang.Object... keys)
Loads a B bean from the table using primary key fields.
|
B |
TableManager.loadByPrimaryKeyChecked(B bean)
|
B |
TableManager.loadByPrimaryKeyChecked(java.lang.Object... keys)
|
B[] |
TableManager.loadByWhere(java.lang.String where)
Retrieves an array of B given a sql 'where' clause.
|
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[] |
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.
|
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 |
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 |
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.
|
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> |
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> |
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.
|
int |
TableManager.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> |
TableManager.loadColumnAsList(java.lang.String column,
boolean distinct,
java.lang.String where,
int startRow,
int numRows)
Load column from table.
|
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.
|
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[] |
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.
|
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 |
TableManager.loadUsingTemplate(B bean,
TableManager.Action<B> action)
Loads each row from a template one and dealt with action.
|
java.util.List<B> |
TableManager.loadUsingTemplateAsList(B bean)
Loads a list of B bean from a template one.
|
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> |
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.
|
long |
SqlRunner.rowCountOf(java.lang.String sql)
compute row count of SQL statement
|
int |
TableManager.rowCountWhere(java.lang.String where,
java.lang.Object... argList)
Retrieves the number of rows of the table with a 'where' clause.
|
<T> T |
SqlRunner.runAsTransaction(java.util.concurrent.Callable<T> fun)
Run
Callable<T> as a transaction. |
void |
SqlRunner.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.
|
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<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.
|
<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 |
SqlRunner.runWithNoPage(java.util.concurrent.Callable<T> fun)
run a
Callable<T> in Disable PageHelper environment |
void |
SqlRunner.runWithNoPage(java.lang.Runnable fun)
run a
Runnable in Disable PageHelper environment |
B |
TableManager.save(B bean)
Saves the B bean into the database.
|
B[] |
TableManager.save(B[] beans)
Saves an array of B bean into the database.
|
<C extends java.util.Collection<B>> |
TableManager.save(C beans)
Saves a collection of B bean into the database as transaction.
|
B[] |
TableManager.saveAsTransaction(B[] beans)
Saves an array of B bean into the database as transaction.
|
<C extends java.util.Collection<B>> |
TableManager.saveAsTransaction(C beans)
Saves a collection of B bean into the database.
|
Copyright © 2024. All Rights Reserved.