Interface DomainProperty
- All Superinterfaces:
Comparable<DomainProperty>,org.grails.datastore.mapping.model.PersistentProperty
public interface DomainProperty
extends org.grails.datastore.mapping.model.PersistentProperty, Comparable<DomainProperty>
An API to join the
PersistentProperty to the Validator
to assist with scaffolding-
Method Summary
Modifier and TypeMethodDescriptionorg.grails.datastore.mapping.model.PersistentEntityorg.grails.scaffolding.model.property.Constrainedorg.grails.datastore.mapping.model.PersistentEntityorg.grails.datastore.mapping.model.PersistentPropertyorg.grails.datastore.mapping.model.PersistentPropertybooleanvoidsetRootProperty(org.grails.datastore.mapping.model.PersistentProperty rootProperty) Sets the root propertyMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.grails.datastore.mapping.model.PersistentProperty
getCapitilizedName, getMapping, getName, getOwner, getReader, getType, getWriter, isInherited, isNullable
-
Method Details
-
getPathFromRoot
String getPathFromRoot()- Returns:
- The path of the property from the root domain class
-
getPersistentProperty
org.grails.datastore.mapping.model.PersistentProperty getPersistentProperty()- Returns:
- The
PersistentPropertythat represents this property
-
getDomainClass
org.grails.datastore.mapping.model.PersistentEntity getDomainClass()- Returns:
- The
PersistentEntitythe property belongs to
-
getConstrained
org.grails.scaffolding.model.property.Constrained getConstrained()- Returns:
- The constraints of the property
-
getRootProperty
org.grails.datastore.mapping.model.PersistentProperty getRootProperty()- Returns:
- The root property
-
setRootProperty
void setRootProperty(org.grails.datastore.mapping.model.PersistentProperty rootProperty) Sets the root property- Parameters:
rootProperty- The root property
-
getRootBeanType
Class getRootBeanType()- Returns:
- The class the root property belongs to
-
getBeanType
Class getBeanType()- Returns:
- The class the property belongs to
-
getAssociatedType
Class getAssociatedType()- Returns:
- The type of the association
-
getAssociatedEntity
org.grails.datastore.mapping.model.PersistentEntity getAssociatedEntity()- Returns:
- The associated entity if the property is an assocation
-
isRequired
boolean isRequired()- Returns:
- Whether the property is required
-
getLabelKeys
- Returns:
- i18n message keys to resolve the label of the property
-
getDefaultLabel
String getDefaultLabel()- Returns:
- The default label for the property (natural name)
-