org.jminor.framework.domain
Interface Property.ForeignKeyProperty
- All Superinterfaces:
- Attribute, Property, Property.SearchableProperty
- Enclosing interface:
- Property
public static interface Property.ForeignKeyProperty
- extends Property.SearchableProperty
A wrapper property that represents a reference to another entity, typically but not necessarily based on a foreign key.
These do not map directly to a underlying table column, but wrap the actual column properties involved in the relation.
e.g.: Properties.foreignKeyProperty("reference_fk", Properties.columnProperty("reference_id")), where "reference_id" is the
actual name of the column involved in the reference, but "reference_fk" is simply a descriptive property ID
Nested classes/interfaces inherited from interface org.jminor.framework.domain.Property |
Property.AuditProperty, Property.AuditTimeProperty, Property.AuditUserProperty, Property.BlobProperty, Property.BooleanProperty, Property.ColumnProperty, Property.DenormalizedProperty, Property.DenormalizedViewProperty, Property.DerivedProperty, Property.ForeignKeyProperty, Property.MirrorProperty, Property.PrimaryKeyProperty, Property.SearchableProperty, Property.SubqueryProperty, Property.TransientProperty, Property.ValueListProperty |
Methods inherited from interface org.jminor.framework.domain.Property |
getDefaultValue, getEntityID, getFormat, getMax, getMaximumFractionDigits, getMaxLength, getMin, getMnemonic, getParentProperty, getPreferredColumnWidth, getPropertyID, getType, hasParentProperty, is, is, isBoolean, isCharacter, isDate, isDouble, isHidden, isInteger, isNullable, isNumerical, isReadOnly, isString, isTime, isTimestamp, isType, setDefaultValue, setDescription, setEntityID, setFormat, setHidden, setMax, setMaximumFractionDigits, setMaxLength, setMin, setMnemonic, setNullable, setParentProperty, setPreferredColumnWidth, setReadOnly, setUseNumberFormatGrouping |
getReferencedEntityID
String getReferencedEntityID()
- Returns:
- the ID of the referenced entity
getReferenceProperties
List<Property.ColumnProperty> getReferenceProperties()
- Returns an unmodifiable list containing the actual reference properties,
- Returns:
- the reference properties
isCompositeReference
boolean isCompositeReference()
- Returns:
- true if this reference is based on multiple columns
getReferencedPropertyID
String getReferencedPropertyID(Property referenceProperty)
- Parameters:
referenceProperty
- the ID of the reference property
- Returns:
- the reference property ID
getFetchDepth
int getFetchDepth()
- Returns:
- the default query fetch depth for this foreign key
setFetchDepth
Property.ForeignKeyProperty setFetchDepth(int fetchDepth)
- Parameters:
fetchDepth
- the default query fetch depth for this foreign key
- Returns:
- this ForeignKeyProperty instance