类的使用
gu.sql2java.exception.RuntimeDaoException

使用RuntimeDaoException的程序包
程序包
说明
 
  • gu.sql2javaRuntimeDaoException的使用

    抛出RuntimeDaoExceptiongu.sql2java中的方法
    修饰符和类型
    方法
    说明
    TableManager.addIfAbsent(B bean)
    If the specified key is not already exist, add it to database.
    void
    ListenerContainer.afterDelete(B bean)
     
    void
    TableListener.Adapter.afterDelete(B bean)
     
    void
    TableListener.afterDelete(B bean)
    Invoked just after deleting a B record in the database.
    void
    ListenerContainer.afterInsert(B bean)
     
    void
    TableListener.Adapter.afterInsert(B bean)
     
    void
    TableListener.afterInsert(B bean)
    Invoked just after a B record is inserted in the database.
    void
    ListenerContainer.afterUpdate(B bean)
     
    void
    TableListener.Adapter.afterUpdate(B bean)
     
    void
    TableListener.afterUpdate(B bean)
    Invoked just after updating a B record in the database.
    void
    ListenerContainer.beforeDelete(B bean)
     
    void
    TableListener.Adapter.beforeDelete(B bean)
     
    void
    TableListener.beforeDelete(B bean)
    Invoked just before deleting a B record in the database.
    void
    ListenerContainer.beforeInsert(B bean)
     
    void
    TableListener.Adapter.beforeInsert(B bean)
     
    void
    TableListener.beforeInsert(B bean)
    Invoked just before inserting a B record into the database.
    void
    ListenerContainer.beforeUpdate(B bean)
     
    void
    TableListener.Adapter.beforeUpdate(B bean)
     
    void
    TableListener.beforeUpdate(B bean)
    Invoked just before updating a B record in the database.
    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(String where)
    Retrieves the number of rows of the table with a 'where' clause.
    int
    TableManager.delete(B bean)
    Delete row according to primary keys of bean.
    int
    TableManager.delete(B... beans)
    Delete beans.
    int
    TableManager.delete(Collection<B> beans)
    Delete beans.
    int
    TableManager.deleteAll()
    Deletes all rows from table.
    int
    TableManager.deleteByPrimaryKey(Object... keys)
    Delete row according to its primary keys.
    int
    TableManager.deleteByWhere(String where)
    Deletes rows from the table using a 'where' clause.
    int
    TableManager.deleteUsingTemplate(B bean)
    Deletes rows using a template.
    void
    ListenerContainer.done()
     
    void
    TableListener.Adapter.done()
     
    void
    TableListener.done()
    Invoked in finally block, just after insert,update,delete.
    boolean
    TableManager.existsByPrimaryKey(B bean)
    Returns true if this table contains row specified by primary key fields of B.
    when you don't know which is primary key of table,you can use the method.
    boolean
    TableManager.existsPrimaryKey(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, String join, 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, 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.
    TableManager.loadAllAsList()
    Loads all the rows from table.
    TableManager.loadAllAsList(int startRow, int numRows)
    Loads the given number of rows from table, given the start row.
    TableManager.loadByJoinWhereAsList(String join, String where)
    Retrieves a list of B bean given a sql 'where' clause.
    TableManager.loadByJoinWhereAsList(String join, 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.
    TableManager.loadByJoinWhereAsList(String join, String where, Object[] argList, int[] fieldList)
    Retrieves a list of B bean given a sql where clause, and a list of fields.
    <T> List<T>
    TableManager.loadByJoinWhereAsList(String join, String where, 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(String join, String where, 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.
    TableManager.loadByPrimaryKey(B bean)
    Loads a B bean from the table using primary key fields of bean.
    TableManager.loadByPrimaryKey(Object... keys)
    Loads a B bean from the table using primary key fields.
    TableManager.loadByPrimaryKeyChecked(B bean)
    TableManager.loadByPrimaryKeyChecked(Object... keys)
    B[]
    TableManager.loadByWhere(String where)
    Retrieves an array of B given a sql 'where' clause.
    B[]
    TableManager.loadByWhere(String where, int[] fieldList)
    Retrieves an array of B bean given a sql where clause, and a list of fields.
    B[]
    TableManager.loadByWhere(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(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(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(String where, TableManager.Action<B> action)
    Retrieves each row of B bean given a sql 'where' clause and dealt with action.
    TableManager.loadByWhereAsList(String where)
    Retrieves a list of B bean given a sql 'where' clause.
    TableManager.loadByWhereAsList(String where, int[] fieldList)
    Retrieves a list of B bean given a sql where clause, and a list of fields.
    TableManager.loadByWhereAsList(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(String where, 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> List<T>
    TableManager.loadColumnAsList(String column, boolean distinct, String where, int startRow, int numRows)
    Load column from table.
    TableManager.loadUniqueUsingTemplate(B bean)
    Loads a unique B bean from a template one giving a c
    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.
    TableManager.loadUsingTemplateAsList(B bean)
    Loads a list of B bean from a template one.
    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.
    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(String sql)
    compute row count of SQL statement
    int
    TableManager.rowCountWhere(String where, Object... argList)
    Retrieves the number of rows of the table with a 'where' clause.
    void
    SqlRunner.runAsTransaction(Runnable fun)
    Run Runnable as a transaction.no return
    <T> T
    SqlRunner.runAsTransaction(Callable<T> fun)
    Run Callable<T> as a transaction.
    all exceptions but SQLException threw by Callable<T> is wrapped into RuntimeException
    throw NullPointerException if fun be null
    <T> List<T>
    SqlRunner.runSqlAsList(Class<T> targetType, String sql, Object... argList)
    Load all the elements using a SQL statement specifying a fields to be retrieved.
    SqlRunner.runSqlAsList(String sql, Object... argList)
    Load all the elements using a SQL statement specifying a list of fields to be retrieved.
    SqlRunner.runSqlForMap(Map<String,Class<?>> targetTypes, String sql, Object... argList)
    Load all the elements using a SQL statement specifying a list of fields to be retrieved.
    <T> T
    SqlRunner.runSqlForValue(Class<T> targetType, String sql, Object... argList)
    Load all the elements using a SQL statement specifying a row of a field to be retrieved.
    void
    SqlRunner.runWithNoPage(Runnable fun)
    run a Runnable in Disable PageHelper environment
    <T> T
    SqlRunner.runWithNoPage(Callable<T> fun)
    run a Callable<T> in Disable PageHelper environment
    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 Collection<B>>
    C
    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 Collection<B>>
    C
    TableManager.saveAsTransaction(C beans)
    Saves a collection of B bean into the database.