class DMXObjectModelImpl extends Object implements DMXObjectModel
Modifier and Type | Field and Description |
---|---|
(package private) ChildTopicsModelImpl |
childTopics |
(package private) EventManager |
em |
(package private) long |
id |
private static String |
LABEL_CHILD_SEPARATOR |
private static String |
LABEL_TOPIC_SEPARATOR |
(package private) Logger |
logger |
(package private) ModelFactoryImpl |
mf |
(package private) PersistenceLayer |
pl |
(package private) String |
typeUri |
(package private) String |
uri |
(package private) SimpleValue |
value |
Constructor and Description |
---|
DMXObjectModelImpl(DMXObjectModelImpl object) |
DMXObjectModelImpl(long id,
String uri,
String typeUri,
SimpleValue value,
ChildTopicsModelImpl childTopics,
PersistenceLayer pl) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
_delete() |
(package private) void |
_updateSimpleValue(SimpleValue newValue) |
private void |
_updateTypeUri(String newTypeUri) |
private void |
_updateUri(String newUri) |
(package private) void |
checkReadAccess() |
(package private) void |
checkWriteAccess() |
(package private) String |
className() |
DMXObjectModel |
clone() |
(package private) DMXObjectModelImpl |
createModelWithChildTopics(ChildTopicsModel childTopics) |
RoleModel |
createRoleModel(String roleTypeUri) |
(package private) void |
delete()
Deletes this object's direct associations, and the object itself.
|
boolean |
equals(Object o) |
private AssociationDefinitionModel |
getAssocDef(String assocDefUri) |
(package private) List<AssociationModelImpl> |
getAssociations() |
ChildTopicsModelImpl |
getChildTopicsModel() |
(package private) Directive |
getDeleteDirective() |
long |
getId() |
(package private) SimpleValue |
getIndexValue()
Calculates the simple value that is to be indexed for this object.
|
(package private) DMXEvent |
getPostDeleteEvent() |
(package private) DMXEvent |
getPostUpdateEvent() |
(package private) DMXEvent |
getPreDeleteEvent() |
(package private) DMXEvent |
getPreUpdateEvent() |
(package private) RelatedTopicModelImpl |
getRelatedTopic(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri) |
(package private) List<RelatedTopicModelImpl> |
getRelatedTopics(List assocTypeUris,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri) |
(package private) List<RelatedTopicModelImpl> |
getRelatedTopics(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri) |
SimpleValue |
getSimpleValue() |
(package private) TypeModelImpl |
getType() |
String |
getTypeUri() |
(package private) Directive |
getUpdateDirective() |
String |
getUri() |
int |
hashCode() |
(package private) void |
indexSimpleValue(IndexMode indexMode)
Indexes the simple value of the given object model according to the given index mode.
|
(package private) DMXObject |
instantiate() |
(package private) boolean |
isSimple() |
(package private) DMXObjectModel |
loadChildTopics(AssociationDefinitionModel assocDef,
boolean deep)
Recursively loads this object's child topics for the given assoc def, provided they are not loaded already.
|
(package private) DMXObjectModel |
loadChildTopics(boolean deep)
Recursively loads this object's child topics which are not loaded already.
|
(package private) DMXObjectModel |
loadChildTopics(String assocDefUri,
boolean deep)
Recursively loads this object's child topics for the given assoc def, provided they are not loaded already.
|
(package private) String |
objectInfo() |
(package private) void |
postCreate() |
(package private) void |
postDelete() |
(package private) void |
postUpdate(DMXObjectModel updateModel,
DMXObjectModel oldObject) |
(package private) void |
preCreate() |
(package private) void |
preDelete() |
(package private) void |
preUpdate(DMXObjectModel updateModel) |
(package private) void |
removeProperty(String propUri) |
void |
set(DMXObjectModel object) |
void |
setChildTopicsModel(ChildTopicsModel childTopics) |
private void |
setDefaults() |
void |
setId(long id) |
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) void |
storeProperty(String propUri,
Object propValue,
boolean addToIndex) |
(package private) void |
storeSimpleValue()
Stores and indexes the simple value of this object model.
|
(package private) void |
storeTypeUri() |
(package private) void |
storeUri() |
org.codehaus.jettison.json.JSONObject |
toJSON() |
String |
toString() |
(package private) void |
update(DMXObjectModelImpl updateModel) |
(package private) void |
updateChildTopics(ChildTopicsModel childTopics) |
(package private) void |
updateChildTopics(ChildTopicsModel updateModel,
AssociationDefinitionModel assocDef) |
(package private) void |
updateSimpleValue(SimpleValue value) |
(package private) void |
updateTypeUri(String typeUri) |
(package private) void |
updateUri(String uri) |
(package private) boolean |
uriChange(String newUri,
String compareUri) |
private static final String LABEL_CHILD_SEPARATOR
private static final String LABEL_TOPIC_SEPARATOR
long id
SimpleValue value
ChildTopicsModelImpl childTopics
EventManager em
DMXObjectModelImpl(long id, String uri, String typeUri, SimpleValue value, ChildTopicsModelImpl childTopics, PersistenceLayer pl)
DMXObjectModelImpl(DMXObjectModelImpl object)
public long getId()
getId
in interface Identifiable
getId
in interface DMXObjectModel
public void setId(long id)
setId
in interface DMXObjectModel
public String getUri()
getUri
in interface DMXObjectModel
public void setUri(String uri)
setUri
in interface DMXObjectModel
public String getTypeUri()
getTypeUri
in interface DMXObjectModel
public void setTypeUri(String typeUri)
setTypeUri
in interface DMXObjectModel
public SimpleValue getSimpleValue()
getSimpleValue
in interface DMXObjectModel
public void setSimpleValue(String value)
setSimpleValue
in interface DMXObjectModel
public void setSimpleValue(int value)
setSimpleValue
in interface DMXObjectModel
public void setSimpleValue(long value)
setSimpleValue
in interface DMXObjectModel
public void setSimpleValue(boolean value)
setSimpleValue
in interface DMXObjectModel
public void setSimpleValue(SimpleValue value)
setSimpleValue
in interface DMXObjectModel
public ChildTopicsModelImpl getChildTopicsModel()
getChildTopicsModel
in interface DMXObjectModel
public void setChildTopicsModel(ChildTopicsModel childTopics)
setChildTopicsModel
in interface DMXObjectModel
public void set(DMXObjectModel object)
set
in interface DMXObjectModel
public RoleModel createRoleModel(String roleTypeUri)
createRoleModel
in interface DMXObjectModel
public org.codehaus.jettison.json.JSONObject toJSON()
toJSON
in interface JSONEnabled
public DMXObjectModel clone()
clone
in interface DMXObjectModel
clone
in class Object
DMXObject instantiate()
DMXObjectModelImpl createModelWithChildTopics(ChildTopicsModel childTopics)
TypeModelImpl getType()
List<AssociationModelImpl> getAssociations()
RelatedTopicModelImpl getRelatedTopic(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
List<RelatedTopicModelImpl> getRelatedTopics(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
List<RelatedTopicModelImpl> getRelatedTopics(List assocTypeUris, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
void storeUri()
void storeTypeUri()
void storeSimpleValue()
void indexSimpleValue(IndexMode indexMode)
Called to index existing topics/associations once an index mode has been added to a type definition.
void storeProperty(String propUri, Object propValue, boolean addToIndex)
void removeProperty(String propUri)
void _delete()
void checkReadAccess()
AccessControlException
void checkWriteAccess()
AccessControlException
DMXEvent getPreUpdateEvent()
DMXEvent getPostUpdateEvent()
DMXEvent getPreDeleteEvent()
DMXEvent getPostDeleteEvent()
Directive getUpdateDirective()
Directive getDeleteDirective()
void preCreate()
void postCreate()
void preUpdate(DMXObjectModel updateModel)
void postUpdate(DMXObjectModel updateModel, DMXObjectModel oldObject)
void preDelete()
void postDelete()
final void updateChildTopics(ChildTopicsModel childTopics)
final void updateChildTopics(ChildTopicsModel updateModel, AssociationDefinitionModel assocDef)
final void update(DMXObjectModelImpl updateModel)
updateModel
- The data to update.
If the URI is null
it is not updated.
If the type URI is null
it is not updated.
If the simple value is null
it is not updated.final void updateTypeUri(String typeUri)
final void updateSimpleValue(SimpleValue value)
final void delete()
final DMXObjectModel loadChildTopics(boolean deep)
final DMXObjectModel loadChildTopics(String assocDefUri, boolean deep)
Implemented on top of loadChildTopics(AssociationDefinitionModel, boolean)
.
The assoc def is get from this object's type definition.
As a consequence this method can not be used to load facet values.
To load facet values use loadChildTopics(AssociationDefinitionModel, boolean)
and pass the facet type's
assoc def.
final DMXObjectModel loadChildTopics(AssociationDefinitionModel assocDef, boolean deep)
Can be used to load facet values.
assocDef
- the child topics according to this association definition are loaded.
Note: the association definition must not necessarily originate from this object's type definition. It may originate from a facet type as well.
SimpleValue getIndexValue()
boolean isSimple()
private void setDefaults()
private void _updateUri(String newUri)
private void _updateTypeUri(String newTypeUri)
final void _updateSimpleValue(SimpleValue newValue)
private AssociationDefinitionModel getAssocDef(String assocDefUri)
String objectInfo()
Copyright © 2018. All Rights Reserved.