Interface ERForeignKey
- All Superinterfaces:
ADClientAble, ADFindAble, ADHistoryAble, ADM2AttrModifyAble, ELContainerAble, ELContAsgnAble, ELDeleteAble, ELElement, ELNamedElement, ELNamespaceAsgnAble, ELObject, ELShortNameAble, ELUUIDAble, ELValueContainerAble, IMKey, IMKeyRelationship, MECommentAble, MEConstraintAble, MEModelElement, MENamedElement, MENamespaceAsgnAble, MEStereotypeAble, METermAble, MMAttachmentAble, MMCommentContainerAble, MMLabelAble, MMLabelTextAttachmentAble, MMStereotypeAble, MMTextAble
A
ERForeignKey is a collection of attributes of its EREntity.
The foreign key normally implements a relationship by referencing an ERUniqueKey.- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionReference to the foreign key inducing element (generalization or relationship role of the foreign key).Reference to theERGeneralizationSetfor which this foreign key is created.Reference to the entity of the foreign key.Reference to theERRelationshipfor which this foreign key is created.maintain()Runs all maintaining methods for this foreign key in the following order:
maintainAssignForeignKeyAble(...) maintainCreateForeignAttributes(...) maintainHierarchicalPrimaryKey(...)This maintaining method assigns (if not yet assigned) this foreign key to an appropriate role or generalization.
This foreign key's entity shall be known as the FK entity and the referenced unique key's entity as the UK entity.
The first step is to search a generalization which has the FK entity as the specializing entity and the UK entity as the general entity.This maintaining method creates the missed foreign key attributes.If theERForeignKeyis not yet assigned to anIMForeignKeyAble(role or generalization), anERRelationshipwill be created for this foreign key.
Returns the role on the unique key side of the newly-created relationship or null.This method maintains the primary key of the entity of this foreign key, if the foreign key is assigned to a hierarchical relationship.
A hierarchical relationship is either a generalization or a relationship with a weak entity.
All attributes of this foreign key should be part of the primary key in the same entity, unless a primary key with an attribute which is not part of this foreign key already exists.
If necessary, a primary key will be created.voidThis maintaining method sets the not null property of the foreign key attributes according to the assigned role.voidSet the value of Foreign Key ForeignKeyAble.voidSet the value of View GeneralizationSet.voidsetRelationship(ERRelationship value) Set the value of View Relationship.Methods inherited from interface ADClientAble
getAnnotation, getEndAnalysisDia, getLogic, getLogic, getPresentationContext, getSection, getStartAnalysisDiaMethods inherited from interface ADHistoryAble
getCreateTime, getCreator, getHistory, getModifier, getModifyTime, modifyHistory, setHistoryMethods inherited from interface ADM2AttrModifyAble
getTabCell, getTabCellObjectList, getTabCreateTemplate, getTabCreateTemplateObjectList, getTabElement, getTabElementRelshipTypeList, getTabElementRowList, getTabElementRowTypeList, getTabRelshipList, getTabRowList, tabCellModify, tabCreateTemplate, tabElementModifyMethods inherited from interface ELContainerAble
getClientDependency, getOwnedElement, getOwnedElementTransitiveDown, getOwnedElementTransitiveDown, getOwnedElementTransitiveDownAndUnresolved, getOwnedElementTransitiveDownAndUnresolved, getOwnedOrReferencedElementTransitiveDown, getOwnedOrReferencedElementTransitiveDown, getOwnedRelshipBinDirWithTarget, getOwnedRelshipBinDirWithTarget, getRedirectedModelContainer, getRelshipBinDirSource, getSelfAndOwnedElementTransitiveDown, getSelfAndOwnedElementTransitiveDown, getSortedContents, sortContentsMethods inherited from interface ELContAsgnAble
getAsgnKind, getContSortOrder, getFirstOwnerWhichIsConformTo, getOwner, getOwnerTransitive, getOwnerTransitive, getSelfAndOwnerTransitive, getSelfAndOwnerTransitive, getVersionRoot, isTransitiveChildOf, setAsgnKind, setContSortOrder, setOwnerMethods inherited from interface ELDeleteAble
deleteMethods inherited from interface ELElement
duplicateElement, getAssignAbleToVattr, getAssignAbleToVattr, getClientId, getCreateTemplateOfInstance, getDisplayBitmap, getDisplayColor, getDisplayFont, getDisplayLine, getDisplayName, getDisplayNameShort, getDisplayNSName, getElementCache, getElementMappingInformation, getNotificationElement, getQualifiedNamespaceName, getRelshipBinDir, getRelshipBinDir, getRelshipBinDirTarget, getUnitToLock, getValSpecElement, isContainedInProfile, isUnresolved, lockUnit, setUnresolved, unlockUnitMethods inherited from interface ELNamedElement
getName, getNameKind, getQualifiedDisplayName, getQualifiedName, getQualifiedTLName, getSupplierDependency, rename, setName, setNameKindMethods inherited from interface ELNamespaceAsgnAble
getMnClassicTREFName, getNamespace, getNamespaceName, getPath, getSeparator, getVisibility, setUniqueName, setVisibilityMethods inherited from interface ELObject
getId, getLongId, getMetaClass, getMetaName, getOclClass, getSrvCon, hasReadMethods inherited from interface ELShortNameAble
getShortName, getShortNameKind, setShortName, setShortNameKind, setUniqueShortNameMethods inherited from interface ELUUIDAble
getHyperlinkReferenceAble, getInnoRef, getNotToTranslateAttribute, getTranslatedValue, getUUID, setUUIDMethods inherited from interface ELValueContainerAble
getValueReUseAble, setValueReUseAbleMethods inherited from interface IMKey
getAddableProperty, getAddableProperty, getFeatureNames, getOwnedKeyFeature, getOwningClassifier, getProperty, getProperty, hasNullProperty, isCompleteInView, setFeatureNames, setNullMethods inherited from interface IMKeyRelationship
getJoinExpressionFlow, getKeyClassifier, getKeyClassifier, getOwnedKeyRelationshipFeature, getUniqueKey, getUniqueKeyClassifier, getViewFrom, isIdentifying, isMaxOne, isOptional, maintainDeleteForeignProperties, setUniqueKey, setUniqueKeyAndMaintainMethods inherited from interface MECommentAble
getAssignedComment, getAssignedComment, getCommentAssignMethods inherited from interface MEConstraintAble
getAssignedConstraint, getAssignedConstraint, getConstraintAssignMethods inherited from interface MEModelElement
buildProxyConnection, getActivityPartition, getConsider, getContentStereotypeByClass, getCreateTemplateByClass, getDataModel, getDataModelName, getElementColor, getFirstValidContentStereotype, getIgnore, getKnownTypeSystems, getMEModelName, getModelElement, getModelElement, getPresContext, getPresContext, getPresetMapping, getPRPresContent, setElementColorMethods inherited from interface MENamedElement
getMappingSourceElement, getMappingSourceElement, getMESupplierDependency, getMESupplierMappingDependencyMethods inherited from interface MENamespaceAsgnAble
getSignatureMessageMethods inherited from interface MEStereotypeAble
getClientMappingDependency, getDecisionMade, getDecisionOwned, getKnowledgeSourceOfOwner, getMappingTargetElement, getMappingTargetElement, getMEClientDependency, getProxyAsgProperty, getRepresentingArtifact, getRequirementOfStakeholder, getRequirementOfStakeholderOwner, isMapped, setMapped, setRequirementOfStakeholderMethods inherited from interface METermAble
getTerm, setTermMethods inherited from interface MMAttachmentAble
getAssignedAttachment, getAttachmentAssign, getDefaultAttachment, getOwnedAttachment, setDefaultAttachmentMethods inherited from interface MMCommentContainerAble
getOutgoingConceptRealization, getOwnedComment, getRealizedConcept, getRealizedConcept, replaceRealizedConcepts, setRealizedConceptMethods inherited from interface MMLabelAble
getLabel, getLabelBoolValue, getLabelColor, getLabelInfo, getLabelLongValue, getLabelNameValue, getLabelStringValue, getLabelValueByPattern, getLabelValueByPattern, getLabelValueList, getOwnedLabelValSpec, hasLabel, modifyLabelValuesByName, setLabelInfoMethods inherited from interface MMStereotypeAble
assignStereotypeDlg, cloneElement, completelySynchronizeOthers, completelySynchronizeThis, getAttrCnstrEffective, getCreateTemplate, getDisplayType, getExtendingStereotype, getExtendingStereotypeNames, getOwnedFormat, getOwnedStereotypePropertyValSpec, getOwnedStereotypeTSOptionValSpec, getOwnedSyncedElement, getPropBoolValue, getPropLongValue, getPropStringValue, getPropValueList, getStereoPropValueByPattern, getStereoPropValueByPattern, getStereotype, getStereotypeName, getStereotypeProperty, getStereotypePropertyInfo, getStereotypePropertyNameValue, getStereotypeTSOption, getStereotypeTSOptionBoolValue, getStereotypeTSOptionInfo, getStereotypeTSOptionLongValue, getStereotypeTSOptionNameValue, getStereotypeTSOptionStringValue, getStereotypeTSOptionValueByPattern, getStereotypeTSOptionValueByPattern, getStereotypeTSOptionValueList, getSyncedElement, getSyncedStereotypeAble, getSyncedStereotypeAble, isCloneAbleElement, modifyStereotypePropertyValuesByName, modifyStereotypeTSOptionValuesByName, setExtendingStereotype, setStereotype, setStereotypePropertyInfo, setStereotypeTSOptionInfo, setSyncedStereotypeAble
-
Method Details
-
getRelationship
Reference to theERRelationshipfor which this foreign key is created.- Throws:
InoNetExceptionSrvErrorException
-
setRelationship
Set the value of View Relationship.- Parameters:
value- The value to be set.- Throws:
InoNetExceptionSrvErrorException
-
getGeneralizationSet
Reference to theERGeneralizationSetfor which this foreign key is created.- Throws:
InoNetExceptionSrvErrorException
-
setGeneralizationSet
Set the value of View GeneralizationSet.- Parameters:
value- The value to be set.- Throws:
InoNetExceptionSrvErrorException
-
maintainAssignForeignKeyAble
This maintaining method assigns (if not yet assigned) this foreign key to an appropriate role or generalization.
This foreign key's entity shall be known as the FK entity and the referenced unique key's entity as the UK entity.
The first step is to search a generalization which has the FK entity as the specializing entity and the UK entity as the general entity. This generalization must not already have a foreign key in the FK entity. If such a generalization were not found, the next thing to try is to find a role. The role must be a part of a relationship between the FK and UK entity. The FK entity must be the owner of this role. This indicates the foreign key side of a relationship. This role must not already have a foreign key in the FK entity.
If either a generalization or role is found, assign it to this foreign key.
Returns the newly assigned generalization or role.- Throws:
InoNetExceptionSrvErrorException
-
maintain
Runs all maintaining methods for this foreign key in the following order:
maintainAssignForeignKeyAble(...) maintainCreateForeignAttributes(...) maintainHierarchicalPrimaryKey(...)- Throws:
InoNetExceptionSrvErrorException
-
maintainCreateForeignAttributes
List<IMKeyRelationshipFeature> maintainCreateForeignAttributes() throws InoNetException, SrvErrorExceptionThis maintaining method creates the missed foreign key attributes. It looks to the unique key referenced by this foreign key. For all unique key features which have not got a referencing key relationship feature in this foreign key, a new attribute will be created and assigned to this foreign key.
If this foreign key does not have any key relationship features to start with, the sort order of a new key relationship feature will be equal to its referenced unique key feature.
Returns the list of the created key relationship features.- Throws:
InoNetExceptionSrvErrorException
-
maintainCreateRelationship
If theERForeignKeyis not yet assigned to anIMForeignKeyAble(role or generalization), anERRelationshipwill be created for this foreign key.
Returns the role on the unique key side of the newly-created relationship or null.- Throws:
InoNetExceptionSrvErrorException
-
maintainHierarchicalPrimaryKey
This method maintains the primary key of the entity of this foreign key, if the foreign key is assigned to a hierarchical relationship.
A hierarchical relationship is either a generalization or a relationship with a weak entity.
All attributes of this foreign key should be part of the primary key in the same entity, unless a primary key with an attribute which is not part of this foreign key already exists.
If necessary, a primary key will be created. The foreign attributes will be assigned to the primary key.
Returns a list of created elements. These can be the primary key (always returned as first element) and the created unique key features.- Throws:
InoNetExceptionSrvErrorException
-
maintainNotnull
This maintaining method sets the not null property of the foreign key attributes according to the assigned role.- Throws:
InoNetExceptionSrvErrorException
-
getUniqueKeyEntity
- Throws:
InoNetExceptionSrvErrorException
-
getForeignKeyAble
Reference to the foreign key inducing element (generalization or relationship role of the foreign key).- Throws:
InoNetExceptionSrvErrorException
-
setForeignKeyAble
Set the value of Foreign Key ForeignKeyAble.- Parameters:
value- The value to be set.- Throws:
InoNetExceptionSrvErrorException
-
getOwningEntity
Reference to the entity of the foreign key.- Throws:
InoNetExceptionSrvErrorException
-