public interface SchemaFacetTableRef extends SchemaFacetEnumeration, SchemaNodeExplicitRelationship
osd:tableRef
).
To optimize the validation process of this foreign key constraint, dependencies are automatically determined from its definition.
The following explicit dependencies are automatically defined:
DependenciesDefinitionContext.addDependencyToInsertAndDelete(SchemaNode)
in the default case;DependenciesDefinitionContext.addDependencyToInsertAndDeleteInOtherInstance(Path, AdaptationReference)
,
if this foreign key constraint defines a dataset container;DependenciesDefinitionContext.addDependencyToInsertAndDeleteInOtherInstance(Path, AdaptationReference, HomeKey)
,
if this foreign key constraint defines a dataset container in another dataspace.
For example, if this constraint defines the XPath filter
oid = ${../author_id}
, then a dependency
on the node on the left side, oid
, is defined.
These dependencies can be added by:
DependenciesDefinitionContext.addDependencyToInsertDeleteAndModify(SchemaNode)
,
in the default case;DependenciesDefinitionContext.addDependencyToInsertDeleteAndModifyInOtherInstance(SchemaNode, AdaptationReference)
,
if this foreign key constraint defines an dataset container;DependenciesDefinitionContext.addDependencyToInsertDeleteAndModifyInOtherInstance(SchemaNode, AdaptationReference, HomeKey)
,
if this foreign key constraint defines a dataset container in another dataspace.
In all of the above methods, the SchemaNode
argument is oid
.
Dependencies on modifications to the right side, ${../author_id}
,
are also defined. In this case, the dependency is the
same as: DependenciesDefinitionContext.addDependencyToModify(SchemaNode)
,
where the argument SchemaNode
is ${../author_id}
.
Thus, the validation result of this foreign key constraint only depends upon the updates to the target table that are relevant to these explicit dependencies. The validation result will not be affected by any external events other than changes to the local values concerned.
The dependencies of this foreign key constraint are set to Unknown if this foreign key constraint defines:
Attention:
filter
.
Modifier and Type | Method and Description |
---|---|
HomeKey |
getContainerHome()
Returns the container dataspace of this foreign key constraint,
if an external container in a dataspace is defined
(property
branch ), otherwise returns null . |
AdaptationReference |
getContainerReference()
Returns the reference of the container dataset of this foreign key constraint,
if an external container is defined
(property
container ), otherwise returns null . |
Adaptation |
getLinkedRecord(Adaptation aRecord)
Returns the linked record for the specified record.
|
Adaptation |
getLinkedRecord(ValueContext aContext)
Returns the linked record for the specified context.
|
List<Adaptation> |
getLinkedRecords(Adaptation aRecord)
Returns the linked records for the specified record.
|
List<Adaptation> |
getLinkedRecords(ValueContext aContext)
Returns the linked records for the specified context.
|
AdaptationTable |
getTable(ValueContext aValueContext)
Returns the table referred to by this foreign key constraint.
|
SchemaNode |
getTableNode()
Returns the table node referred to by this foreign key constraint.
|
Path |
getTablePath()
Returns the table path referred to by this foreign key constraint.
|
SchemaNode[] |
getTablePrimaryKeyNodes()
Returns the fields that compose the primary key of the table referred to by this foreign key constraint.
|
Object[] |
getTablePrimaryKeyValues(String aTableRefValue)
Decomposes the specified
osd:tableRef value into the values
it would have in the target table. |
Request |
getTableRefRequest(Adaptation aRecord)
Returns the request of the foreign key constraint, in the context of
the specified record.
|
containsValue, getEnumerationNode, getNomenclature, getPathToNomenclature, getPathToValues, getValues
getDocumentation, getValidationPolicy, isEnumerationList, isEnumerationNomenclature, isEnumerationTableRef, isFacetBoundaryMaxExclusive, isFacetBoundaryMaxInclusive, isFacetBoundaryMinExclusive, isFacetBoundaryMinInclusive, isFacetEnumeration, isFacetExcludeSegment, isFacetExcludeValue, isFacetFractionDigits, isFacetLength, isFacetMaxLength, isFacetMinLength, isFacetOResource, isFacetPattern, isFacetTotalDigits
getExplicitRelationship, getExplicitRelationship, getOwnerNode, getResult, isAssociationLink, isSelectionLink, isTableRefLink
Path getTablePath()
getTableNode()
AdaptationReference getContainerReference()
container
), otherwise returns null
.getContainerReference
in interface SchemaNodeExplicitRelationship
HomeKey getContainerHome()
branch
), otherwise returns null
.getContainerHome
in interface SchemaNodeExplicitRelationship
SchemaNode getTableNode()
getTableNode
in interface SchemaNodeExplicitRelationship
SchemaNode.isTableNode()
AdaptationTable getTable(ValueContext aValueContext)
IllegalArgumentException
- if the specified context is null
.IllegalArgumentException
- if the specified context is not in the same table as the current node
(it is recommended to get this constraint from the specified context, for
example
using ValueContext.getNode(Path)
).InvalidSchemaException
- if the container dataset or dataspace of this foreign key
constraint does not exist in the current repository.UnsupportedOperationException
- if the current table is a history table.SchemaNode.isTableNode()
SchemaNode[] getTablePrimaryKeyNodes()
This method is equivalent to:
SchemaFacetTableRef.getTableNode().getTablePrimaryKeyNodes();
SchemaNode.getTablePrimaryKeyNodes()
Object[] getTablePrimaryKeyValues(String aTableRefValue) throws InvalidPrimaryKeyException, IllegalArgumentException
osd:tableRef
value into the values
it would have in the target table.
This method is equivalent to:
SchemaFacetTableRef.getTableNode().getTablePrimaryKeyValues(aTableRefValue);
InvalidPrimaryKeyException
IllegalArgumentException
getTablePrimaryKeyValues(String)
Request getTableRefRequest(Adaptation aRecord)
UnsupportedOperationException
- if the current table is a history table.Adaptation getLinkedRecord(ValueContext aContext)
null
if the node's value is undefined or refers to a non-existent record.IllegalArgumentException
- if the current node is an aggregated list or is under an aggregated list.IllegalArgumentException
- if the specified context is not in the same data model as the current node
(it is recommended to get this constraint from the specified context, for
example
by using ValueContext.getNode(Path)
).UnsupportedOperationException
- if the current table is a history table.SchemaNodeExplicitRelationship.getResult(Adaptation, com.orchestranetworks.service.Session)
Adaptation getLinkedRecord(Adaptation aRecord)
UnsupportedOperationException
- if the current table is a history table.getLinkedRecord(ValueContext)
,
SchemaNodeExplicitRelationship.getResult(Adaptation, com.orchestranetworks.service.Session)
List<Adaptation> getLinkedRecords(Adaptation aRecord)
null
, if void returns Collections.EMPTY_LIST
.
Returns a flat list with no duplicates if this foreign key constraint
is held by a node that is a list or under a list. That is, the returned list does not
contain other lists of records if this foreign key constraint
is defined by a node embedded in multiple lists.UnsupportedOperationException
- if the current table is a history table.getLinkedRecords(ValueContext)
,
SchemaNodeExplicitRelationship.getResult(Adaptation, com.orchestranetworks.service.Session)
List<Adaptation> getLinkedRecords(ValueContext aContext)
null
, if void returns Collections.EMPTY_LIST
.
Returns a flat list with no duplicates if this foreign key constraint
is held by a node that is a list or under a list. That is, the returned list does not
contain other lists of records if this foreign key constraint
is defined by a node embedded in multiple lists.IllegalArgumentException
- if the current node is not an aggregated list, nor under an aggregated
list.UnsupportedOperationException
- if the current table is a history table.getLinkedRecords(Adaptation)
,
SchemaNodeExplicitRelationship.getResult(Adaptation, com.orchestranetworks.service.Session)