Package ru.bitel.common.model
Class LoggingAbstractManager<B extends Id>
java.lang.Object
ru.bitel.common.dao.AbstarctDaoConstant
ru.bitel.common.dao.AbstractDao<B>
ru.bitel.common.dao.AbstractIdDao<B>
ru.bitel.common.model.LoggingAbstractManager<B>
- Type Parameters:
B- для корректного логирования B необходимо, чтобы в нем явно были реализованы методы equals и toString, в противном случае логироваться будет каждый "чих", при этом в логах будет неинформативное нечто.
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
NumerationPoolManager,UserCardCopyManager,UserCardManager
public abstract class LoggingAbstractManager<B extends Id>
extends ru.bitel.common.dao.AbstractIdDao<B>
Суть менеджера - в автоматическом логировании изменяемых сущностей.
Эталонные реализации (примеры) использования смотреть в NumerationPoolManager (для бездоговорной
сущности) и UserCardManager (для договорной сущности).
-
Nested Class Summary
Nested classes/interfaces inherited from class ru.bitel.common.dao.AbstractDao
ru.bitel.common.dao.AbstractDao.ResultSetIterator -
Field Summary
Fields Modifier and Type Field Description protected intuserIdFields inherited from class ru.bitel.common.dao.AbstractDao
cacheFilter, cacheJoin, cacheOrderBy, cachePaged, cachePS, cacheWhat, con, getByIdPS, moduleId, orderByPattern, tableNameFields inherited from class ru.bitel.common.dao.AbstarctDaoConstant
ERROR, fields, SQL_CALC_FOUND_ROWS, SQL_DELETE, SQL_DISTINCT, SQL_EQ, SQL_EQCS, SQL_FROM, SQL_GROUP, SQL_IN, SQL_INSERT, SQL_LIMIT, SQL_ON_DUPLICATE_KEY_UPDATE, SQL_ORDER, SQL_SELECT, SQL_SET, SQL_UPDATE, SQL_VALUES, SQL_WHERE -
Constructor Summary
Constructors Constructor Description LoggingAbstractManager(java.sql.Connection con, int mid, java.lang.String tableName, int userId)LoggingAbstractManager(java.sql.Connection con, int mid, java.lang.String tableName, java.util.Date date, int userId) -
Method Summary
Modifier and Type Method Description intdelete(int id)java.util.List<LogEntry>logListByCid(int cid)java.util.List<LogEntry>logListByOid(int oid)voidupdate(B b)Methods inherited from class ru.bitel.common.dao.AbstractIdDao
get, getAndDelete, getAndUpdateMethods inherited from class ru.bitel.common.dao.AbstractDao
close, delete, deleteImpl, eq, get, getById, getFromRS, getImpl, getListFromRS, getPeriod, getQueryById, getSQLOrder, getTableName, list, list, listImpl, listImpl, listImplPS, listImplPS, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, processException, recycle, setStatementParam, updateImplMethods inherited from class ru.bitel.common.dao.AbstarctDaoConstant
getSQLOrderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
userId
protected int userId
-
-
Constructor Details
-
LoggingAbstractManager
public LoggingAbstractManager(java.sql.Connection con, int mid, java.lang.String tableName, int userId) -
LoggingAbstractManager
public LoggingAbstractManager(java.sql.Connection con, int mid, java.lang.String tableName, java.util.Date date, int userId)
-
-
Method Details
-
delete
public int delete(int id) throws ru.bitel.bgbilling.common.BGException -
update
-
logListByCid
- Throws:
ru.bitel.bgbilling.common.BGException
-
logListByOid
- Throws:
ru.bitel.bgbilling.common.BGException
-