class AssociationModelImpl extends DeepaMehtaObjectModelImpl 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(DeepaMehtaObjectModelImpl object,
RoleModelImpl roleModel1,
RoleModelImpl roleModel2) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
_delete() |
(package private) void |
checkReadAccess() |
(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) DeepaMehtaEvent |
getPostDeleteEvent() |
(package private) DeepaMehtaEvent |
getPostUpdateEvent() |
(package private) DeepaMehtaEvent |
getPreDeleteEvent() |
(package private) DeepaMehtaEvent |
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 |
getTopic(String roleTypeUri) |
(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(DeepaMehtaObjectModel updateModel,
DeepaMehtaObjectModel 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 the specified topic or association model.
|
(package private) void |
storeTypeUri() |
(package private) void |
storeUri() |
org.codehaus.jettison.json.JSONObject |
toJSON() |
String |
toString() |
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) |
_updateChildTopics, calculateLabel, calculateLabelAndUpdate, delete, equals, getChildTopicsModel, getId, getIndexValue, getSimpleValue, getTypeUri, getUri, hashCode, isSimple, loadChildTopics, loadChildTopics, postCreate, postDelete, preUpdate, set, setChildTopicsModel, setId, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setTypeUri, setUri, update, updateChildTopics, updateSimpleValue, updateTypeUri, updateUri, updateWithChildTopics, 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(DeepaMehtaObjectModelImpl 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 DeepaMehtaObjectModel
createRoleModel
in class DeepaMehtaObjectModelImpl
public org.codehaus.jettison.json.JSONObject toJSON()
toJSON
in interface JSONEnabled
toJSON
in class DeepaMehtaObjectModelImpl
public AssociationModel clone()
clone
in interface AssociationModel
clone
in interface DeepaMehtaObjectModel
clone
in class DeepaMehtaObjectModelImpl
public String toString()
toString
in class DeepaMehtaObjectModelImpl
String className()
className
in class DeepaMehtaObjectModelImpl
AssociationImpl instantiate()
instantiate
in class DeepaMehtaObjectModelImpl
AssociationModelImpl createModelWithChildTopics(ChildTopicsModel childTopics)
createModelWithChildTopics
in class DeepaMehtaObjectModelImpl
final AssociationTypeModelImpl getType()
getType
in class DeepaMehtaObjectModelImpl
final List<AssociationModelImpl> getAssociations()
getAssociations
in class DeepaMehtaObjectModelImpl
final RelatedTopicModelImpl getRelatedTopic(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
getRelatedTopic
in class DeepaMehtaObjectModelImpl
final List<RelatedTopicModelImpl> getRelatedTopics(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
getRelatedTopics
in class DeepaMehtaObjectModelImpl
final List<RelatedTopicModelImpl> getRelatedTopics(List assocTypeUris, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
getRelatedTopics
in class DeepaMehtaObjectModelImpl
final void storeUri()
storeUri
in class DeepaMehtaObjectModelImpl
final void storeTypeUri()
storeTypeUri
in class DeepaMehtaObjectModelImpl
final void storeSimpleValue()
DeepaMehtaObjectModelImpl
storeSimpleValue
in class DeepaMehtaObjectModelImpl
final void indexSimpleValue(IndexMode indexMode)
DeepaMehtaObjectModelImpl
Called to index existing topics/associations once an index mode has been added to a type definition.
indexSimpleValue
in class DeepaMehtaObjectModelImpl
final void storeProperty(String propUri, Object propValue, boolean addToIndex)
storeProperty
in class DeepaMehtaObjectModelImpl
final void removeProperty(String propUri)
removeProperty
in class DeepaMehtaObjectModelImpl
final void _delete()
_delete
in class DeepaMehtaObjectModelImpl
final void checkReadAccess()
checkReadAccess
in class DeepaMehtaObjectModelImpl
final DeepaMehtaEvent getPreUpdateEvent()
getPreUpdateEvent
in class DeepaMehtaObjectModelImpl
final DeepaMehtaEvent getPostUpdateEvent()
getPostUpdateEvent
in class DeepaMehtaObjectModelImpl
final DeepaMehtaEvent getPreDeleteEvent()
getPreDeleteEvent
in class DeepaMehtaObjectModelImpl
final DeepaMehtaEvent getPostDeleteEvent()
getPostDeleteEvent
in class DeepaMehtaObjectModelImpl
final Directive getUpdateDirective()
getUpdateDirective
in class DeepaMehtaObjectModelImpl
final Directive getDeleteDirective()
getDeleteDirective
in class DeepaMehtaObjectModelImpl
void preCreate()
preCreate
in class DeepaMehtaObjectModelImpl
void postUpdate(DeepaMehtaObjectModel updateModel, DeepaMehtaObjectModel oldObject)
postUpdate
in class DeepaMehtaObjectModelImpl
void preDelete()
preDelete
in class DeepaMehtaObjectModelImpl
TopicModelImpl getTopic(String roleTypeUri)
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 © 2017. All Rights Reserved.