class AssociationModelImpl extends DMXObjectModelImpl implements AssociationModel
Association
.Modifier and Type | Field and Description |
---|---|
private RoleModelImpl |
roleModel1 |
private RoleModelImpl |
roleModel2 |
childTopics, em, id, logger, mf, pl, typeUri, uri, value
Constructor and Description |
---|
AssociationModelImpl(AssociationModelImpl assoc) |
AssociationModelImpl(DMXObjectModelImpl object,
RoleModelImpl roleModel1,
RoleModelImpl roleModel2) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
_delete() |
(package private) void |
checkReadAccess() |
(package private) void |
checkWriteAccess() |
(package private) String |
className() |
AssociationModel |
clone() |
private void |
createAssocDef() |
(package private) AssociationModelImpl |
createModelWithChildTopics(ChildTopicsModel childTopics) |
RoleModel |
createRoleModel(String roleTypeUri) |
private void |
duplicateCheck() |
private AssociationModelImpl |
fetchInstantiation() |
private TypeModelImpl |
fetchParentType() |
private TopicModelImpl |
filterTopic(RoleModelImpl role,
String topicTypeUri) |
(package private) List<AssociationModelImpl> |
getAssociations() |
(package private) Directive |
getDeleteDirective() |
long |
getOtherPlayerId(long id) |
(package private) DMXObjectModelImpl |
getPlayer(String roleTypeUri) |
(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) |
private RoleModelImpl |
getRole(RoleModel roleModel)
Returns this association's role which refers to the same object as the given role model.
|
RoleModelImpl |
getRoleModel(String roleTypeUri) |
RoleModelImpl |
getRoleModel1() |
RoleModelImpl |
getRoleModel2() |
(package private) TopicModelImpl |
getTopicByType(String topicTypeUri) |
(package private) AssociationTypeModelImpl |
getType() |
(package private) Directive |
getUpdateDirective() |
boolean |
hasSameRoleTypeUris() |
(package private) void |
indexSimpleValue(IndexMode indexMode)
Indexes the simple value of the given object model according to the given index mode.
|
(package private) AssociationImpl |
instantiate() |
private boolean |
isAssocDef(AssociationModel assoc) |
boolean |
matches(String roleTypeUri1,
long playerId1,
String roleTypeUri2,
long playerId2)
Checks if the given players match this association.
|
(package private) void |
postUpdate(DMXObjectModel updateModel,
DMXObjectModel oldObject) |
(package private) void |
preCreate() |
(package private) void |
preDelete() |
private void |
reassignInstantiation() |
private void |
removeAssocDef() |
(package private) void |
removeProperty(String propUri) |
void |
setRoleModel1(RoleModel roleModel1) |
void |
setRoleModel2(RoleModel roleModel2) |
(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() |
private void |
updateAssocDef(AssociationModel oldAssoc) |
private void |
updateRole(RoleModel updateModel,
int nr) |
private void |
updateRoles(AssociationModel updateModel) |
(package private) void |
updateRoleTypeUri(RoleModelImpl role,
String roleTypeUri) |
_updateSimpleValue, delete, equals, getChildTopicsModel, getId, getIndexValue, getSimpleValue, getTypeUri, getUri, hashCode, isSimple, loadChildTopics, loadChildTopics, loadChildTopics, objectInfo, postCreate, postDelete, preUpdate, set, setChildTopicsModel, setId, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setTypeUri, setUri, toString, update, updateChildTopics, updateChildTopics, updateSimpleValue, updateTypeUri, updateUri, uriChange
finalize, getClass, notify, notifyAll, wait, wait, wait
getChildTopicsModel, getId, getSimpleValue, getTypeUri, getUri, set, setChildTopicsModel, setId, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setTypeUri, setUri
private RoleModelImpl roleModel1
private RoleModelImpl roleModel2
AssociationModelImpl(DMXObjectModelImpl object, RoleModelImpl roleModel1, RoleModelImpl roleModel2)
AssociationModelImpl(AssociationModelImpl assoc)
public RoleModelImpl getRoleModel1()
getRoleModel1
in interface AssociationModel
public RoleModelImpl getRoleModel2()
getRoleModel2
in interface AssociationModel
public void setRoleModel1(RoleModel roleModel1)
setRoleModel1
in interface AssociationModel
public void setRoleModel2(RoleModel roleModel2)
setRoleModel2
in interface AssociationModel
public RoleModelImpl getRoleModel(String roleTypeUri)
getRoleModel
in interface AssociationModel
public boolean hasSameRoleTypeUris()
hasSameRoleTypeUris
in interface AssociationModel
public boolean matches(String roleTypeUri1, long playerId1, String roleTypeUri2, long playerId2)
AssociationModel
matches
in interface AssociationModel
public long getOtherPlayerId(long id)
getOtherPlayerId
in interface AssociationModel
public RoleModel createRoleModel(String roleTypeUri)
createRoleModel
in interface DMXObjectModel
createRoleModel
in class DMXObjectModelImpl
public org.codehaus.jettison.json.JSONObject toJSON()
toJSON
in interface JSONEnabled
toJSON
in class DMXObjectModelImpl
public AssociationModel clone()
clone
in interface AssociationModel
clone
in interface DMXObjectModel
clone
in class DMXObjectModelImpl
String className()
className
in class DMXObjectModelImpl
AssociationImpl instantiate()
instantiate
in class DMXObjectModelImpl
AssociationModelImpl createModelWithChildTopics(ChildTopicsModel childTopics)
createModelWithChildTopics
in class DMXObjectModelImpl
final AssociationTypeModelImpl getType()
getType
in class DMXObjectModelImpl
final List<AssociationModelImpl> getAssociations()
getAssociations
in class DMXObjectModelImpl
final RelatedTopicModelImpl getRelatedTopic(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
getRelatedTopic
in class DMXObjectModelImpl
final List<RelatedTopicModelImpl> getRelatedTopics(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
getRelatedTopics
in class DMXObjectModelImpl
final List<RelatedTopicModelImpl> getRelatedTopics(List assocTypeUris, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
getRelatedTopics
in class DMXObjectModelImpl
final void storeUri()
storeUri
in class DMXObjectModelImpl
final void storeTypeUri()
storeTypeUri
in class DMXObjectModelImpl
final void storeSimpleValue()
DMXObjectModelImpl
storeSimpleValue
in class DMXObjectModelImpl
final void indexSimpleValue(IndexMode indexMode)
DMXObjectModelImpl
Called to index existing topics/associations once an index mode has been added to a type definition.
indexSimpleValue
in class DMXObjectModelImpl
final void storeProperty(String propUri, Object propValue, boolean addToIndex)
storeProperty
in class DMXObjectModelImpl
final void removeProperty(String propUri)
removeProperty
in class DMXObjectModelImpl
final void _delete()
_delete
in class DMXObjectModelImpl
final void checkReadAccess()
checkReadAccess
in class DMXObjectModelImpl
final void checkWriteAccess()
checkWriteAccess
in class DMXObjectModelImpl
final DMXEvent getPreUpdateEvent()
getPreUpdateEvent
in class DMXObjectModelImpl
final DMXEvent getPostUpdateEvent()
getPostUpdateEvent
in class DMXObjectModelImpl
final DMXEvent getPreDeleteEvent()
getPreDeleteEvent
in class DMXObjectModelImpl
final DMXEvent getPostDeleteEvent()
getPostDeleteEvent
in class DMXObjectModelImpl
final Directive getUpdateDirective()
getUpdateDirective
in class DMXObjectModelImpl
final Directive getDeleteDirective()
getDeleteDirective
in class DMXObjectModelImpl
void preCreate()
preCreate
in class DMXObjectModelImpl
void postUpdate(DMXObjectModel updateModel, DMXObjectModel oldObject)
postUpdate
in class DMXObjectModelImpl
void preDelete()
preDelete
in class DMXObjectModelImpl
DMXObjectModelImpl getPlayer(String roleTypeUri)
If there are 2 such players an exception is thrown.
TopicModelImpl getTopicByType(String topicTypeUri)
void updateRoleTypeUri(RoleModelImpl role, String roleTypeUri)
private void duplicateCheck()
private void updateRoles(AssociationModel updateModel)
updateModel
- The data to update.
If role 1 is null
it is not updated.
If role 2 is null
it is not updated.private void updateRole(RoleModel updateModel, int nr)
nr
- used only for loggingprivate RoleModelImpl getRole(RoleModel roleModel)
If the object refered by the given role model is not a player in this association an exception is thrown.
private TopicModelImpl filterTopic(RoleModelImpl role, String topicTypeUri)
private void reassignInstantiation()
private AssociationModelImpl fetchInstantiation()
private void createAssocDef()
private void updateAssocDef(AssociationModel oldAssoc)
private void removeAssocDef()
private boolean isAssocDef(AssociationModel assoc)
private TypeModelImpl fetchParentType()
Copyright © 2018. All Rights Reserved.