Interface DomainProperty

  • All Superinterfaces:
    org.grails.datastore.mapping.model.PersistentProperty

    public interface DomainProperty
    extends org.grails.datastore.mapping.model.PersistentProperty
    An API to join the PersistentProperty to the Validator to assist with scaffolding
    • Method Detail

      • getPathFromRoot

        java.lang.String getPathFromRoot()
        Returns:
        The path of the property from the root domain class
      • getPersistentProperty

        org.grails.datastore.mapping.model.PersistentProperty getPersistentProperty()
        Returns:
        The PersistentProperty that represents this property
      • getDomainClass

        org.grails.datastore.mapping.model.PersistentEntity getDomainClass()
        Returns:
        The PersistentEntity the 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

        java.lang.Class getRootBeanType()
        Returns:
        The class the root property belongs to
      • getBeanType

        java.lang.Class getBeanType()
        Returns:
        The class the property belongs to
      • getAssociatedType

        java.lang.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

        java.util.List<java.lang.String> getLabelKeys()
        Returns:
        i18n message keys to resolve the label of the property
      • getDefaultLabel

        java.lang.String getDefaultLabel()
        Returns:
        The default label for the property (natural name)