public class PojoExternalRecordEntityAdapter extends ExternalRecordEntityAdapter
Constructor and Description |
---|
PojoExternalRecordEntityAdapter(Object entity,
ExternalValue externalValue,
RecordType type,
ModelInstance modelInstance,
ModelProvider modelProvider,
SharedRecordTypeFactory sharedRecordTypeFactory,
ExternalTypeProvider provider)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clearEntity()
Clears reference to the entity.
|
protected Object |
convertToRuntime(RecordProperty property,
Object rawValue)
Converts raw value to runtime value.
|
static PojoExternalRecordEntityAdapter |
createNew(Map<?,?> values,
RecordType type,
ModelInstance modelInstance,
ModelProvider modelProvider,
SharedRecordTypeFactory sharedRecordTypeFactory,
ExternalTypeProvider provider)
Creates an adapter for a new entity given by the map of property values.
|
protected Object |
getFromEntity(Object entity,
RecordProperty property) |
Object |
getJavaObject()
Returns underlying java object if there is some.
|
protected Object |
getRawFromEntity(Object entity,
RecordProperty property)
Returns unmodified value from entity.
|
protected boolean |
isInitialized(Object object) |
boolean |
isUpdateNecessary(String property)
Returns true if association should be updated.
|
protected void |
refresh() |
protected void |
reloadIfNeeded()
Reloads entity.
|
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.
|
addToNonSharedAssociationCache, canRemoveThisFromReverseAssociation, canSetProperty, cleanAndRenewVersion, createEntityIdentificationString, createEntityJavaIdentification, fireNewEntityChange, firePropertyChange, getAuditRevisionId, getEntity, getEntityIdentificationString, getEntityInternal, getEntityNotNull, getExternalRecordType, getExternalValue, getField, getFromEntity, getHolder, getJavaIdentification, getModelInstance, getModelProvider, getProperty, getPropertyInternal, getRawFromEntity, getType, getVersion, initEntityIdentificationString, isExternalValueCreated, needsToBeReloaded, postSetAssociation, removeThis, setEntityInternal, setPropertyInternal, updateVersion
getConverter, getEvaluationConverter, getHolderFactory, getHolderInternal, remove, removeNullObjects, setAssociation, setHolderInternal, setProperty, setThisSideOfAssociation
public PojoExternalRecordEntityAdapter(Object entity, ExternalValue externalValue, RecordType type, ModelInstance modelInstance, ModelProvider modelProvider, SharedRecordTypeFactory sharedRecordTypeFactory, ExternalTypeProvider provider)
entity
- externalValue
- type
- modelInstance
- modelProvider
- sharedRecordTypeFactory
- provider
- public static PojoExternalRecordEntityAdapter createNew(Map<?,?> values, RecordType type, ModelInstance modelInstance, ModelProvider modelProvider, SharedRecordTypeFactory sharedRecordTypeFactory, ExternalTypeProvider provider)
values
- type
- modelInstance
- modelProvider
- sharedRecordTypeFactory
- provider
- public boolean isUpdateNecessary(String property)
AssociationHandler
public void clearEntity()
ExternalRecordEntityAdapter
clearEntity
in class ExternalRecordEntityAdapter
protected void reloadIfNeeded()
ExternalRecordEntityAdapter
reloadIfNeeded
in class ExternalRecordEntityAdapter
protected void setField(RecordProperty property, Object value)
RecordEntityAdapter
setField
in class RecordEntityAdapter
protected Object getRawFromEntity(Object entity, RecordProperty property)
ExternalRecordEntityAdapter
getRawFromEntity
in class ExternalRecordEntityAdapter
protected Object getFromEntity(Object entity, RecordProperty property)
getFromEntity
in class ExternalRecordEntityAdapter
protected void removeFromAllAssociations(Set<ExternalRecordAssociation> ignoreAssociations)
ExternalRecordEntityAdapter
removeFromAllAssociations
in class ExternalRecordEntityAdapter
protected void removeEntity(Object entity)
ExternalRecordEntityAdapter
removeEntity
in class ExternalRecordEntityAdapter
protected void removeAddedFromOldParents(RecordAssociation association, RecordAssociation reverseAssociation, RecordHolder added)
RecordEntityAdapter
removeAddedFromOldParents
in class RecordEntityAdapter
protected Object convertToRuntime(RecordProperty property, Object rawValue)
ExternalRecordEntityAdapter
convertToRuntime
in class ExternalRecordEntityAdapter
public Object getJavaObject()
RecordEntityAdapter
getJavaObject
in class RecordEntityAdapter
protected boolean isInitialized(Object object)
isInitialized
in class ExternalRecordEntityAdapter
protected void refresh()
refresh
in class ExternalRecordEntityAdapter
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.