Class LoggingAbstractManager<B extends Id>

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.common.dao.AbstarctDaoConstant
ru.bitel.bgbilling.common.dao.AbstractDao<B>
ru.bitel.bgbilling.common.dao.AbstractIdDao<B>
ru.bitel.common.model.LoggingAbstractManager<B>
Type Parameters:
B - для корректного логирования B необходимо, чтобы в нем явно были реализованы методы equals и toString, в противном случае логироваться будет каждый "чих", при этом в логах будет неинформативное нечто.
Direct Known Subclasses:
NumerationPoolManager, UserCardCopyManager, UserCardManager

public abstract class LoggingAbstractManager<B extends Id> extends ru.bitel.bgbilling.common.dao.AbstractIdDao<B>
Суть менеджера - в автоматическом логировании изменяемых сущностей. Эталонные реализации (примеры) использования смотреть в NumerationPoolManager (для бездоговорной сущности) и UserCardManager (для договорной сущности).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     

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

    orderByPattern

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

    con, ERROR, fields, moduleId, 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, tableName
  • Constructor Summary

    Constructors
    Constructor
    Description
    LoggingAbstractManager(Connection con, String tableName, int moduleId, int userId)
     
    LoggingAbstractManager(Connection con, String tableName, int mosuleId, Date date, int userId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    delete(int id)
     
    logListByCid(int cid)
     
    logListByOid(int oid)
     
    void
    update(B b)
     

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

    executeUpdate, get, getAndDelete, getAndUpdate, opt, prepareStatement, sqlCommand, sqlCommandAndTable, sqlQuery, sqlWhereId

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

    delete, deleteImpl, eq, get, getById, getFromRS, getImpl, getListFromRS, getPeriod, getQueryById, getSQLOrder, list, list, listImpl, listImpl, listImplPS, listImplPS, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, psSetPeriod, queryPeriod, setStatementParam, updateImpl

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

    getSQLOrder, getTableName, sqlLimit

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

    error, error, error, getLogger, logError, logError, warn

    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, String tableName, int moduleId, int userId)
    • LoggingAbstractManager

      public LoggingAbstractManager(Connection con, String tableName, int mosuleId, Date date, int userId)
  • Method Details

    • delete

      public int delete(int id) throws SQLException
      Overrides:
      delete in class ru.bitel.bgbilling.common.dao.AbstractIdDao<B extends Id>
      Throws:
      SQLException
    • update

      public void update(B b) throws SQLException
      Overrides:
      update in class ru.bitel.bgbilling.common.dao.AbstractDao<B extends Id>
      Throws:
      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