Package ru.bgcrm.dao
Class AbstractDAO<B extends Id>
java.lang.Object
ru.bgcrm.dao.CommonDAO
ru.bgcrm.dao.AbstractDAO<B>
DAO для работы с конкретным объектом.
-
Nested Class Summary
Nested classes/interfaces inherited from class ru.bgcrm.dao.CommonDAO
CommonDAO.ObjectExtractor<T>, CommonDAO.RecordUpdater<T extends Id> -
Field Summary
FieldsFields inherited from class ru.bgcrm.dao.CommonDAO
con, dateFormat_DDMMYYYY, dateFormat_DDMMYYYY_HHMM, log, SQL_AND, SQL_DELETE, SQL_DESC, SQL_FROM, SQL_GROUP_BY, SQL_INNER_JOIN, SQL_INSERT, SQL_INSERT_IGNORE, SQL_LEFT_JOIN, SQL_LEFT_OUTER_JOIN, SQL_LIMIT, SQL_ON_DUP_KEY_UPDATE, SQL_OR, SQL_ORDER_BY, SQL_REPLACE, SQL_SELECT, SQL_SELECT_ALL_FROM, SQL_SELECT_COUNT_ROWS, SQL_SET, SQL_UPDATE, SQL_WHERE -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDAO(Connection con, String tableName) AbstractDAO(Connection con, String tableName, Date date) -
Method Summary
Modifier and TypeMethodDescriptionintdelete(int id) protected intdeleteById(int id) protected intdeleteImpl(int id) get(int id) protected Bprotected BgetById(int id) protected abstract Bprotected BgetImpl(int id) protected voidgetListFromRS(ResultSet rs, List<B> result) protected StringgetTableName(String tableName, Date date) protected voidvoidprotected abstract voidupdateImpl(B b) Methods inherited from class ru.bgcrm.dao.CommonDAO
buildPlaceholders, deleteById, execute, execute, execute, executeBatch, executeInsert, executeUpdate, getById, getFoundRows, getFoundRows, getGroupedIds, getGroupedIds, getIds, getIds, getLikePattern, getLikePatternEnd, getLikePatternStart, getLikePatternSub, getMySQLLimit, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, sqlToBgException, update, updateColumn, updateIds, updateIds
-
Field Details
-
tableName
-
orderByPattern
-
-
Constructor Details
-
AbstractDAO
-
AbstractDAO
-
-
Method Details
-
getTableName
-
processException
- Throws:
BGException
-
update
- Throws:
BGException
-
updateImpl
- Throws:
BGExceptionSQLException
-
get
- Throws:
BGException
-
getImpl
- Throws:
BGExceptionSQLException
-
getById
- Throws:
BGExceptionSQLException
-
list
- Throws:
BGException
-
get
- Throws:
BGException
-
listImpl
protected List<B> listImpl(String filter, String orderBy, Object... params) throws BGException, SQLException - Throws:
BGExceptionSQLException
-
getFromRS
- Throws:
SQLException
-
getListFromRS
- Throws:
SQLException
-
delete
- Throws:
BGException
-
deleteImpl
- Throws:
BGExceptionSQLException
-
deleteById
- Throws:
SQLException
-