public abstract class RecordEntityAdapter extends Object implements AssociationHandler
Constructor and Description |
---|
RecordEntityAdapter()
Creates new instance.
|
RecordEntityAdapter(RecordHolderBase<? extends ComplexValue> holder)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
canRemoveThisFromReverseAssociation(RecordHolder removed,
RecordAssociation reverseAssociation)
Returns true if this entity/holder can be removed from reverse association.
|
protected boolean |
canSetProperty(String name)
Returns true if a property can be updated.
|
protected abstract void |
firePropertyChange(String name,
Object value)
Fire property change event.
|
protected RuntimeToPersistentConverter |
getConverter()
Returns the runtime-to-persistent converter.
|
protected EvaluationLevelConverter |
getEvaluationConverter()
Returns evaluation converter.
|
RecordHolderBase<? extends ComplexValue> |
getHolder()
Returns holder.
|
protected HolderFactory |
getHolderFactory() |
protected RecordHolderBase<? extends ComplexValue> |
getHolderInternal()
Returns value of holder field.
|
Object |
getJavaObject()
Returns underlying java object if there is some.
|
protected abstract ModelInstance |
getModelInstance()
Returns model instance.
|
protected abstract ModelProvider |
getModelProvider()
Returns model provider
|
abstract Object |
getProperty(RecordProperty property)
Returns property.
|
abstract RecordType |
getType()
Returns record type.
|
protected void |
postSetAssociation(RecordAssociation assoc,
Object value)
Executes after association is set.
|
void |
remove(boolean isCascaded)
Remove this entity/holder and if isCascaded is true cascade remove to all entities in related compositions.
|
protected abstract void |
removeAddedFromOldParents(RecordAssociation association,
RecordAssociation reverseAssociation,
RecordHolder added)
Removes entity/holder added to this recod's association from opld parent.
|
protected <T> List<T> |
removeNullObjects(Collection<T> set)
Removes null objects.
|
protected abstract void |
removeThis()
Remove only this entity/holder.
|
protected void |
setAssociation(RecordAssociation assoc,
Object newValue,
boolean ignoreCompositions)
Sets association.
|
protected abstract void |
setField(RecordProperty property,
Object value)
Sets field.
|
protected void |
setHolderInternal(RecordHolderBase<? extends ComplexValue> holder)
Sets value of holder field.
|
void |
setProperty(RecordProperty property,
Object value)
Sets value of the property.
|
protected abstract void |
setPropertyInternal(RecordProperty property,
Object value,
boolean ignoreCompositions)
Sets property.
|
void |
setThisSideOfAssociation(RecordProperty property,
Object value)
Sets value only this side of the association.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isUpdateNecessary
public RecordEntityAdapter(RecordHolderBase<? extends ComplexValue> holder)
holder
- public RecordEntityAdapter()
public RecordHolderBase<? extends ComplexValue> getHolder()
protected final RecordHolderBase<? extends ComplexValue> getHolderInternal()
protected final void setHolderInternal(RecordHolderBase<? extends ComplexValue> holder)
holder
- protected abstract ModelInstance getModelInstance()
protected abstract ModelProvider getModelProvider()
public abstract RecordType getType()
protected RuntimeToPersistentConverter getConverter()
protected HolderFactory getHolderFactory()
protected EvaluationLevelConverter getEvaluationConverter()
protected void setAssociation(RecordAssociation assoc, Object newValue, boolean ignoreCompositions)
assoc
- newValue
- ignoreCompositions
- protected void postSetAssociation(RecordAssociation assoc, Object value)
assoc
- value
- protected <T> List<T> removeNullObjects(Collection<T> set)
T
- set
- protected abstract void setField(RecordProperty property, Object value)
property
- value
- protected abstract boolean canRemoveThisFromReverseAssociation(RecordHolder removed, RecordAssociation reverseAssociation)
removed
- reverseAssociation
- protected abstract void removeAddedFromOldParents(RecordAssociation association, RecordAssociation reverseAssociation, RecordHolder added)
association
- reverseAssociation
- added
- public abstract Object getProperty(RecordProperty property)
property
- public void setProperty(RecordProperty property, Object value)
property
- value
- protected boolean canSetProperty(String name)
name
- protected abstract void setPropertyInternal(RecordProperty property, Object value, boolean ignoreCompositions)
property
- value
- ignoreCompositions
- protected abstract void firePropertyChange(String name, Object value)
name
- value
- public void setThisSideOfAssociation(RecordProperty property, Object value)
AssociationHandler
setThisSideOfAssociation
in interface AssociationHandler
public void remove(boolean isCascaded)
isCascaded
- protected abstract void removeThis()
public Object getJavaObject()
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.