public abstract class SharedRecordEntityAdapter extends ExternalRecordEntityAdapter
Constructor and Description |
---|
SharedRecordEntityAdapter(Object entity,
ExternalValue externalValue,
com.whitestein.lsps.model.sharedrecord.SharedRecordConfiguration configuration,
RecordType type,
ModelInstance modelInstance,
ModelProviderClientService modelProviderService,
org.hibernate.Session session,
boolean isAuxiliary)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clearEntity()
Clears reference to the entity.
|
protected Object |
convertToRuntime(RecordProperty property,
Object object)
Converts raw value to runtime value.
|
protected com.whitestein.lsps.model.sharedrecord.SharedRecordConfiguration |
getConfiguration()
Returns shared record configuration
|
protected RuntimeToHibernateConverter |
getHibernateConverter()
Returns to hibernate converter.
|
Object |
getProperty(String name)
Returns value of the property.
|
protected Object |
getPropertyInternal(String name)
Gets property internal.
|
protected org.hibernate.Session |
getSession()
Returns currently used session.
|
com.whitestein.lsps.model.sharedrecord.SharedRecordType |
getSharedRecordType()
Returns shared record type.
|
protected boolean |
isInitialized(Object object) |
boolean |
isSendNotifications()
Returns true if shared record notifications should be created.
|
boolean |
isUpdateNecessary(String property)
Returns true if association should be updated.
|
boolean |
needsToBeReloaded()
Returns true if entity needs to be reloaded from database.
|
protected Object |
processValueToSet(Object value,
RecordProperty property)
Process value to be set.
|
protected void |
reloadIfNeeded()
Reloads entity.
|
void |
remove(boolean isCascaded)
Remove this entity/holder and if isCascaded is true cascade remove to all entities in related compositions.
|
protected void |
removeAddedFromOldParents(RecordAssociation association,
RecordAssociation reverseAssociation,
RecordHolder added)
Removes entity/holder added to this recod's association from opld parent.
|
protected void |
removeEntity(Object entity)
Removes entity.
|
protected void |
removeFromAllAssociations(Set<ExternalRecordAssociation> ignoreAssociations)
Removes this entity from all association.
|
protected void |
setField(RecordProperty property,
Object value)
Sets field.
|
protected void |
setFieldsAndNotNullAssociations(Map<?,?> values)
Sets not null properties on this entity.
|
protected void |
setNullableAssociations(Map<?,?> values)
Set all nullable properties on this entity.
|
protected void |
setNullableSerializedAssociations(Map<?,?> values)
Sets values to nullable associations.
|
protected void |
setProperties(Map<?,?> values)
Sets all properties on this entity.
|
protected void |
setPropertyInternal(RecordProperty property,
Object value,
boolean ignoreCompositions)
Sets property.
|
void |
setSendNotifications(boolean sendNotifications)
Sets vale of creation of the shared record notifications.
|
void |
setThisSideOfAssociation(String name,
Object value)
Sets value only this side of the association.
|
protected abstract void |
setToEntity(RecordProperty property,
Object hibernateValue)
Sets value to a property in entity.
|
protected void |
validate(Object object,
RecordProperty prop)
Validate value to be set.
|
addToNonSharedAssociationCache, canRemoveThisFromReverseAssociation, canSetProperty, createEntityIdentificationString, createEntityJavaIdentification, fireNewEntityChange, firePropertyChange, getAuditRevisionId, getEntity, getEntityIdentificationString, getEntityInternal, getEntityNotNull, getExternalRecordType, getExternalValue, getField, getFromEntity, getFromEntity, getHolder, getJavaIdentification, getRawFromEntity, getRawFromEntity, getVersionString, initEntityIdentificationString, isExternalValueCreated, postSetAssociation, removeThis, setEntityInternal, setHolder, updateVersion
getConverter, getEvaluationConverter, getHolderInternal, getJavaObject, getModelInstance, getModelProviderService, getType, removeNullObjects, setAssociation, setHolderInternal, setProperty
public SharedRecordEntityAdapter(Object entity, ExternalValue externalValue, com.whitestein.lsps.model.sharedrecord.SharedRecordConfiguration configuration, RecordType type, ModelInstance modelInstance, ModelProviderClientService modelProviderService, org.hibernate.Session session, boolean isAuxiliary)
entity
- externalValue
- configuration
- type
- modelInstance
- modelProviderService
- session
- isAuxiliary
- public boolean needsToBeReloaded()
needsToBeReloaded
in class ExternalRecordEntityAdapter
protected org.hibernate.Session getSession()
protected void reloadIfNeeded()
ExternalRecordEntityAdapter
reloadIfNeeded
in class ExternalRecordEntityAdapter
public com.whitestein.lsps.model.sharedrecord.SharedRecordType getSharedRecordType()
protected RuntimeToHibernateConverter getHibernateConverter()
public Object getProperty(String name)
ExternalRecordEntityAdapter
getProperty
in class ExternalRecordEntityAdapter
protected Object getPropertyInternal(String name)
ExternalRecordEntityAdapter
getPropertyInternal
in class ExternalRecordEntityAdapter
protected Object convertToRuntime(RecordProperty property, Object object)
ExternalRecordEntityAdapter
convertToRuntime
in class ExternalRecordEntityAdapter
protected void setProperties(Map<?,?> values)
values
- protected void setFieldsAndNotNullAssociations(Map<?,?> values)
values
- protected void setNullableAssociations(Map<?,?> values)
values
- protected void setNullableSerializedAssociations(Map<?,?> values)
values
- protected void setPropertyInternal(RecordProperty property, Object value, boolean ignoreCompositions)
RecordEntityAdapter
setPropertyInternal
in class RecordEntityAdapter
protected void validate(Object object, RecordProperty prop)
RecordEntityAdapter
validate
in class RecordEntityAdapter
protected Object processValueToSet(Object value, RecordProperty property)
RecordEntityAdapter
processValueToSet
in class RecordEntityAdapter
protected void setField(RecordProperty property, Object value)
RecordEntityAdapter
setField
in class RecordEntityAdapter
public void setThisSideOfAssociation(String name, Object value)
AssociationHandler
setThisSideOfAssociation
in interface AssociationHandler
setThisSideOfAssociation
in class RecordEntityAdapter
protected abstract void setToEntity(RecordProperty property, Object hibernateValue)
property
- hibernateValue
- public void remove(boolean isCascaded)
RecordEntityAdapter
remove
in class RecordEntityAdapter
protected void removeAddedFromOldParents(RecordAssociation association, RecordAssociation reverseAssociation, RecordHolder added)
RecordEntityAdapter
removeAddedFromOldParents
in class RecordEntityAdapter
protected void removeFromAllAssociations(Set<ExternalRecordAssociation> ignoreAssociations)
ExternalRecordEntityAdapter
removeFromAllAssociations
in class ExternalRecordEntityAdapter
protected void removeEntity(Object entity)
ExternalRecordEntityAdapter
removeEntity
in class ExternalRecordEntityAdapter
public boolean isUpdateNecessary(String property)
AssociationHandler
public void clearEntity()
ExternalRecordEntityAdapter
clearEntity
in class ExternalRecordEntityAdapter
protected com.whitestein.lsps.model.sharedrecord.SharedRecordConfiguration getConfiguration()
public boolean isSendNotifications()
public void setSendNotifications(boolean sendNotifications)
sendNotifications
- protected boolean isInitialized(Object object)
isInitialized
in class ExternalRecordEntityAdapter
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.