|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.deepamehta.core.impl.AttachedChildTopics
class AttachedChildTopics
A composite value model that is attached to the DB.
Field Summary | |
---|---|
private Map<String,Object> |
childTopics
Attached object cache. |
private EmbeddedService |
dms
|
private Logger |
logger
|
private ChildTopicsModel |
model
|
private AttachedDeepaMehtaObject |
parent
|
Constructor Summary | |
---|---|
AttachedChildTopics(ChildTopicsModel model,
AttachedDeepaMehtaObject parent,
EmbeddedService dms)
|
Method Summary | |
---|---|
private Topic |
_getTopic(String childTypeUri)
|
private AttachedTopic |
_getTopic(String childTypeUri,
AttachedTopic defaultTopic)
|
private List<Topic> |
_getTopics(String childTypeUri)
|
private List<Topic> |
_getTopics(String childTypeUri,
List<Topic> defaultValue)
|
private ChildTopics |
_update(String childTypeUri,
TopicModel newChildTopic)
|
private void |
add(String childTypeUri,
Topic topic)
Adds a value to a multiple-valued child. |
private void |
addToChildTopics(Topic childTopic,
AssociationDefinition assocDef)
For multiple-valued childs |
Iterable<String> |
childTypeUris()
|
private Topic |
createAttachedObject(TopicModel model)
Creates an attached topic to be put in this attached object cache. |
private void |
createChildTopicMany(TopicModel newChildTopic,
AssociationDefinition assocDef)
|
private void |
createChildTopicOne(TopicModel newChildTopic,
AssociationDefinition assocDef)
|
private AttachedRelatedTopic |
findChildTopic(long childTopicId,
AssociationDefinition assocDef)
|
Object |
get(String childTypeUri)
|
private AssociationDefinition |
getAssocDef(String childTypeUri)
|
boolean |
getBoolean(String childTypeUri)
Convenience accessor for the *simple* value of a single-valued child. |
ChildTopics |
getChildTopics(String childTypeUri)
Convenience accessor for the *composite* value of a single-valued child. |
double |
getDouble(String childTypeUri)
Convenience accessor for the *simple* value of a single-valued child. |
int |
getInt(String childTypeUri)
Convenience accessor for the *simple* value of a single-valued child. |
long |
getLong(String childTypeUri)
Convenience accessor for the *simple* value of a single-valued child. |
ChildTopicsModel |
getModel()
|
Object |
getObject(String childTypeUri)
Convenience accessor for the *simple* value of a single-valued child. |
String |
getString(String childTypeUri)
Convenience accessor for the *simple* value of a single-valued child. |
Topic |
getTopic(String childTypeUri)
Accesses a single-valued child. |
List<Topic> |
getTopics(String childTypeUri)
Accesses a multiple-valued child. |
boolean |
has(String childTypeUri)
|
private void |
initAttachedObjectCache()
Initializes this attached object cache. |
private void |
initAttachedObjectCache(String childTypeUri)
Initializes this attached object cache selectively (and recursively). |
private boolean |
isReferingToAny(TopicReferenceModel topicRef,
AssociationDefinition assocDef)
Checks weather the given topic reference refers to any of the child topics. |
(package private) void |
loadChildTopics()
|
private void |
loadChildTopics(AssociationDefinition assocDef)
Recursively loads child topics (model) and updates this attached object cache accordingly. |
(package private) void |
loadChildTopics(String childTypeUri)
|
private void |
put(String childTypeUri,
Topic topic)
Puts a single-valued child. |
private void |
putInChildTopics(Topic childTopic,
AssociationDefinition assocDef)
For single-valued childs |
ChildTopics |
remove(String childTypeUri,
long topicId)
|
private void |
remove(String childTypeUri,
Topic topic)
Removes a value from a multiple-valued child. |
private void |
removeFromChildTopics(Topic childTopic,
AssociationDefinition assocDef)
For multiple-valued childs |
ChildTopics |
set(String childTypeUri,
ChildTopicsModel value)
Convenience method to set the composite value of a child. |
ChildTopics |
set(String childTypeUri,
Object value)
Convenience method to set the simple value of a child. |
ChildTopics |
set(String childTypeUri,
TopicModel value)
Sets a child. |
ChildTopics |
setRef(String childTypeUri,
long refTopicId)
|
ChildTopics |
setRef(String childTypeUri,
String refTopicUri)
|
int |
size()
|
(package private) void |
update(ChildTopicsModel newComp)
|
private void |
updateAggregationMany(List<TopicModel> newChildTopics,
AssociationDefinition assocDef)
|
private void |
updateAggregationOne(TopicModel newChildTopic,
AssociationDefinition assocDef)
|
private void |
updateChildTopicMany(TopicModel newChildTopic,
AssociationDefinition assocDef)
|
private void |
updateChildTopicOne(TopicModel newChildTopic,
AssociationDefinition assocDef)
|
(package private) void |
updateChildTopics(TopicModel newChildTopic,
List<TopicModel> newChildTopics,
AssociationDefinition assocDef)
|
private void |
updateCompositionMany(List<TopicModel> newChildTopics,
AssociationDefinition assocDef)
|
private void |
updateCompositionOne(TopicModel newChildTopic,
AssociationDefinition assocDef)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ChildTopicsModel model
private AttachedDeepaMehtaObject parent
private Map<String,Object> childTopics
private EmbeddedService dms
private Logger logger
Constructor Detail |
---|
AttachedChildTopics(ChildTopicsModel model, AttachedDeepaMehtaObject parent, EmbeddedService dms)
Method Detail |
---|
public Topic getTopic(String childTypeUri)
ChildTopics
getTopic
in interface ChildTopics
public List<Topic> getTopics(String childTypeUri)
ChildTopics
getTopics
in interface ChildTopics
public Object get(String childTypeUri)
get
in interface ChildTopics
public boolean has(String childTypeUri)
has
in interface ChildTopics
public Iterable<String> childTypeUris()
childTypeUris
in interface ChildTopics
public int size()
size
in interface ChildTopics
public ChildTopicsModel getModel()
getModel
in interface ChildTopics
public String getString(String childTypeUri)
ChildTopics
getString
in interface ChildTopics
public int getInt(String childTypeUri)
ChildTopics
getInt
in interface ChildTopics
public long getLong(String childTypeUri)
ChildTopics
getLong
in interface ChildTopics
public double getDouble(String childTypeUri)
ChildTopics
getDouble
in interface ChildTopics
public boolean getBoolean(String childTypeUri)
ChildTopics
getBoolean
in interface ChildTopics
public Object getObject(String childTypeUri)
ChildTopics
getObject
in interface ChildTopics
public ChildTopics getChildTopics(String childTypeUri)
ChildTopics
getChildTopics
in interface ChildTopics
public ChildTopics set(String childTypeUri, TopicModel value)
ChildTopics
set
in interface ChildTopics
public ChildTopics set(String childTypeUri, Object value)
ChildTopics
set
in interface ChildTopics
value
- The simple value.
Either String, Integer, Long, Double, or Boolean. Primitive values are auto-boxed.public ChildTopics set(String childTypeUri, ChildTopicsModel value)
ChildTopics
set
in interface ChildTopics
public ChildTopics setRef(String childTypeUri, long refTopicId)
setRef
in interface ChildTopics
public ChildTopics setRef(String childTypeUri, String refTopicUri)
setRef
in interface ChildTopics
public ChildTopics remove(String childTypeUri, long topicId)
remove
in interface ChildTopics
void update(ChildTopicsModel newComp)
void updateChildTopics(TopicModel newChildTopic, List<TopicModel> newChildTopics, AssociationDefinition assocDef)
void loadChildTopics()
void loadChildTopics(String childTypeUri)
private void loadChildTopics(AssociationDefinition assocDef)
assocDef
- the child topics according to this association definition are loaded.
Note: the association definition must not necessarily originate from the parent object's type definition. It may originate from a facet definition as well.
private Topic _getTopic(String childTypeUri)
private AttachedTopic _getTopic(String childTypeUri, AttachedTopic defaultTopic)
private List<Topic> _getTopics(String childTypeUri)
private List<Topic> _getTopics(String childTypeUri, List<Topic> defaultValue)
private ChildTopics _update(String childTypeUri, TopicModel newChildTopic)
private void updateCompositionOne(TopicModel newChildTopic, AssociationDefinition assocDef)
private void updateCompositionMany(List<TopicModel> newChildTopics, AssociationDefinition assocDef)
private void updateAggregationOne(TopicModel newChildTopic, AssociationDefinition assocDef)
private void updateAggregationMany(List<TopicModel> newChildTopics, AssociationDefinition assocDef)
private void updateChildTopicOne(TopicModel newChildTopic, AssociationDefinition assocDef)
private void updateChildTopicMany(TopicModel newChildTopic, AssociationDefinition assocDef)
private void createChildTopicOne(TopicModel newChildTopic, AssociationDefinition assocDef)
private void createChildTopicMany(TopicModel newChildTopic, AssociationDefinition assocDef)
private void initAttachedObjectCache()
private void initAttachedObjectCache(String childTypeUri)
private Topic createAttachedObject(TopicModel model)
private void putInChildTopics(Topic childTopic, AssociationDefinition assocDef)
private void addToChildTopics(Topic childTopic, AssociationDefinition assocDef)
private void removeFromChildTopics(Topic childTopic, AssociationDefinition assocDef)
private void put(String childTypeUri, Topic topic)
private void add(String childTypeUri, Topic topic)
private void remove(String childTypeUri, Topic topic)
private AttachedRelatedTopic findChildTopic(long childTopicId, AssociationDefinition assocDef)
private boolean isReferingToAny(TopicReferenceModel topicRef, AssociationDefinition assocDef)
assocDef
- the child topics according to this association definition are considered.private AssociationDefinition getAssocDef(String childTypeUri)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |