class ValueStorage extends Object
Modifier and Type | Field and Description |
---|---|
private Logger |
logger |
private PersistenceLayer |
pl |
Constructor and Description |
---|
ValueStorage(PersistenceLayer pl) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
associateChildTopic(DeepaMehtaObjectModel parent,
RelatedTopicModel childTopic,
AssociationDefinitionModel assocDef)
Creates an association between the given parent object ("Parent" role) and the child topic ("Child" role).
|
private RelatedTopicModel |
fetchChildTopic(long parentId,
AssociationDefinitionModel assocDef)
Fetches and returns a child topic or
null if no such topic extists. |
(package private) void |
fetchChildTopics(DeepaMehtaObjectModel parent)
Fetches the child topic models (recursively) of the given parent object model and updates it in-place.
|
(package private) void |
fetchChildTopics(DeepaMehtaObjectModel parent,
AssociationDefinitionModel assocDef)
Fetches the child topic models (recursively) of the given parent object model and updates it in-place.
|
private List<RelatedTopicModelImpl> |
fetchChildTopics(long parentId,
AssociationDefinitionModel assocDef) |
private DeepaMehtaObjectModel |
fetchReferencedTopic(TopicReferenceModel topicRef) |
(package private) void |
resolveReference(TopicReferenceModel topicRef)
Replaces a reference with the real thing.
|
private void |
storeChildTopic(RelatedTopicModelImpl childTopic,
DeepaMehtaObjectModel parent,
AssociationDefinitionModel assocDef) |
private void |
storeChildTopics(DeepaMehtaObjectModelImpl parent)
Stores the composite value (child topics) of the specified topic or association model.
|
(package private) void |
storeValue(DeepaMehtaObjectModelImpl model)
Stores and indexes the specified model's value, either a simple value or a composite value (child topics).
|
private PersistenceLayer pl
ValueStorage(PersistenceLayer pl)
void fetchChildTopics(DeepaMehtaObjectModel parent)
void fetchChildTopics(DeepaMehtaObjectModel parent, AssociationDefinitionModel assocDef)
Works for both, "one" and "many" association definitions.
assocDef
- The child topic models according to this association definition are fetched.void storeValue(DeepaMehtaObjectModelImpl model)
Called to store the initial value of a newly created topic/association.
private void storeChildTopics(DeepaMehtaObjectModelImpl parent)
Note: the given model can contain childs not defined in the type definition. Only the childs defined in the type definition are stored.
private void storeChildTopic(RelatedTopicModelImpl childTopic, DeepaMehtaObjectModel parent, AssociationDefinitionModel assocDef)
void resolveReference(TopicReferenceModel topicRef)
private DeepaMehtaObjectModel fetchReferencedTopic(TopicReferenceModel topicRef)
void associateChildTopic(DeepaMehtaObjectModel parent, RelatedTopicModel childTopic, AssociationDefinitionModel assocDef)
private RelatedTopicModel fetchChildTopic(long parentId, AssociationDefinitionModel assocDef)
null
if no such topic extists.private List<RelatedTopicModelImpl> fetchChildTopics(long parentId, AssociationDefinitionModel assocDef)
Copyright © 2016. All Rights Reserved.