Class EntityAttrMultiListDao
java.lang.Object
ru.bitel.oss.kernel.entity.server.bean.EntityAttrMultiListDao
public class EntityAttrMultiListDao
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description protected java.sql.Connectionconprotected static java.lang.StringENTITY_TABLE_MAP_KEYprotected AbstractEntityAttrDao<?>entityAttrDaoprotected EntityAttrDaoSupportsupport -
Constructor Summary
Constructors Constructor Description EntityAttrMultiListDao(java.sql.Connection con, AbstractEntityAttrDao<?> entityAttrDao, java.lang.String table, java.lang.String listValueTable) -
Method Summary
Modifier and Type Method Description protected java.lang.StringbeanIdName()protected booleancheckEntitySpecAttrDelete(int entitySpecAttrId)protected voidcreateTable()booleandelete(int entityId, EntitySpecAttr sa)protected booleandeleteImpl(int entityId, int entitySpecAttrId)EntityAttrMultiListget(int entityId, int attrSpecId)protected java.sql.PreparedStatementgetDeletePS(int entityId, int entitySpecAttrId)protected java.util.Set<java.lang.String>getEntityTableSet()protected java.sql.PreparedStatementgetInsertHistiryPS()protected java.sql.PreparedStatementgetInsertPS(int entityId, int entitySpecAttrId)protected java.sql.PreparedStatementgetSelectPS(int entityId, int entitySpecAttrId)protected java.sql.PreparedStatementgetUpdatePS(int entityId, int entitySpecAttrId)protected java.lang.StringidName()voidinsert(int entityId, EntityAttr attr)Вызывается при updateEntityAttributes, после удаления всех атрибутов (т.е. при перезаписи всех атрибутов, например, при сохранении устройства Inet)protected voidinsertHistory(int cid, EntityAttrMultiList attr)protected java.lang.StringtypeName()booleanupdate(int entityId, EntitySpecAttr sa, EntityAttr a)Вызывается при обновлении одного атрибута.protected booleanupdateImpl(int entityId, EntityAttrMultiList attr)protected java.lang.StringvalueName()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
ENTITY_TABLE_MAP_KEY
protected static final java.lang.String ENTITY_TABLE_MAP_KEY- See Also:
- Constant Field Values
-
con
protected final java.sql.Connection con -
entityAttrDao
-
support
-
-
Constructor Details
-
EntityAttrMultiListDao
public EntityAttrMultiListDao(java.sql.Connection con, AbstractEntityAttrDao<?> entityAttrDao, java.lang.String table, java.lang.String listValueTable)
-
-
Method Details
-
createTable
protected void createTable() -
getSelectPS
protected java.sql.PreparedStatement getSelectPS(int entityId, int entitySpecAttrId) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getInsertPS
protected java.sql.PreparedStatement getInsertPS(int entityId, int entitySpecAttrId) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getUpdatePS
protected java.sql.PreparedStatement getUpdatePS(int entityId, int entitySpecAttrId) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
get
- Throws:
java.sql.SQLException
-
insert
public void insert(int entityId, EntityAttr attr) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGExceptionВызывается при updateEntityAttributes, после удаления всех атрибутов (т.е. при перезаписи всех атрибутов, например, при сохранении устройства Inet)- Throws:
java.sql.SQLExceptionru.bitel.bgbilling.common.BGException
-
updateImpl
protected boolean updateImpl(int entityId, EntityAttrMultiList attr) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGException- Throws:
java.sql.SQLExceptionru.bitel.bgbilling.common.BGException
-
deleteImpl
protected boolean deleteImpl(int entityId, int entitySpecAttrId) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getEntityTableSet
protected java.util.Set<java.lang.String> getEntityTableSet() -
idName
protected java.lang.String idName() -
valueName
protected java.lang.String valueName() -
beanIdName
protected java.lang.String beanIdName() -
typeName
protected java.lang.String typeName() -
update
public boolean update(int entityId, EntitySpecAttr sa, EntityAttr a) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGExceptionВызывается при обновлении одного атрибута. Здесь может быть удаление атрибута, если он на самом деле пустой- Parameters:
entityId-sa-a-- Returns:
- Throws:
java.sql.SQLExceptionru.bitel.bgbilling.common.BGException
-
checkEntitySpecAttrDelete
protected boolean checkEntitySpecAttrDelete(int entitySpecAttrId) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getDeletePS
protected java.sql.PreparedStatement getDeletePS(int entityId, int entitySpecAttrId) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
delete
public final boolean delete(int entityId, EntitySpecAttr sa) throws ru.bitel.bgbilling.common.BGException- Throws:
ru.bitel.bgbilling.common.BGException
-
getInsertHistiryPS
protected java.sql.PreparedStatement getInsertHistiryPS() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
insertHistory
- Throws:
java.sql.SQLException
-