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,
ModelProvider modelProvider,
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(RecordProperty property)
Returns value of the property.
|
protected Object |
getPropertyInternal(RecordProperty property)
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 void |
refresh() |
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(RecordProperty property,
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.
|
addToNonSharedAssociationCache, canRemoveThisFromReverseAssociation, canSetProperty, cleanAndRenewVersion, createEntityIdentificationString, createEntityJavaIdentification, fireNewEntityChange, firePropertyChange, getAuditRevisionId, getEntity, getEntityIdentificationString, getEntityInternal, getEntityNotNull, getExternalRecordType, getExternalValue, getField, getFromEntity, getFromEntity, getHolder, getJavaIdentification, getModelInstance, getModelProvider, getRawFromEntity, getRawFromEntity, getType, getVersion, initEntityIdentificationString, isExternalValueCreated, postSetAssociation, removeThis, setEntityInternal, updateVersion
getConverter, getEvaluationConverter, getHolderFactory, getHolderInternal, getJavaObject, removeNullObjects, setAssociation, setHolderInternal, setProperty
public SharedRecordEntityAdapter(Object entity, ExternalValue externalValue, com.whitestein.lsps.model.sharedrecord.SharedRecordConfiguration configuration, RecordType type, ModelInstance modelInstance, ModelProvider modelProvider, boolean isAuxiliary)
entity
- externalValue
- configuration
- type
- modelInstance
- modelProvider
- 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(RecordProperty property)
ExternalRecordEntityAdapter
getProperty
in class ExternalRecordEntityAdapter
protected Object getPropertyInternal(RecordProperty property)
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 ExternalRecordEntityAdapter
protected void setField(RecordProperty property, Object value)
RecordEntityAdapter
setField
in class RecordEntityAdapter
public void setThisSideOfAssociation(RecordProperty property, 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
protected void refresh()
refresh
in class ExternalRecordEntityAdapter
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.