class AssociationDefinitionModelImpl extends AssociationModelImpl implements AssociationDefinitionModel
Modifier and Type | Field and Description |
---|---|
private String |
childCardinalityUri |
private Logger |
logger |
private String |
parentCardinalityUri |
private ViewConfigurationModelImpl |
viewConfig |
childTopics, em, id, mf, pl, typeUri, uri, value
Constructor and Description |
---|
AssociationDefinitionModelImpl(AssociationModelImpl assoc)
Remains partially uninitialzed.
|
AssociationDefinitionModelImpl(AssociationModelImpl assoc,
String parentCardinalityUri,
String childCardinalityUri,
ViewConfigurationModelImpl viewConfig) |
Modifier and Type | Method and Description |
---|---|
(package private) String |
className() |
(package private) AssociationDefinitionModelImpl |
createModelWithChildTopics(ChildTopicsModel childTopics) |
private String |
defaultInstanceLevelAssocTypeUri() |
String |
getAssocDefUri() |
String |
getChildCardinalityUri() |
String |
getChildTypeUri() |
private TopicModelImpl |
getCustomAssocType() |
String |
getCustomAssocTypeUri() |
String |
getInstanceLevelAssocTypeUri() |
String |
getParentCardinalityUri() |
String |
getParentTypeUri() |
ViewConfigurationModelImpl |
getViewConfig() |
(package private) boolean |
includeInLabel() |
(package private) AssociationDefinitionImpl |
instantiate() |
(package private) boolean |
isIdentityAttr() |
(package private) boolean |
isReadable() |
(package private) void |
postUpdate(DMXObjectModel updateModel,
DMXObjectModel oldObject)
2 assoc def specific tasks must be performed once the underlying association is updated:
- Update the assoc def's cardinality (in type cache + DB).
|
void |
setChildCardinalityUri(String childCardinalityUri) |
void |
setParentCardinalityUri(String parentCardinalityUri) |
void |
setViewConfig(ViewConfigurationModel viewConfig) |
org.codehaus.jettison.json.JSONObject |
toJSON() |
private void |
updateCardinality(AssociationDefinitionModel newAssocDef) |
private void |
updateChildCardinality(String newChildCardinalityUri) |
(package private) void |
updateChildCardinalityUri(String childCardinalityUri) |
private void |
updateParentCardinality(String newParentCardinalityUri) |
(package private) void |
updateParentCardinalityUri(String parentCardinalityUri) |
_delete, checkReadAccess, checkWriteAccess, clone, createRoleModel, getAssociations, getDeleteDirective, getOtherPlayerId, getPlayer, getPostDeleteEvent, getPostUpdateEvent, getPreDeleteEvent, getPreUpdateEvent, getRelatedTopic, getRelatedTopics, getRelatedTopics, getRoleModel, getRoleModel1, getRoleModel2, getTopicByType, getType, getUpdateDirective, hasSameRoleTypeUris, indexSimpleValue, matches, preCreate, preDelete, removeProperty, setRoleModel1, setRoleModel2, storeProperty, storeSimpleValue, storeTypeUri, storeUri, updateRoleTypeUri
_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
clone, getOtherPlayerId, getRoleModel, getRoleModel1, getRoleModel2, hasSameRoleTypeUris, matches, setRoleModel1, setRoleModel2
createRoleModel, getChildTopicsModel, getId, getSimpleValue, getTypeUri, getUri, set, setChildTopicsModel, setId, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setSimpleValue, setTypeUri, setUri
private String parentCardinalityUri
private String childCardinalityUri
private ViewConfigurationModelImpl viewConfig
AssociationDefinitionModelImpl(AssociationModelImpl assoc)
AssociationDefinitionModelImpl(AssociationModelImpl assoc, String parentCardinalityUri, String childCardinalityUri, ViewConfigurationModelImpl viewConfig)
assoc
- the underlying association.public String getAssocDefUri()
getAssocDefUri
in interface AssociationDefinitionModel
public String getCustomAssocTypeUri()
getCustomAssocTypeUri
in interface AssociationDefinitionModel
null
if no Custom Association Type is set.public String getInstanceLevelAssocTypeUri()
getInstanceLevelAssocTypeUri
in interface AssociationDefinitionModel
public String getParentTypeUri()
getParentTypeUri
in interface AssociationDefinitionModel
public String getChildTypeUri()
getChildTypeUri
in interface AssociationDefinitionModel
public String getParentCardinalityUri()
getParentCardinalityUri
in interface AssociationDefinitionModel
public String getChildCardinalityUri()
getChildCardinalityUri
in interface AssociationDefinitionModel
public ViewConfigurationModelImpl getViewConfig()
getViewConfig
in interface AssociationDefinitionModel
public void setParentCardinalityUri(String parentCardinalityUri)
setParentCardinalityUri
in interface AssociationDefinitionModel
public void setChildCardinalityUri(String childCardinalityUri)
setChildCardinalityUri
in interface AssociationDefinitionModel
public void setViewConfig(ViewConfigurationModel viewConfig)
setViewConfig
in interface AssociationDefinitionModel
public org.codehaus.jettison.json.JSONObject toJSON()
toJSON
in interface JSONEnabled
toJSON
in class AssociationModelImpl
String className()
className
in class AssociationModelImpl
AssociationDefinitionImpl instantiate()
instantiate
in class AssociationModelImpl
AssociationDefinitionModelImpl createModelWithChildTopics(ChildTopicsModel childTopics)
createModelWithChildTopics
in class AssociationModelImpl
void postUpdate(DMXObjectModel updateModel, DMXObjectModel oldObject)
Pre condition: these 3 assoc def parts are already up-to-date through the generic (model-driven) object update procedure: - Assoc Def type (type URI). - Custom assoc type (child topics). - "Include in Label" flag (child topics).
Called when update() is called on an AssociationDefinitionModel object. This is in 2 cases: - Edit a type interactively (a type topic is selected). - Programmatically call getChildTopics().set() on an AssociationDefinitionModel object, e.g. from a migration.
Not called when an association which also acts as an assoc def is edited interactively (an association is selected). In this case: - Cardinality doesn't need to be updated as Cardinality can't be edited interactively through an association. - Rehashing is already performed in TypeModelImpl#_updateAssocDef (called from AssociationModelImpl#postUpdate)
postUpdate
in class AssociationModelImpl
updateModel
- the update data/instructions.
Note: on post-update time updateModel and this (assoc def) model may differ at least because
a) updateModel might contain only certain assoc def parts; this is called a "partial update"
b) updateModel might contain refs and deletion-refs; this model never contains refsvoid updateParentCardinalityUri(String parentCardinalityUri)
void updateChildCardinalityUri(String childCardinalityUri)
final boolean isIdentityAttr()
final boolean includeInLabel()
boolean isReadable()
private void updateCardinality(AssociationDefinitionModel newAssocDef)
private void updateParentCardinality(String newParentCardinalityUri)
private void updateChildCardinality(String newChildCardinalityUri)
private TopicModelImpl getCustomAssocType()
private String defaultInstanceLevelAssocTypeUri()
Copyright © 2018. All Rights Reserved.