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, updateVersiongetConverter, getEvaluationConverter, getHolderFactory, getHolderInternal, getJavaObject, removeNullObjects, setAssociation, setHolderInternal, setPropertypublic 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 ExternalRecordEntityAdapterprotected org.hibernate.Session getSession()
protected void reloadIfNeeded()
ExternalRecordEntityAdapterreloadIfNeeded in class ExternalRecordEntityAdapterpublic com.whitestein.lsps.model.sharedrecord.SharedRecordType getSharedRecordType()
protected RuntimeToHibernateConverter getHibernateConverter()
public Object getProperty(RecordProperty property)
ExternalRecordEntityAdaptergetProperty in class ExternalRecordEntityAdapterprotected Object getPropertyInternal(RecordProperty property)
ExternalRecordEntityAdaptergetPropertyInternal in class ExternalRecordEntityAdapterprotected Object convertToRuntime(RecordProperty property, Object object)
ExternalRecordEntityAdapterconvertToRuntime in class ExternalRecordEntityAdapterprotected 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)
RecordEntityAdaptersetPropertyInternal in class ExternalRecordEntityAdapterprotected void setField(RecordProperty property, Object value)
RecordEntityAdaptersetField in class RecordEntityAdapterpublic void setThisSideOfAssociation(RecordProperty property, Object value)
AssociationHandlersetThisSideOfAssociation in interface AssociationHandlersetThisSideOfAssociation in class RecordEntityAdapterprotected abstract void setToEntity(RecordProperty property, Object hibernateValue)
property - hibernateValue - public void remove(boolean isCascaded)
RecordEntityAdapterremove in class RecordEntityAdapterprotected void removeAddedFromOldParents(RecordAssociation association, RecordAssociation reverseAssociation, RecordHolder added)
RecordEntityAdapterremoveAddedFromOldParents in class RecordEntityAdapterprotected void removeFromAllAssociations(Set<ExternalRecordAssociation> ignoreAssociations)
ExternalRecordEntityAdapterremoveFromAllAssociations in class ExternalRecordEntityAdapterprotected void removeEntity(Object entity)
ExternalRecordEntityAdapterremoveEntity in class ExternalRecordEntityAdapterpublic boolean isUpdateNecessary(String property)
AssociationHandlerpublic void clearEntity()
ExternalRecordEntityAdapterclearEntity in class ExternalRecordEntityAdapterprotected com.whitestein.lsps.model.sharedrecord.SharedRecordConfiguration getConfiguration()
public boolean isSendNotifications()
public void setSendNotifications(boolean sendNotifications)
sendNotifications - protected boolean isInitialized(Object object)
isInitialized in class ExternalRecordEntityAdapterprotected void refresh()
refresh in class ExternalRecordEntityAdapterCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.