public final class RelationshipsHelper extends Object
Constructor and Description |
---|
RelationshipsHelper() |
Modifier and Type | Method and Description |
---|---|
static RequestResult |
getExplicitRelationshipResult(Adaptation aRecord,
SchemaNode anExplicitRelationshipNode,
Session aSession)
Returns the result of the explicit relationship defined by
the specified node, in the context of
the specified record.
|
static ReverseRelationshipResult |
getInterDatasetReferringRecords(Adaptation aReferencedRecord,
SchemaNode aReferringNode,
Adaptation aReferringDataset,
Session aSession)
Returns the records in the specified referring dataset
that refer to the specified
record through the corresponding foreign key constraint,
selection link or association link.
|
static ReverseRelationshipResult |
getIntraDatasetReferringRecords(Adaptation aReferencedRecord,
SchemaNode aReferringNode,
Session aSession)
Returns the records in the same dataset that refer to the specified
record through the corresponding foreign key constraint,
selection link or association link.
|
public static RequestResult getExplicitRelationshipResult(Adaptation aRecord, SchemaNode anExplicitRelationshipNode, Session aSession)
null
if the specified node does not define
a relationship.
Permissions are applied according to the specified session. As a consequence the result of this relationship contains only the records that can be viewed by the user associated to this session.
IllegalArgumentException
- if the specified Adaptation
is null.IllegalArgumentException
- if the specified Adaptation
is not a record.IllegalArgumentException
- if the specified SchemaNode
is null.IllegalArgumentException
- if the specified Session
is null.IllegalArgumentException
- if the specified SchemaNode
does not define a relationship.IllegalArgumentException
- if the specified record is not in a dataset
that is an instance of the data model containing the specified node.public static ReverseRelationshipResult getIntraDatasetReferringRecords(Adaptation aReferencedRecord, SchemaNode aReferringNode, Session aSession)
Returns null
if the node that
defines the corresponding explicit relationship is not inside a table.
Permissions are applied according to the specified session. As a consequence this method returns only the records that can be viewed by the end-user associated to the specified session.
IllegalArgumentException
- if the specified Adaptation
is null.IllegalArgumentException
- if the specified Adaptation
is not a record.IllegalArgumentException
- if the specified record is not in a dataset
that is an instance of the data model containing the target table node of the
associated relationship.IllegalArgumentException
- if the specified record is not in the table
that is targeted by the corresponding relationship.IllegalArgumentException
- if the specified SchemaNode
is null.IllegalArgumentException
- if the specified SchemaNode
does not define a relationship.IllegalArgumentException
- if the specified Session
is null.sSchemaNodeRelationships.getIntraDatasetReverseRelationships()
public static ReverseRelationshipResult getInterDatasetReferringRecords(Adaptation aReferencedRecord, SchemaNode aReferringNode, Adaptation aReferringDataset, Session aSession)
Returns null
if the node that
defines the corresponding explicit relationship is not inside a table.
or if there is no result in the context
of the specified record.
Permissions are applied according to the specified session. As a consequence this method returns only the records that can be viewed by the end-user associated to the specified session.
IllegalArgumentException
- if the specified Adaptation
is null.IllegalArgumentException
- if the specified Adaptation
is not a record.IllegalArgumentException
- if the specified record is not in a dataset
that is an instance of the data model containing the target table node of the
associated relationship.IllegalArgumentException
- if the specified record is not in the table
that is targeted by the corresponding relationship.IllegalArgumentException
- if the specified Session
is null.IllegalArgumentException
- if the specified SchemaNode
is null.SchemaNodeRelationships.getInterDatasetReverseRelationships()