public interface Association extends DMXObject
Modifier and Type | Method and Description |
---|---|
AssociationModel |
getModel() |
long |
getOtherPlayerId(long id) |
RelatedObject |
getPlayer(String roleTypeUri) |
DMXObject |
getPlayer1() |
DMXObject |
getPlayer2() |
Role |
getRole(RoleModel roleModel)
### TODO: rethink this method
Returns this association's role which refers to the same object as the given role model.
|
Role |
getRole(String roleTypeUri) |
Role |
getRole1() |
Role |
getRole2() |
Topic |
getTopicByType(String topicTypeUri)
### TODO: make it work for assoc players as well or drop it
|
boolean |
hasSameRoleTypeUris() |
boolean |
isPlayer(TopicRoleModel roleModel)
### TODO: drop it
|
Association |
loadChildTopics() |
Association |
loadChildTopics(String assocDefUri) |
boolean |
matches(String roleTypeUri1,
long playerId1,
String roleTypeUri2,
long playerId2)
Checks if the given players match this association.
|
void |
update(AssociationModel model) |
delete, getAssociation, getAssociations, getChildTopics, getDatabaseVendorObject, getId, getProperty, getRelatedAssociation, getRelatedAssociations, getRelatedTopic, getRelatedTopics, getRelatedTopics, getRelatedTopics, getSimpleValue, getType, getTypeUri, getUri, hasProperty, removeProperty, setChildTopics, setProperty, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setTypeUri, setUri, updateChildTopics
toJSON
DMXObject getPlayer1()
DMXObject getPlayer2()
Role getRole(String roleTypeUri)
boolean hasSameRoleTypeUris()
boolean matches(String roleTypeUri1, long playerId1, String roleTypeUri2, long playerId2)
IllegalArgumentException
- if both given role type URIs are identical.long getOtherPlayerId(long id)
RelatedObject getPlayer(String roleTypeUri)
If there are 2 such players an exception is thrown.
Topic getTopicByType(String topicTypeUri)
If there are 2 such topics an exception is thrown.
Role getRole(RoleModel roleModel)
If the object refered by the given role model is not a player in this association an exception is thrown.
boolean isPlayer(TopicRoleModel roleModel)
void update(AssociationModel model)
Association loadChildTopics()
loadChildTopics
in interface DMXObject
Association loadChildTopics(String assocDefUri)
loadChildTopics
in interface DMXObject
AssociationModel getModel()
Copyright © 2018. All Rights Reserved.