Package com.adobe.aem.dermis.model
Class Relationship
- java.lang.Object
-
- com.adobe.aem.dermis.model.Relationship
-
public class Relationship extends java.lang.Object
Represents a relationship between two datamodels where one set of properties is the primary key, and another set is the foreign key.
-
-
Constructor Summary
Constructors Constructor Description Relationship(java.util.List<IProperty> primaryProperties, java.util.List<IProperty> foreignProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsPropertyPair(IProperty pkProperty, IProperty fkProperty)
Determines whether this relationship contains a specific pair of propertiesIDataModel
getForeignDataModel()
Gets the datamodule of the foreign key property(s).java.util.List<IProperty>
getForeignProperties()
Gets the foreign key properties of this relationship.IDataModel
getPrimaryDataModel()
Gets the datamodule of the primary key property(s).java.util.List<IProperty>
getPrimaryProperties()
Gets the primary key properties of this relationship.
-
-
-
Method Detail
-
getPrimaryDataModel
public IDataModel getPrimaryDataModel()
Gets the datamodule of the primary key property(s).- Returns:
- the datamodule of the primary key property(s).
-
getPrimaryProperties
public java.util.List<IProperty> getPrimaryProperties()
Gets the primary key properties of this relationship.- Returns:
- an array of primary key properties.
-
getForeignDataModel
public IDataModel getForeignDataModel()
Gets the datamodule of the foreign key property(s).- Returns:
- the datamodule of the foreign key property(s).
-
getForeignProperties
public java.util.List<IProperty> getForeignProperties()
Gets the foreign key properties of this relationship.- Returns:
- an array of foreign key properties.
-
containsPropertyPair
public boolean containsPropertyPair(IProperty pkProperty, IProperty fkProperty)
Determines whether this relationship contains a specific pair of properties- Parameters:
pkProperty
- primary key propertyfkProperty
- foreign key property- Returns:
- true if this relation contains the specified primary and foreign properties as a part of the relation
-
-