Uses of Class
org.adempiere.exceptions.DBException

Packages that use DBException
Package
Description
This is the package that contains the majority of iDempiere's generated model class and interface.
Provide majority of iDempiere's extended model class (M*).
Provide implementation for conversion of amount to word.
Provide cache, server log, JDBC interface, field display/data type, transaction, email, INI properties, security key store, encryption and environment context implementation.
  • Uses of DBException in org.compiere.model

    Methods in org.compiere.model that throw DBException
    Modifier and Type
    Method
    Description
    Query.aggregate(String sqlExpression, String sqlFunction)
    Get aggregate for given expression on this query criteria
    <T> T
    Query.aggregate(String sqlExpression, String sqlFunction, Class<T> returnType)
    Get aggregate for given expression on this query criteria
    int
    Query.count()
    Count records that match query criteria
    static int
    MFactAcct.deleteEx(int AD_Table_ID, int Record_ID, String trxName)
    Delete Fact_Acct records via table and record id
    <T extends PO>
    T
    Query.first()
    Get first PO that match query criteria
    int
    Query.firstId()
    Get first matching record id
    int
    Query.firstIdOnly()
    Get first matching record id.
    If there are more than 1 matching records, an exception is thrown.
    <T extends PO>
    T
    Query.firstOnly()
    Get first PO that match query criteria.
    If there are more PO that match query criteria, an exception will be thrown.
    Query.getSQL()
    Get full SQL select statement
    boolean
    POResultSet.hasNext()
    Is result set has next record
    <T extends PO>
    Iterator<T>
    Query.iterate()
    Get an Iterator implementation to fetch one PO at a time.
    The implementation first retrieve all IDS that match the query criteria and issue SQL query to fetch each PO when caller want to fetch the next PO.
    This minimize memory usage (at both application and DB server end) but it is slower than the list, stream and scroll method.
    <T extends PO>
    List<T>
    Query.list()
    Get a list of POs that match the query criteria.
    boolean
    Query.match()
    Check if there are any matching records for this query criteria
    POResultSet.next()
    Get next record
    <T extends PO>
    POResultSet<T>
    Query.scroll()
    Get a simple wrapper over a jdbc resultset.
    It is the caller responsibility to call the close method to release the underlying database resources.
    Since POResultSet implements the AutoCloseable interface, it is recommended to use it in a try-with-resources statement to automatically close it when you are done.
    <T extends PO>
    Stream<T>
    Query.stream()
    Get an Stream implementation to fetch one PO at a time.
  • Uses of DBException in org.compiere.util

    Modifier and Type
    Class
    Description
    class 
    Deprecated.
    This class was moved to DBException and will be removed in future.
    Methods in org.compiere.util that throw DBException
    Modifier and Type
    Method
    Description
    static int
    DB.executeUpdateEx(String sql, Object[] params, String trxName)
    Execute update and throw DBException if there are errors.
    static int
    DB.executeUpdateEx(String sql, Object[] params, String trxName, int timeOut)
    Execute update and throw DBException if there are errors.
    static int
    DB.executeUpdateEx(String sql, String trxName)
    Execute update and throw DBException if there are errors.
    static int
    DB.executeUpdateEx(String sql, String trxName, int timeOut)
    Execute update and throw DBException if there are errors.
    static int[]
    DB.getIDsEx(String trxName, String sql, Object... params)
    Get Array of IDs
    static BigDecimal
    DB.getSQLValueBDEx(String trxName, String sql, Object... params)
    Get BigDecimal value from sql
    static BigDecimal
    DB.getSQLValueBDEx(String trxName, String sql, List<Object> params)
    Get BigDecimal Value from sql
    static int
    DB.getSQLValueEx(String trxName, String sql, Object... params)
    Get int Value from sql
    static Timestamp
    DB.getSQLValueTSEx(String trxName, String sql, List<Object> params)
    Get Timestamp Value from sql