Class Property

    • Method Detail

      • getEntity

        public Class<?> getEntity()
      • getName

        public String getName()
      • getJavaType

        public Class<?> getJavaType()
      • getGenericType

        public Type getGenericType()
      • getMappedBy

        public String getMappedBy()
      • getTarget

        public Class<?> getTarget()
      • setTarget

        protected void setTarget​(Class<?> target)
      • getTargetName

        public String getTargetName()
      • getTargetSearch

        public List<String> getTargetSearch()
      • getEnumType

        public Class<?> getEnumType()
      • isPrimary

        public boolean isPrimary()
      • isVersion

        public boolean isVersion()
      • isRequired

        public boolean isRequired()
      • isUnique

        public boolean isUnique()
      • isOrphan

        public boolean isOrphan()
      • isEqualsInclude

        public boolean isEqualsInclude()
      • isCopyable

        public boolean isCopyable()
      • isVirtual

        public boolean isVirtual()
      • isTransient

        public boolean isTransient()
      • isJson

        public boolean isJson()
      • isEnum

        public boolean isEnum()
      • isPassword

        public boolean isPassword()
      • isMassUpdate

        public boolean isMassUpdate()
      • isReference

        public boolean isReference()
      • isCollection

        public boolean isCollection()
      • getMaxSize

        public Object getMaxSize()
      • getMinSize

        public Object getMinSize()
      • getPrecision

        public int getPrecision()
      • getScale

        public int getScale()
      • getTitle

        public String getTitle()
      • getHelp

        public String getHelp()
      • isImage

        public boolean isImage()
      • isNullable

        public boolean isNullable()
      • isReadonly

        public boolean isReadonly()
      • isHidden

        public boolean isHidden()
      • isSequence

        public boolean isSequence()
      • isTranslatable

        public boolean isTranslatable()
      • isEncrypted

        public boolean isEncrypted()
      • isDefaultNow

        public boolean isDefaultNow()
      • getSequenceName

        public String getSequenceName()
      • isNameColumn

        public boolean isNameColumn()
      • getNameSearch

        public String[] getNameSearch()
      • getSelection

        public String getSelection()
      • get

        public Object get​(Object bean)
        Get the value of this property from the given bean instance.
        Parameters:
        bean - the instance
        Returns:
        value of the current property
      • set

        public Object set​(Object bean,
                          Object value)
        Set the value for this property to the given bean instance.

        If the property is a collection, ensure the proper parent-child relationship marked with mappedBy attribute.

        Parameters:
        bean - the bean instance
        value - the value for the property
        Returns:
        old value of the property
      • add

        public Object add​(Object bean,
                          Object item)
        If this is a multi-valued field (one-to-many, many-to-many), add the specified item to the collection.
        Parameters:
        bean - the bean instance
        item - collection item
        Returns:
        the same bean instance
      • addAll

        public Object addAll​(Object bean,
                             Collection<?> items)
        If this is a multi-valued field (one-to-many, many-to-many), add all the specified items to the collection.
        Parameters:
        bean - the bean instance
        items - the items to add
        Returns:
        the same bean instance
      • setAssociation

        public <T,​U> U setAssociation​(U child,
                                            T bean)
        If this is a multi-valued field, ensure the proper parent-child relationship if association is bidirectional (marked with mappedBy attribute).
        Type Parameters:
        T - the type of the parent
        U - the type of the child
        Parameters:
        child - the child item
        bean - the parent bean instance
        Returns:
        the updated child instance
      • clear

        public Object clear​(Object bean)
        If this is a multi-valued field, clear the collection values.
        Parameters:
        bean - the bean instance
        Returns:
        the same bean instance
      • valueChanged

        public boolean valueChanged​(Object bean,
                                    Object oldValue)
        Check whether the property value in the given bean is changed.
        Parameters:
        bean - the bean instance to check
        oldValue - the old value to check against
        Returns:
        true if changed false otherwise
      • toMap

        public Map<String,​Object> toMap()
        Create a Map of property attributes. Transient and null valued attributes with be omitted.

        This method should be used to convert property to JSON format.

        Returns:
        map of property attributes