Package ru.bitel.oss.kernel.entity.server.bean

# Class EntityAttrMultiListDao

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.common.dao.AbstarctDaoConstant
ru.bitel.oss.kernel.entity.server.bean.EntityAttrMultiListDao

public class EntityAttrMultiListDao extends ru.bitel.bgbilling.common.dao.AbstarctDaoConstant

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final String`
  `ENTITY_TABLE_MAP_KEY`
  `protected final AbstractEntityAttrDao<?>`
  `entityAttrDao`
  `String`
  `itemTable`
  `protected final EntityAttrDaoSupport`
  `support`

  ### 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
  `EntityAttrMultiListDao(Connection con, AbstractEntityAttrDao<?> entityAttrDao, String table, String listValueTable)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected String`
  `beanIdName()`
  `protected boolean`
  `checkEntitySpecAttrDelete(int entitySpecAttrId)`
  `protected void`
  `createTable()`
  `final boolean`
  `delete(int entityId, AbstractSpecAttr sa)`
  `protected boolean`
  `deleteImpl(int entityId, int entitySpecAttrId)`
  `EntityAttrMultiList`
  `get(int entityId, int attrSpecId)`
  `protected PreparedStatement`
  `getDeletePS(int entityId, int entitySpecAttrId)`
  `protected Set<String>`
  `getEntityTableSet()`
  `protected PreparedStatement`
  `getInsertHistoryPS()`
  `protected PreparedStatement`
  `getInsertPS(int entityId, int entitySpecAttrId)`
  `protected PreparedStatement`
  `getSelectPS(int entityId, int entitySpecAttrId)`
  `protected PreparedStatement`
  `getUpdatePS(int entityId, int entitySpecAttrId)`
  `protected String`
  `idName()`
  `void`
  `insert(int entityId, EntityAttr attr)`
  Вызывается при updateEntityAttributes, после удаления всех атрибутов (т.е. при перезаписи всех атрибутов, например, при сохранении устройства Inet)
  `protected void`
  `insertHistory(int contractId, int entitySpecAttrId, EntityAttrMultiList attr)`
  `protected String`
  `typeName()`
  `boolean`
  `update(int entityId, AbstractSpecAttr sa, EntityAttr a)`
  Вызывается при обновлении одного атрибута.
  `protected boolean`
  `updateImpl(int entityId, EntityAttrMultiList attr)`
  `protected String`
  `valueName()`

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

  `getPeriod, getSQLOrder, getTableName`

  ### 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

  - ### itemTable

    public String itemTable

  - ### ENTITY_TABLE_MAP_KEY

    protected static final String ENTITY_TABLE_MAP_KEY
    See Also:
      - Constant Field Values

  - ### entityAttrDao

    protected final AbstractEntityAttrDao<?> entityAttrDao

  - ### support

    protected final EntityAttrDaoSupport support

- ## Constructor Details

  - ### EntityAttrMultiListDao

    public EntityAttrMultiListDao(Connection con, AbstractEntityAttrDao<?> entityAttrDao, String table, String listValueTable)

- ## Method Details

  - ### createTable

    protected void createTable()

  - ### getSelectPS

    protected PreparedStatement getSelectPS(int entityId, int entitySpecAttrId) throws SQLException
    Throws:
      `SQLException`

  - ### getInsertPS

    protected PreparedStatement getInsertPS(int entityId, int entitySpecAttrId) throws SQLException
    Throws:
      `SQLException`

  - ### getUpdatePS

    protected PreparedStatement getUpdatePS(int entityId, int entitySpecAttrId) throws SQLException
    Throws:
      `SQLException`

  - ### get

    public EntityAttrMultiList get(int entityId, int attrSpecId) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### insert

    public void insert(int entityId, EntityAttr attr) throws SQLException, ru.bitel.bgbilling.common.BGException
    Вызывается при updateEntityAttributes, после удаления всех атрибутов (т.е. при перезаписи всех атрибутов, например, при сохранении устройства Inet)
    Parameters:
      `entityId` -
      `attr` -
    Throws:
      `SQLException`
      `ru.bitel.bgbilling.common.BGException`

  - ### updateImpl

    protected boolean updateImpl(int entityId, EntityAttrMultiList attr) throws SQLException, ru.bitel.bgbilling.common.BGException
    Throws:
      `SQLException`
      `ru.bitel.bgbilling.common.BGException`

  - ### deleteImpl

    protected boolean deleteImpl(int entityId, int entitySpecAttrId) throws SQLException
    Throws:
      `SQLException`

  - ### getEntityTableSet

    protected Set<String> getEntityTableSet()

  - ### idName

    protected String idName()

  - ### valueName

    protected String valueName()

  - ### beanIdName

    protected String beanIdName()

  - ### typeName

    protected String typeName()

  - ### update

    public boolean update(int entityId, AbstractSpecAttr sa, EntityAttr a) throws SQLException, ru.bitel.bgbilling.common.BGException
    Вызывается при обновлении одного атрибута. Здесь может быть удаление атрибута, если он на самом деле пустой
    Parameters:
      `entityId` -
      `sa` -
      `a` -
    Returns:
    Throws:
      `SQLException`
      `ru.bitel.bgbilling.common.BGException`

  - ### checkEntitySpecAttrDelete

    protected boolean checkEntitySpecAttrDelete(int entitySpecAttrId) throws SQLException
    Throws:
      `SQLException`

  - ### getDeletePS

    protected PreparedStatement getDeletePS(int entityId, int entitySpecAttrId) throws SQLException
    Throws:
      `SQLException`

  - ### delete

    public final boolean delete(int entityId, AbstractSpecAttr sa) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### getInsertHistoryPS

    protected PreparedStatement getInsertHistoryPS() throws SQLException
    Throws:
      `SQLException`

  - ### insertHistory

    protected void insertHistory(int contractId, int entitySpecAttrId, EntityAttrMultiList attr) throws SQLException
    Throws:
      `SQLException`