Class FieldDescriptorImpl

    • Constructor Detail

      • FieldDescriptorImpl

        protected FieldDescriptorImpl()
        Creates a default instance of a field descriptor.
      • FieldDescriptorImpl

        public FieldDescriptorImpl​(java.lang.String fieldName,
                                   TypeInfo typeInfo,
                                   FieldHandler handler,
                                   boolean isTransitive)
        Constructs a new field descriptor.
        Parameters:
        fieldName - The field name
        typeInfo - The field type information
        handler - The field handler (may be null)
        isTransitive - True if the field is transient
    • Method Detail

      • setFieldName

        public final void setFieldName​(java.lang.String fieldName)
        Set the name of the field.
        Parameters:
        fieldName - Field name.
      • setFieldType

        public final void setFieldType​(java.lang.Class<?> fieldType)
        Set the type of the field.
        Parameters:
        fieldType - Field type.
      • setClassDescriptor

        public final void setClassDescriptor​(ClassDescriptor classDescriptor)
        Set the ClassDescriptor for the described field.
        Parameters:
        classDescriptor - The ClassDescriptor for the described field.
      • getClassDescriptor

        public final ClassDescriptor getClassDescriptor()
        Description copied from interface: FieldDescriptor
        Returns the class descriptor related to the field type. If the field type is a class for which a descriptor exists, this descriptor is returned. If the field type is a class for which no mapping is provided, null is returned.
        Specified by:
        getClassDescriptor in interface FieldDescriptor
        Returns:
        The class descriptor of the field type, or null.
        See Also:
        FieldDescriptor.getClassDescriptor()
      • setHandler

        public final void setHandler​(FieldHandler handler)
        Set the FieldHandler for the field being described by this FieldDescriptor.
        Parameters:
        handler - The FieldHandler for the field being described.
      • setTransient

        public final void setTransient​(boolean isTransient)
        Sets whether or not the describled field is 'transient'.
        Parameters:
        isTransient - The flag indicating if the described field is 'transient'.
      • setImmutable

        public final void setImmutable​(boolean immutable)
        Set the immutable flag which indicates that changes to this Field result in a new Object to be created, such as java.lang.String. It serves to identify fields which should not be constructed until all the data is available.
        Parameters:
        immutable - Flag which if true indicates that the field is immutable.
      • setRequired

        public final void setRequired​(boolean required)
        Set whether or not the described field is required.
        Parameters:
        required - The flag indicating whether or not the described field is required.
      • setMultivalued

        public final void setMultivalued​(boolean multivalued)
        Set wheter the object described by this descriptor is multivalued or not.
        Parameters:
        multivalued - True if the object described by this descriptor is multivalued.
      • setIdentity

        public final void setIdentity​(boolean identity)
        Set wether the described field is part of the identity of the class it belongs to.
        Parameters:
        identity - true if field is part of the classes identity.
      • isIdentity

        public final boolean isIdentity()
        Is the described field is part of the identity of the class it belongs to?
        Returns:
        true if field is part of the classes identity.
      • getProperty

        public java.lang.Object getProperty​(java.lang.String name)
        Description copied from interface: PropertyHolder
        Get a property by its name.
        Specified by:
        getProperty in interface PropertyHolder
        Parameters:
        name - of the property
        Returns:
        value of the property
      • setProperty

        public void setProperty​(java.lang.String name,
                                java.lang.Object value)
        Description copied from interface: PropertyHolder
        Set a property specified by the name to the passed value.
        Specified by:
        setProperty in interface PropertyHolder
        Parameters:
        name - of the property
        value - of the property
      • addNature

        public void addNature​(java.lang.String nature)
        Description copied from interface: NatureExtendable
        Adds a specified nature.
        Specified by:
        addNature in interface NatureExtendable
        Parameters:
        nature - ID of the Nature
      • hasNature

        public boolean hasNature​(java.lang.String nature)
        Description copied from interface: NatureExtendable
        Checks if a specified nature has been added.
        Specified by:
        hasNature in interface NatureExtendable
        Parameters:
        nature - ID of the Nature
        Returns:
        true if the Nature ID was added.
      • getComparator

        public java.lang.String getComparator()
      • setComparator

        public void setComparator​(java.lang.String comparator)
      • isDirect

        public boolean isDirect()
      • setDirect

        public void setDirect​(boolean direct)
      • getGetMethod

        public java.lang.String getGetMethod()
      • setGetMethod

        public void setGetMethod​(java.lang.String getMethod)
      • getSetMethod

        public java.lang.String getSetMethod()
      • setSetMethod

        public void setSetMethod​(java.lang.String setMethod)
      • getCreateMethod

        public java.lang.String getCreateMethod()
      • setCreateMethod

        public void setCreateMethod​(java.lang.String createMethod)
      • isLazy

        public boolean isLazy()
      • setLazy

        public void setLazy​(boolean lazy)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object