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

## Class AbstractEntityAttrDao<E extends Id>

- java.lang.Object
- - ru.bitel.common.dao.AbstractDao<B>
  - - ru.bitel.common.dao.AbstractIdDao<E>
    - - ru.bitel.oss.kernel.entity.server.bean.AbstractEntityAttrDao<E>

- Type Parameters:
    `E` -
  All Implemented Interfaces:
    java.lang.AutoCloseable
  Direct Known Subclasses:
    AbstractEntityDao, ContractDao, ContractObjectDao

      public abstract class AbstractEntityAttrDao<E extends Id>
      extends ru.bitel.common.dao.AbstractIdDao<E>

  Абстрактный класс для параметров/атрибутов/параметров объектов
  Author:
    amir

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `AbstractEntityAttrDao.AddressItemModifiedEventListener`

    - ### Nested classes/interfaces inherited from class ru.bitel.common.dao.AbstractDao

      `ru.bitel.common.dao.AbstractDao.ResultSetIterator`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ru.bitel.bgbilling.kernel.directory.api.common.Directory<? extends EntitySpecAttr>` | `entitySpecAttrDirectory`
    `protected ru.bitel.bgbilling.kernel.directory.api.common.Directory<? extends EntitySpec>` | `entitySpecDirectory`
    `protected static java.util.Comparator<FilterEntityAttr>` | `filterWeightComparator`
    `protected int` | `userId`

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

      `cacheFilter, cacheJoin, cacheOrderBy, cachePaged, cachePS, cacheWhat, con, getByIdPS, mid, moduleId, orderByPattern, SQL_CALC_FOUND_ROWS, SQL_DELETE, SQL_EQ, SQL_EQCS, SQL_FROM, SQL_GROUP, SQL_IN, SQL_INSERT, SQL_LIMIT, SQL_ORDER, SQL_SELECT, SQL_SET, SQL_UPDATE, SQL_WHERE, tableName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractEntityAttrDao(java.sql.Connection con, int mid, int userId, java.lang.String tableName, java.lang.String idName, java.lang.String beanIdName, java.lang.String valueName, java.lang.String typeName, java.lang.String textTable, java.lang.String intTable, java.lang.String listTable, java.lang.String dateTable, java.lang.String houseTable, java.lang.String addressTable, java.lang.String addressHouseIdName, java.lang.String addressTitleName)`
    `AbstractEntityAttrDao(java.sql.Connection con, int mid, int userId, java.lang.String tableName, java.lang.String idName, java.lang.String beanIdName, java.lang.String valueName, java.lang.String typeName, java.lang.String textTable, java.lang.String intTable, java.lang.String listTable, java.lang.String dateTable, java.lang.String houseTable, java.lang.String addressTable, java.lang.String addressHouseIdName, java.lang.String addressTitleName, java.lang.String multiListTable)`
    `AbstractEntityAttrDao(java.sql.Connection con, int mid, int userId, java.lang.String tableName, java.lang.String idName, java.lang.String beanIdName, java.lang.String valueName, java.lang.String typeName, java.lang.String textTable, java.lang.String intTable, java.lang.String listTable, java.lang.String dateTable, java.lang.String houseTable, java.lang.String addressTable, java.lang.String addressHouseIdName, java.lang.String addressTitleName, java.lang.String multiListTable, java.lang.String emailTable)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<FilterEntityAttr>` | `filterInit(java.util.List<FilterEntityAttr> entityFilter)`
    `void` | `filterJoin(java.lang.StringBuilder query, java.lang.String wherePrefix, java.lang.StringBuilder where, java.util.List<FilterEntityAttr> entityFilter)`
    `int` | `filterToPS(java.sql.PreparedStatement ps, int idx, java.util.List<FilterEntityAttr> entityFilter)`
    `protected EntityAttr` | `getAttribute(int entityId, EntitySpecAttr spec)`
    `protected java.util.Map<java.lang.Integer,EntityAttr>` | `getEntityAttributes(int entirySpecId, int entityId)`
    `protected ru.bitel.bgbilling.kernel.directory.api.common.Directory<? extends EntitySpecAttr>` | `getEntitySpecAttrDirectory()`
    `ru.bitel.bgbilling.kernel.directory.api.common.Directory<? extends EntitySpec>` | `getEntitySpecDirectory()`
    `protected java.lang.String` | `getEntityTableName()`
    `protected E` | `getFromRS(java.sql.ResultSet rs)`
    `protected abstract E` | `getFromRS(java.sql.ResultSet rs, boolean loadAttributes, boolean loadEntityTitle)`
    `protected java.util.List<E>` | `list(boolean loadAttributes, Page page, java.lang.String what, java.lang.String join, java.util.List<FilterEntityAttr> entityFilter, java.lang.String filter, java.lang.String groupBy, java.lang.String orderBy, java.lang.Object... params)`
    `protected java.util.List<E>` | `listImpl(boolean loadAttributes, int pageSize, int pageIndex, java.lang.String what, java.lang.String join1, java.lang.String join2, java.util.List<FilterEntityAttr> entityFilter, java.lang.String filter, java.lang.String groupBy, java.lang.String orderBy, java.lang.Object... params)`
    `protected void` | `onAddressItemUpdate(ru.bitel.bgbilling.kernel.container.managed.ServerContext context, java.lang.Class<?> clazz, int id)`
    `protected boolean` | `updateEntityAttribute(int entityId, EntityAttr a)`
    `protected void` | `updateEntityAttributes(int entityId, java.util.Map<java.lang.Integer,EntityAttr> entityAttributes)`

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

      `delete, get, getAndDelete, getAndUpdate`

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

      `close, delete, deleteImpl, eq, get, getById, getImpl, getListFromRS, getSQLOrder, getSQLOrder, getTableName, list, list, listImpl, listImpl, listImplPS, listImplPS, processException, recycle, setStatementParam, update, updateImpl`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### userId

          protected final int userId

    - #### entitySpecDirectory

          protected ru.bitel.bgbilling.kernel.directory.api.common.Directory<? extends EntitySpec> entitySpecDirectory

    - #### entitySpecAttrDirectory

          protected ru.bitel.bgbilling.kernel.directory.api.common.Directory<? extends EntitySpecAttr> entitySpecAttrDirectory

    - #### filterWeightComparator

          protected static final java.util.Comparator<FilterEntityAttr> filterWeightComparator

  - ### Constructor Detail

    - #### AbstractEntityAttrDao

          public AbstractEntityAttrDao(java.sql.Connection con,
                                       int mid,
                                       int userId,
                                       java.lang.String tableName,
                                       java.lang.String idName,
                                       java.lang.String beanIdName,
                                       java.lang.String valueName,
                                       java.lang.String typeName,
                                       java.lang.String textTable,
                                       java.lang.String intTable,
                                       java.lang.String listTable,
                                       java.lang.String dateTable,
                                       java.lang.String houseTable,
                                       java.lang.String addressTable,
                                       java.lang.String addressHouseIdName,
                                       java.lang.String addressTitleName,
                                       java.lang.String multiListTable,
                                       java.lang.String emailTable)

    - #### AbstractEntityAttrDao

          public AbstractEntityAttrDao(java.sql.Connection con,
                                       int mid,
                                       int userId,
                                       java.lang.String tableName,
                                       java.lang.String idName,
                                       java.lang.String beanIdName,
                                       java.lang.String valueName,
                                       java.lang.String typeName,
                                       java.lang.String textTable,
                                       java.lang.String intTable,
                                       java.lang.String listTable,
                                       java.lang.String dateTable,
                                       java.lang.String houseTable,
                                       java.lang.String addressTable,
                                       java.lang.String addressHouseIdName,
                                       java.lang.String addressTitleName,
                                       java.lang.String multiListTable)

    - #### AbstractEntityAttrDao

          public AbstractEntityAttrDao(java.sql.Connection con,
                                       int mid,
                                       int userId,
                                       java.lang.String tableName,
                                       java.lang.String idName,
                                       java.lang.String beanIdName,
                                       java.lang.String valueName,
                                       java.lang.String typeName,
                                       java.lang.String textTable,
                                       java.lang.String intTable,
                                       java.lang.String listTable,
                                       java.lang.String dateTable,
                                       java.lang.String houseTable,
                                       java.lang.String addressTable,
                                       java.lang.String addressHouseIdName,
                                       java.lang.String addressTitleName)

  - ### Method Detail

    - #### getEntitySpecDirectory

          public ru.bitel.bgbilling.kernel.directory.api.common.Directory<? extends EntitySpec> getEntitySpecDirectory()
                                                                                                                throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### getEntitySpecAttrDirectory

          protected ru.bitel.bgbilling.kernel.directory.api.common.Directory<? extends EntitySpecAttr> getEntitySpecAttrDirectory()
                                                                                                                           throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### getAttribute

          protected EntityAttr getAttribute(int entityId,
                                            EntitySpecAttr spec)
                                     throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### getEntityAttributes

          protected java.util.Map<java.lang.Integer,EntityAttr> getEntityAttributes(int entirySpecId,
                                                                                    int entityId)
                                                                             throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### updateEntityAttribute

          protected boolean updateEntityAttribute(int entityId,
                                                  EntityAttr a)
                                           throws java.sql.SQLException,
                                                  ru.bitel.bgbilling.common.BGException

      Throws:
        `java.sql.SQLException`
        `ru.bitel.bgbilling.common.BGException`

    - #### updateEntityAttributes

          protected void updateEntityAttributes(int entityId,
                                                java.util.Map<java.lang.Integer,EntityAttr> entityAttributes)
                                         throws ru.bitel.bgbilling.common.BGException,
                                                java.sql.SQLException

      Throws:
        `ru.bitel.bgbilling.common.BGException`
        `java.sql.SQLException`

    - #### list

          protected java.util.List<E> list(boolean loadAttributes,
                                           Page page,
                                           java.lang.String what,
                                           java.lang.String join,
                                           java.util.List<FilterEntityAttr> entityFilter,
                                           java.lang.String filter,
                                           java.lang.String groupBy,
                                           java.lang.String orderBy,
                                           java.lang.Object... params)
                                    throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### filterInit

          public java.util.List<FilterEntityAttr> filterInit(java.util.List<FilterEntityAttr> entityFilter)

    - #### getEntityTableName

          protected java.lang.String getEntityTableName()

    - #### listImpl

          protected java.util.List<E> listImpl(boolean loadAttributes,
                                               int pageSize,
                                               int pageIndex,
                                               java.lang.String what,
                                               java.lang.String join1,
                                               java.lang.String join2,
                                               java.util.List<FilterEntityAttr> entityFilter,
                                               java.lang.String filter,
                                               java.lang.String groupBy,
                                               java.lang.String orderBy,
                                               java.lang.Object... params)
                                        throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### getFromRS

          protected final E getFromRS(java.sql.ResultSet rs)
                               throws java.sql.SQLException,
                                      ru.bitel.bgbilling.common.BGException

      Specified by:
        `getFromRS` in class `ru.bitel.common.dao.AbstractDao<E extends Id>`
      Throws:
        `java.sql.SQLException`
        `ru.bitel.bgbilling.common.BGException`

    - #### getFromRS

          protected abstract E getFromRS(java.sql.ResultSet rs,
                                         boolean loadAttributes,
                                         boolean loadEntityTitle)
                                  throws java.sql.SQLException,
                                         ru.bitel.bgbilling.common.BGException

      Throws:
        `java.sql.SQLException`
        `ru.bitel.bgbilling.common.BGException`

    - #### filterJoin

          public void filterJoin(java.lang.StringBuilder query,
                                 java.lang.String wherePrefix,
                                 java.lang.StringBuilder where,
                                 java.util.List<FilterEntityAttr> entityFilter)

    - #### filterToPS

          public int filterToPS(java.sql.PreparedStatement ps,
                                int idx,
                                java.util.List<FilterEntityAttr> entityFilter)
                         throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### onAddressItemUpdate

          protected void onAddressItemUpdate(ru.bitel.bgbilling.kernel.container.managed.ServerContext context,
                                             java.lang.Class<?> clazz,
                                             int id)
                                      throws java.sql.SQLException,
                                             ru.bitel.bgbilling.common.BGException

      Throws:
        `java.sql.SQLException`
        `ru.bitel.bgbilling.common.BGException`