public abstract class AssociationEnd extends Object
Modifier | Constructor and Description |
---|---|
protected |
AssociationEnd(ModelInstance modelInstance,
ModelProvider modelProvider,
RecordHolder holder,
RecordProperty recordProperty)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
addEntity(RecordHolder entity)
Adds an entity.
|
abstract void |
checkProxyLevel(Object object)
Record can create association to records with proxy level same or lower.
|
protected void |
checkProxyLevelForEntity(RecordHolder entity) |
protected void |
fireExternalEntityChange()
Fire external record change.
|
protected abstract void |
fix()
Fixes the end (conversion of nulls to empty collections and list
re-indexing).
|
protected Object |
get()
Returns the field value.
|
static AssociationEnd |
get(ModelInstance modelInstance,
ModelProvider modelProvider,
RecordHolder holder,
RecordProperty recordProperty)
Creates and returns an recordProperty end.
|
abstract Collection<RecordHolder> |
getEntities()
Returns a collection of the entities.
|
protected RecordHolder |
getEntity()
Returns holder to update
|
protected abstract Object |
getFix() |
protected Namespace |
getMainExecutionNamespace(String level)
Returns main execution context in required execution level.
|
protected ModelInstance |
getModelInstance()
Returns model instance
|
protected RecordProperty |
getRecordProperty()
Returns record property
|
protected boolean |
hasOwnProperty()
Returns true if the record holder contains specified property.
|
protected boolean |
isUpdateNecessary()
Returns true if the update should be performed.
|
abstract void |
removeEntity(RecordHolder entity)
Removes an entity.
|
protected void |
set(Object object)
Sets the field value.
|
abstract void |
setEntities(Collection<RecordHolder> entities)
Sets entities.
|
protected AssociationEnd(ModelInstance modelInstance, ModelProvider modelProvider, RecordHolder holder, RecordProperty recordProperty)
modelInstance
- modelProvider
- holder
- recordProperty
- public static AssociationEnd get(ModelInstance modelInstance, ModelProvider modelProvider, RecordHolder holder, RecordProperty recordProperty)
modelInstance
- modelProvider
- holder
- recordProperty
- public abstract Collection<RecordHolder> getEntities()
public abstract void addEntity(RecordHolder entity)
entity
- public abstract void removeEntity(RecordHolder entity)
entity
- public abstract void setEntities(Collection<RecordHolder> entities)
entities
- protected abstract void fix()
protected abstract Object getFix()
protected Object get()
protected boolean hasOwnProperty()
protected void set(Object object)
object
- protected void fireExternalEntityChange()
protected RecordHolder getEntity()
protected RecordProperty getRecordProperty()
protected ModelInstance getModelInstance()
protected Namespace getMainExecutionNamespace(String level)
level
- protected boolean isUpdateNecessary()
public abstract void checkProxyLevel(Object object)
object
- protected void checkProxyLevelForEntity(RecordHolder entity)
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.