|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.deepamehta.core.impl.AttachedDeepaMehtaObject
abstract class AttachedDeepaMehtaObject
A DeepaMehta object model that is attached to the DB. Method name conventions and semantics: - getXX() Reads from memory (model). - setXX(arg) Writes to memory (model) and DB. Elementary operation. - updateXX(arg) Compares arg with current value (model) and calls setXX() method(s) if required. Can be called with arg=null which indicates no update is requested. Typically returns nothing. - fetchXX() Fetches value from DB. ### FIXDOC - storeXX() Stores current value (model) to DB. ### FIXDOC
Field Summary | |
---|---|
private AttachedChildTopics |
childTopics
|
protected EmbeddedService |
dms
|
private Logger |
logger
|
private DeepaMehtaObjectModel |
model
|
Constructor Summary | |
---|---|
AttachedDeepaMehtaObject(DeepaMehtaObjectModel model,
EmbeddedService dms)
|
Method Summary | |
---|---|
(package private) abstract String |
className()
|
void |
delete()
Deletes 1) this DeepaMehta object's child topics (recursively) which have an underlying association definition of type "Composition Definition" and 2) deletes all the remaining direct associations of this DeepaMehta object. |
boolean |
equals(Object o)
|
(package private) abstract RelatedTopicModel |
fetchRelatedTopic(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri)
|
(package private) abstract ResultList<RelatedTopicModel> |
fetchRelatedTopics(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri,
int maxResultSize)
|
AttachedChildTopics |
getChildTopics()
|
Object |
getDatabaseVendorObject()
|
long |
getId()
|
DeepaMehtaObjectModel |
getModel()
|
Object |
getProperty(String propUri)
Returns this object's property value associated with the given property URI. |
RelatedTopic |
getRelatedTopic(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri)
Fetches and returns a related topic or null if no such topic extists. |
ResultList<RelatedTopic> |
getRelatedTopics(String assocTypeUri,
int maxResultSize)
|
ResultList<RelatedTopic> |
getRelatedTopics(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri,
int maxResultSize)
|
SimpleValue |
getSimpleValue()
|
(package private) abstract Type |
getType()
|
String |
getTypeUri()
|
(package private) abstract Directive |
getUpdateDirective()
|
String |
getUri()
|
int |
hashCode()
|
boolean |
hasProperty(String propUri)
Checks whether for this object a property value is associated with a given property URI. |
DeepaMehtaObject |
loadChildTopics()
|
DeepaMehtaObject |
loadChildTopics(String childTypeUri)
|
void |
setChildTopics(ChildTopicsModel childTopics)
|
void |
setSimpleValue(boolean value)
|
void |
setSimpleValue(int value)
|
void |
setSimpleValue(long value)
|
void |
setSimpleValue(SimpleValue value)
|
void |
setSimpleValue(String value)
|
void |
setTypeUri(String typeUri)
|
void |
setUri(String uri)
|
(package private) abstract void |
storeTypeUri()
|
(package private) abstract void |
storeUri()
|
org.codehaus.jettison.json.JSONObject |
toJSON()
|
String |
toString()
|
void |
update(DeepaMehtaObjectModel newModel)
|
void |
updateChildTopic(RelatedTopicModel newChildTopic,
AssociationDefinition assocDef)
|
(package private) abstract void |
updateChildTopics(ChildTopicsModel childTopics)
|
void |
updateChildTopics(List<RelatedTopicModel> newChildTopics,
AssociationDefinition assocDef)
|
private void |
updateSimpleValue(SimpleValue newValue)
|
private void |
updateTypeUri(String newTypeUri)
|
private void |
updateUri(String newUri)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.deepamehta.core.DeepaMehtaObject |
---|
getAssociation, getAssociations, getRelatedAssociation, getRelatedAssociations, getRelatedTopics, removeProperty, setProperty |
Field Detail |
---|
private DeepaMehtaObjectModel model
private AttachedChildTopics childTopics
protected final EmbeddedService dms
private Logger logger
Constructor Detail |
---|
AttachedDeepaMehtaObject(DeepaMehtaObjectModel model, EmbeddedService dms)
Method Detail |
---|
public long getId()
getId
in interface DeepaMehtaObject
getId
in interface Identifiable
public String getUri()
getUri
in interface DeepaMehtaObject
public void setUri(String uri)
setUri
in interface DeepaMehtaObject
public String getTypeUri()
getTypeUri
in interface DeepaMehtaObject
public void setTypeUri(String typeUri)
setTypeUri
in interface DeepaMehtaObject
public SimpleValue getSimpleValue()
getSimpleValue
in interface DeepaMehtaObject
public void setSimpleValue(String value)
setSimpleValue
in interface DeepaMehtaObject
public void setSimpleValue(int value)
setSimpleValue
in interface DeepaMehtaObject
public void setSimpleValue(long value)
setSimpleValue
in interface DeepaMehtaObject
public void setSimpleValue(boolean value)
setSimpleValue
in interface DeepaMehtaObject
public void setSimpleValue(SimpleValue value)
setSimpleValue
in interface DeepaMehtaObject
public AttachedChildTopics getChildTopics()
getChildTopics
in interface DeepaMehtaObject
public void setChildTopics(ChildTopicsModel childTopics)
setChildTopics
in interface DeepaMehtaObject
public DeepaMehtaObject loadChildTopics()
loadChildTopics
in interface DeepaMehtaObject
public DeepaMehtaObject loadChildTopics(String childTypeUri)
loadChildTopics
in interface DeepaMehtaObject
public DeepaMehtaObjectModel getModel()
getModel
in interface DeepaMehtaObject
public void update(DeepaMehtaObjectModel newModel)
update
in interface DeepaMehtaObject
public void updateChildTopic(RelatedTopicModel newChildTopic, AssociationDefinition assocDef)
updateChildTopic
in interface DeepaMehtaObject
public void updateChildTopics(List<RelatedTopicModel> newChildTopics, AssociationDefinition assocDef)
updateChildTopics
in interface DeepaMehtaObject
public void delete()
Note: deletion of the object itself is up to the subclasses.
delete
in interface DeepaMehtaObject
public RelatedTopic getRelatedTopic(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
DeepaMehtaObject
null
if no such topic extists.
getRelatedTopic
in interface DeepaMehtaObject
assocTypeUri
- may be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersTopicTypeUri
- may be nullpublic ResultList<RelatedTopic> getRelatedTopics(String assocTypeUri, int maxResultSize)
getRelatedTopics
in interface DeepaMehtaObject
public ResultList<RelatedTopic> getRelatedTopics(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri, int maxResultSize)
getRelatedTopics
in interface DeepaMehtaObject
assocTypeUri
- may be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersTopicTypeUri
- may be nullmaxResultSize
- Result size limit. Pass 0 for no limit.public Object getProperty(String propUri)
DeepaMehtaObject
getProperty
in interface DeepaMehtaObject
public boolean hasProperty(String propUri)
DeepaMehtaObject
hasProperty
in interface DeepaMehtaObject
public Object getDatabaseVendorObject()
getDatabaseVendorObject
in interface DeepaMehtaObject
public org.codehaus.jettison.json.JSONObject toJSON()
toJSON
in interface JSONEnabled
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
abstract String className()
abstract void updateChildTopics(ChildTopicsModel childTopics)
abstract Directive getUpdateDirective()
abstract void storeUri()
abstract void storeTypeUri()
abstract RelatedTopicModel fetchRelatedTopic(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
abstract ResultList<RelatedTopicModel> fetchRelatedTopics(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri, int maxResultSize)
abstract Type getType()
private void updateUri(String newUri)
private void updateTypeUri(String newTypeUri)
private void updateSimpleValue(SimpleValue newValue)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |