class AssociationImpl extends DeepaMehtaObjectImpl implements Association
| Modifier and Type | Field and Description |
|---|---|
private Logger |
logger |
mf, model, pl| Constructor and Description |
|---|
AssociationImpl(AssociationModelImpl model,
PersistenceLayer pl) |
| Modifier and Type | Method and Description |
|---|---|
private TopicRole |
filterRole(Role role,
TopicRoleModel roleModel) |
Association |
getAssociation(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
long othersTopicId) |
List<Association> |
getAssociations() |
AssociationModelImpl |
getModel() |
long |
getOtherPlayerId(long id) |
DeepaMehtaObject |
getPlayer1() |
DeepaMehtaObject |
getPlayer2() |
RelatedAssociation |
getRelatedAssociation(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri) |
List<RelatedAssociation> |
getRelatedAssociations(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri) |
List<RelatedTopic> |
getRelatedTopics(List assocTypeUris,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri) |
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 |
getTopic(String roleTypeUri)
### TODO: make it work for assoc players as well or drop it
|
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 updateModel) |
className, delete, equals, getChildTopics, getDatabaseVendorObject, getId, getProperty, getRelatedTopic, getRelatedTopics, getRelatedTopics, getSimpleValue, getType, getTypeUri, getUri, hashCode, hasProperty, removeProperty, setChildTopics, setProperty, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setTypeUri, setUri, toJSON, toString, update, updateChildTopic, updateChildTopicsclone, finalize, getClass, notify, notifyAll, wait, wait, waitdelete, getChildTopics, getDatabaseVendorObject, getId, getProperty, getRelatedTopic, getRelatedTopics, getRelatedTopics, getSimpleValue, getType, getTypeUri, getUri, hasProperty, removeProperty, setChildTopics, setProperty, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setTypeUri, setUri, update, updateChildTopic, updateChildTopicstoJSONAssociationImpl(AssociationModelImpl model, PersistenceLayer pl)
public Role getRole1()
getRole1 in interface Associationpublic Role getRole2()
getRole2 in interface Associationpublic DeepaMehtaObject getPlayer1()
getPlayer1 in interface Associationpublic DeepaMehtaObject getPlayer2()
getPlayer2 in interface Associationpublic Role getRole(String roleTypeUri)
getRole in interface Associationpublic boolean hasSameRoleTypeUris()
hasSameRoleTypeUris in interface Associationpublic boolean matches(String roleTypeUri1, long playerId1, String roleTypeUri2, long playerId2)
Associationmatches in interface Associationpublic long getOtherPlayerId(long id)
getOtherPlayerId in interface Associationpublic Topic getTopic(String roleTypeUri)
AssociationgetTopic in interface Associationpublic Topic getTopicByType(String topicTypeUri)
AssociationgetTopicByType in interface Associationpublic Role getRole(RoleModel roleModel)
AssociationIf the object refered by the given role model is not a player in this association an exception is thrown.
getRole in interface Associationpublic boolean isPlayer(TopicRoleModel roleModel)
AssociationisPlayer in interface Associationpublic void update(AssociationModel updateModel)
update in interface Associationpublic Association loadChildTopics()
loadChildTopics in interface AssociationloadChildTopics in interface DeepaMehtaObjectloadChildTopics in class DeepaMehtaObjectImplpublic Association loadChildTopics(String assocDefUri)
loadChildTopics in interface AssociationloadChildTopics in interface DeepaMehtaObjectloadChildTopics in class DeepaMehtaObjectImplpublic AssociationModelImpl getModel()
getModel in interface AssociationgetModel in interface DeepaMehtaObjectgetModel in class DeepaMehtaObjectImplpublic List<RelatedTopic> getRelatedTopics(List assocTypeUris, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
getRelatedTopics in interface DeepaMehtaObjectassocTypeUris - may *not* be nullmyRoleTypeUri - may be nullothersRoleTypeUri - may be nullothersTopicTypeUri - may be nullpublic RelatedAssociation getRelatedAssociation(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersAssocTypeUri)
getRelatedAssociation in interface DeepaMehtaObjectassocTypeUri - may be nullmyRoleTypeUri - may be nullothersRoleTypeUri - may be nullothersAssocTypeUri - may be nullpublic List<RelatedAssociation> getRelatedAssociations(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersAssocTypeUri)
getRelatedAssociations in interface DeepaMehtaObjectassocTypeUri - may be nullmyRoleTypeUri - may be nullothersRoleTypeUri - may be nullothersAssocTypeUri - may be nullpublic Association getAssociation(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, long othersTopicId)
getAssociation in interface DeepaMehtaObjectpublic List<Association> getAssociations()
getAssociations in interface DeepaMehtaObjectprivate TopicRole filterRole(Role role, TopicRoleModel roleModel)
Copyright © 2017. All Rights Reserved.