Package ru.bitel.common.model

# Class LoggingAbstractManager<B extends Id>

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
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:
  `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 int`
  `userId`

  ### Fields inherited from class ru.bitel.common.dao.AbstractDao

  `cacheFilter, cacheJoin, cacheOrderBy, cachePaged, cachePS, cacheWhat, con, getByIdPS, moduleId, orderByPattern, tableName`

  ### Fields inherited from class ru.bitel.common.dao.AbstarctDaoConstant

  `ERROR, fields, SQL_ALL, SQL_AND, SQL_CALC_FOUND_ROWS, SQL_DELETE, SQL_DISTINCT, SQL_EQ, SQL_EQCS, SQL_FROM, SQL_GROUP, SQL_IN, SQL_INSERT, SQL_JOIN, SQL_LEFT_JOIN, SQL_LIMIT, SQL_NOT_IN, SQL_ON, SQL_ON_DUPLICATE_KEY_UPDATE, SQL_ORDER, SQL_SELECT, SQL_SET, SQL_UPDATE, SQL_VALUES, SQL_WHERE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LoggingAbstractManager(Connection con, int mid, String tableName, int userId)`
  `LoggingAbstractManager(Connection con, int mid, String tableName, Date date, int userId)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `delete(int id)`
  `List<LogEntry>`
  `logListByCid(int cid)`
  `List<LogEntry>`
  `logListByOid(int oid)`
  `void`
  `update(B b)`

  ### Methods inherited from class ru.bitel.common.dao.AbstractIdDao

  `executeUpdate, get, getAndDelete, getAndUpdate, opt`

  ### Methods inherited from class ru.bitel.common.dao.AbstractDao

  `close, delete, deleteImpl, dropTemporaryTable, eq, get, getById, getFromRS, getImpl, getListFromRS, getPeriod, getQueryById, getSQLOrder, getTableName, list, list, listImpl, listImpl, listImplPS, listImplPS, loadData, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, processException, setPageRecordCount, setStatementParam, updateImpl`

  ### Methods inherited from class ru.bitel.common.dao.AbstarctDaoConstant

  `getSQLOrder, psSetDate, psSetInt, psSetString, sqlLimit`

  ### Methods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger

  `error, error, error, getLogger, logError, logError`

  ### Methods 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(Connection con, int mid, String tableName, int userId)

  - ### LoggingAbstractManager

    public LoggingAbstractManager(Connection con, int mid, String tableName, Date date, int userId)

- ## Method Details

  - ### delete

    public int delete(int id) throws Exception
    Overrides:
      `delete` in class `ru.bitel.common.dao.AbstractIdDao<B extends Id>`
    Throws:
      `Exception`

  - ### update

    public void update(B b) throws ru.bitel.bgbilling.common.BGException, SQLException
    Overrides:
      `update` in class `ru.bitel.common.dao.AbstractDao<B extends Id>`
    Throws:
      `ru.bitel.bgbilling.common.BGException`
      `SQLException`

  - ### logListByCid

    public List<LogEntry> logListByCid(int cid) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### logListByOid

    public List<LogEntry> logListByOid(int oid) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`