Package ru.bitel.bgbilling.kernel.contract.object.server.bean

# Class ContractObjectDao

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.common.dao.AbstarctDaoConstant
ru.bitel.common.dao.AbstractDao<ContractObject>
ru.bitel.common.dao.AbstractIdDao<ContractObject>
ru.bitel.oss.kernel.entity.server.bean.AbstractEntityAttrDao<ContractObject>
ru.bitel.bgbilling.kernel.contract.object.server.bean.ContractObjectDao

All Implemented Interfaces:
  `AutoCloseable`

public class ContractObjectDao extends AbstractEntityAttrDao<ContractObject>

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class ru.bitel.oss.kernel.entity.server.bean.AbstractEntityAttrDao

  `AbstractEntityAttrDao.AddressItemModifiedEventListener`

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

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

- ## Field Summary

  ### Fields inherited from class ru.bitel.oss.kernel.entity.server.bean.AbstractEntityAttrDao

  `CONTRACT_OBJECT_SUPPORT, CONTRACT_SUPPORT, ENTITY_SUPPORT, entitySpecAttrDirectory, entitySpecDirectory, entityTableSuffix, filterWeightComparator, 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
  `ContractObjectDao(Connection con, int userId)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `contractObjectTable(SearchResult<ContractObject> searchResult, int contractId, String titleFilter, int typeId)`
  `String`
  `generateTitle(ContractObject object)`
  Генерирует имя объекта по макросу.
  `protected Directory<? extends AbstractSpecAttr>`
  `getEntitySpecAttrDirectory()`
  `Directory<? extends EntitySpec>`
  `getEntitySpecDirectory()`
  `protected ContractObject`
  `getFromRS(ResultSet rs, boolean loadAttributes)`
  `EntityAttr`
  `getObjectParameter(int objectId, int parameterId)`
  `Optional<String>`
  `getObjectParameterAddressAsString(int contractId, int parameterId)`
  `String`
  `getObjectParamTitle(int objectId, int paramId)`
  Метод, который по объекту и коду параметра вертает тайтл.
  `List<ContractObject>`
  `list(int contractId)`
  `Optional<EntityAttrAddress>`
  `optObjectParameterAddress(int objectId, int parameterId)`
  `Optional<EntityAttrBoolean>`
  `optObjectParameterBoolean(int objectId, int parameterId)`
  `Optional<Boolean>`
  `optObjectParameterBooleanAsBoolean(int objectId, int parameterId)`
  `Optional<EntityAttrDate>`
  `optObjectParameterDate(int objectId, int parameterId)`
  `Optional<Date>`
  `optObjectParameterDateAsDate(int objectId, int parameterId)`
  `Optional<EntityAttrList>`
  `optObjectParameterList(int objectId, int parameterId)`
  `Optional<String>`
  `optObjectParameterListAsString(int objectId, int parameterId)`
  `Optional<EntityAttrText>`
  `optObjectParameterText(int objectId, int parameterId)`
  `Optional<String>`
  `optObjectParameterTextAsString(int objectId, int parameterId)`
  `void`
  `orderObject(int id, boolean up)`
  `void`
  `saveTitleByMacros(ContractObject object)`
  Обновляет имя объекта в объекте и сохраняет изменения в базе.
  `protected void`
  `updateImpl(ContractObject contractObject)`
  `boolean`
  `updateObjectParameter(int objectId, EntityAttr entityAttr)`

  ### Methods inherited from class ru.bitel.oss.kernel.entity.server.bean.AbstractEntityAttrDao

  `checkEntityAttribute, checkEntitySpecAttrDelete, deleteEntityAttribute, deleteEntityAttributes, filterInit, filterJoin, filterToPS, getAllEntityAttributes, getAttribute, getEntityAttribute, getEntityAttributes, getEntityAttributes, getEntityTableName, getEntityTableSuffix, getEntityValueForIds, getFromRS, list, listImpl, onAddressItemUpdate, optEntityAttribute, updateEntityAttribute, updateEntityAttributes`

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

  `delete, executeUpdate, get, getAndDelete, getAndUpdate, opt`

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

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

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

  `getSQLOrder, psSetDate, psSetInt, psSetString, queryAndIn`

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

- ## Constructor Details

  - ### ContractObjectDao

    public ContractObjectDao(Connection con, int userId)

- ## Method Details

  - ### getObjectParameter

    public EntityAttr getObjectParameter(int objectId, int parameterId) throws Exception
    Throws:
      `Exception`

  - ### updateObjectParameter

    public boolean updateObjectParameter(int objectId, EntityAttr entityAttr) throws Exception
    Throws:
      `Exception`

  - ### optObjectParameterText

    public Optional<EntityAttrText> optObjectParameterText(int objectId, int parameterId) throws Exception
    Throws:
      `Exception`

  - ### optObjectParameterTextAsString

    public Optional<String> optObjectParameterTextAsString(int objectId, int parameterId) throws Exception
    Throws:
      `Exception`

  - ### optObjectParameterBoolean

    public Optional<EntityAttrBoolean> optObjectParameterBoolean(int objectId, int parameterId) throws Exception
    Throws:
      `Exception`

  - ### optObjectParameterBooleanAsBoolean

    public Optional<Boolean> optObjectParameterBooleanAsBoolean(int objectId, int parameterId) throws Exception
    Throws:
      `Exception`

  - ### optObjectParameterDate

    public Optional<EntityAttrDate> optObjectParameterDate(int objectId, int parameterId) throws Exception
    Throws:
      `Exception`

  - ### optObjectParameterDateAsDate

    public Optional<Date> optObjectParameterDateAsDate(int objectId, int parameterId) throws Exception
    Throws:
      `Exception`

  - ### optObjectParameterList

    public Optional<EntityAttrList> optObjectParameterList(int objectId, int parameterId) throws Exception
    Throws:
      `Exception`

  - ### optObjectParameterListAsString

    public Optional<String> optObjectParameterListAsString(int objectId, int parameterId) throws Exception
    Throws:
      `Exception`

  - ### optObjectParameterAddress

    public Optional<EntityAttrAddress> optObjectParameterAddress(int objectId, int parameterId) throws Exception
    Throws:
      `Exception`

  - ### getObjectParameterAddressAsString

    public Optional<String> getObjectParameterAddressAsString(int contractId, int parameterId) throws Exception
    Throws:
      `Exception`

  - ### getEntitySpecDirectory

    public Directory<? extends EntitySpec> getEntitySpecDirectory() throws ru.bitel.bgbilling.common.BGException
    Overrides:
      `getEntitySpecDirectory` in class `AbstractEntityAttrDao<ContractObject>`
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### getEntitySpecAttrDirectory

    protected Directory<? extends AbstractSpecAttr> getEntitySpecAttrDirectory() throws ru.bitel.bgbilling.common.BGException
    Overrides:
      `getEntitySpecAttrDirectory` in class `AbstractEntityAttrDao<ContractObject>`
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### contractObjectTable

    public void contractObjectTable(SearchResult<ContractObject> searchResult, int contractId, String titleFilter, int typeId) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### getFromRS

    protected ContractObject getFromRS(ResultSet rs, boolean loadAttributes) throws SQLException
    Specified by:
      `getFromRS` in class `AbstractEntityAttrDao<ContractObject>`
    Throws:
      `SQLException`

  - ### updateImpl

    protected void updateImpl(ContractObject contractObject) throws ru.bitel.bgbilling.common.BGException, SQLException
    Specified by:
      `updateImpl` in class `ru.bitel.common.dao.AbstractDao<ContractObject>`
    Throws:
      `ru.bitel.bgbilling.common.BGException`
      `SQLException`

  - ### list

    public List<ContractObject> list(int contractId) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### orderObject

    public void orderObject(int id, boolean up) throws Exception
    Throws:
      `Exception`

  - ### getObjectParamTitle

    public String getObjectParamTitle(int objectId, int paramId) throws Exception
    Метод, который по объекту и коду параметра вертает тайтл. По аналогии как сделано в getValuesForPids для параметров договора.
    Throws:
      `Exception`

  - ### saveTitleByMacros

    public void saveTitleByMacros(ContractObject object) throws Exception
    Обновляет имя объекта в объекте и сохраняет изменения в базе.
    Parameters:
      `object` -
    Throws:
      `ru.bitel.bgbilling.common.BGMessageException`
      `Exception`

  - ### generateTitle

    public String generateTitle(ContractObject object) throws Exception
    Генерирует имя объекта по макросу. Если макрос не задан, возвращает старое имя.
    Parameters:
      `object` -
    Returns:
      имя объекта
    Throws:
      `ru.bitel.bgbilling.common.BGMessageException`
      `Exception`