Class MetaProperty

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<MetaMember>
    Direct Known Subclasses:
    MetaViewAction, PropertiesSeparator

    public class MetaProperty
    extends MetaMember
    implements java.lang.Cloneable
    Author:
    Javier Paniza; modified by Radoslaw OStrzycki, Newitech Sp. z o.o.
    See Also:
    Serialized Form
    • Constructor Detail

      • MetaProperty

        public MetaProperty()
    • Method Detail

      • setLabel

        public void setLabel​(java.lang.String newLabel)
        Overrides:
        setLabel in class MetaMember
      • addValidValue

        public void addValidValue​(java.lang.Object validValue)
      • containsValidValue

        public void containsValidValue​(java.lang.Object value)
      • getValidValueIndex

        public int getValidValueIndex​(java.lang.Object value)
        The first value is 1, to left 0 for no value case.
      • getValidValueLabel

        public java.lang.String getValidValueLabel​(javax.servlet.ServletRequest request,
                                                   int i)
                                            throws XavaException
        Deprecated.
        Use getValidValueLabel(int i) instead
        Deprecated since 3.1.
        Throws:
        XavaException
      • getValidValueLabel

        public java.lang.String getValidValueLabel​(java.util.Locale locale,
                                                   java.lang.Object value)
      • getValidValueLabel

        public java.lang.String getValidValueLabel​(java.lang.Object value)
      • getValidValueLabel

        public java.lang.String getValidValueLabel​(javax.servlet.ServletRequest request,
                                                   java.lang.Object value)
        Deprecated.
        Use getValidValue(Object value) instead
        Deprecated since 3.1.
      • getValidValueLabel

        public java.lang.String getValidValueLabel​(java.util.Locale locale,
                                                   int i)
                                            throws XavaException
        Throws:
        XavaException
      • getQualifiedLabel

        public java.lang.String getQualifiedLabel​(java.util.Locale locale)
                                           throws XavaException
        Throws:
        XavaException
      • getQualifiedLabel

        public java.lang.String getQualifiedLabel​(javax.servlet.ServletRequest request)
                                           throws XavaException
        Throws:
        XavaException
      • getValidValuesLabels

        public java.lang.String getValidValuesLabels​(javax.servlet.ServletRequest request)
        A string with the localized labels separate with '|'.
      • getValidValuesLabels

        public java.lang.String getValidValuesLabels​(java.util.Locale locale)
        A string with the localized labels separate with '|'.
      • getStereotype

        public java.lang.String getStereotype()
      • hasStereotype

        public boolean hasStereotype()
      • getSize

        public int getSize()
                    throws XavaException
        Returns:
        Can return -1 if the datatype does not have length concept
        Throws:
        XavaException
      • hasNotDependentDefaultValueCalculator

        public boolean hasNotDependentDefaultValueCalculator()
        Since:
        5.1
      • createDefaultValueCalculator

        public ICalculator createDefaultValueCalculator()
                                                 throws XavaException
        Returns:
        null if this does not have calculator for default value
        Throws:
        XavaException
      • isDefaultCalculatorHibernateIdGenerator

        public boolean isDefaultCalculatorHibernateIdGenerator()
                                                        throws XavaException
        Throws:
        XavaException
      • getMetaValidators

        public java.util.Collection getMetaValidators()
      • isKey

        public boolean isKey()
      • setKey

        public void setKey​(boolean key)
      • isFilterCapable

        public boolean isFilterCapable()
        Since:
        7.1.4
      • isNotFieldBackedAndNotCalculated

        public boolean isNotFieldBackedAndNotCalculated()
        Since:
        7.1.4
      • setNotFieldBackedAndNotCalculated

        public void setNotFieldBackedAndNotCalculated​(boolean notFieldBackedAndNotCalculated)
      • isCalculated

        public boolean isCalculated()
      • isRequired

        public boolean isRequired()
      • setStereotype

        public void setStereotype​(java.lang.String newStereotype)
      • setRequired

        public void setRequired​(boolean newRequired)
      • setSize

        public void setSize​(int newSize)
      • setScale

        public void setScale​(int newScale)
      • hasValidValues

        public boolean hasValidValues()
      • validate

        public void validate​(Messages errors,
                             java.lang.Object object)
                      throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
      • validate

        public void validate​(Messages errors,
                             java.lang.Object object,
                             boolean creating)
                      throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
      • validate

        public void validate​(Messages errors,
                             java.lang.Object object,
                             boolean creating,
                             java.lang.String container)
                      throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
        Since:
        6.2.1
      • validValues

        public java.util.Iterator validValues()
      • validValuesLabels

        public java.util.Iterator validValuesLabels()
      • validValuesLabels

        public java.util.Iterator validValuesLabels​(javax.servlet.ServletRequest request)
        Deprecated.
        Use validValuesLabels() instead
        Deprecated since 3.1.
      • validValuesLabels

        public java.util.Iterator validValuesLabels​(java.util.Locale locale)
      • setMetaCalculator

        public void setMetaCalculator​(MetaCalculator metaCalculator)
      • setMetaCalculatorDefaultValue

        public void setMetaCalculatorDefaultValue​(MetaCalculator metaCalculatorDefaultValue)
      • getDependentPropertiesNames

        public java.util.Collection getDependentPropertiesNames()
                                                         throws XavaException
        Throws:
        XavaException
      • hasMetaModel

        public boolean hasMetaModel()
      • setReadOnly

        public void setReadOnly​(boolean readOnly)
      • setHidden

        public void setHidden​(boolean hidden)
      • hasCalculatorDefaultValueOnCreate

        public boolean hasCalculatorDefaultValueOnCreate()
      • parse

        public java.lang.Object parse​(java.lang.String value)
                               throws java.text.ParseException,
                                      XavaException
        Convert the argument in a object of type valid for assign to this property.

        Convierte el argumento enviado en un objeto de tipo v�lido para asignar a esta propiedad.

        If argument is primitive return the match wrapper.

        Returns:
        Can be null
        Throws:
        java.text.ParseException
        XavaException
      • parse

        public java.lang.Object parse​(java.lang.String value,
                                      java.util.Locale locale)
                               throws java.text.ParseException,
                                      XavaException
        Convert the argument in a object of type valid for assign to this property.

        If argument is primitive return the match wrapper.

        Returns:
        Can be null
        Throws:
        java.text.ParseException
        XavaException
      • isTypeOrStereotypeCompatibleWith

        @Deprecated
        public boolean isTypeOrStereotypeCompatibleWith​(java.lang.Class type)
        Deprecated.
      • isCompatibleWith

        public boolean isCompatibleWith​(java.lang.Class type)
        Verify if the type, stereotype or any annotation of the property is compatible with the indicated type.
        Since:
        6.6
      • format

        public java.lang.String format​(java.lang.Object value)
                                throws XavaException
        Convert a valid value for this property in a String valid for display to user.

        Returns:
        Can be null.
        Throws:
        XavaException
      • format

        public java.lang.String format​(java.lang.Object value,
                                       java.util.Locale locale)
                                throws XavaException
        Convert a valid value for this property in a String valid for display to user.

        Returns:
        Can be null.
        Throws:
        XavaException
      • addMetaValidator

        public void addMetaValidator​(MetaValidator metaValidator)
      • usesForCalculation

        public boolean usesForCalculation​(java.lang.String qualifiedPropertyName)
      • getPropertiesNamesUsedForCalculation

        public java.util.Set<java.lang.String> getPropertiesNamesUsedForCalculation()
      • toString

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • isVersion

        public boolean isVersion()
      • setVersion

        public void setVersion​(boolean version)
      • isSearchKey

        public boolean isSearchKey()
      • setSearchKey

        public void setSearchKey​(boolean searchKey)
      • getRequiredMessage

        public java.lang.String getRequiredMessage()
      • setRequiredMessage

        public void setRequiredMessage​(java.lang.String requiredMessage)
      • getQualifiedLabel

        public java.lang.String getQualifiedLabel()
      • setQualifiedLabel

        public void setQualifiedLabel​(java.lang.String qualifiedLabel)
      • getCalculation

        public java.lang.String getCalculation()
      • setCalculation

        public void setCalculation​(java.lang.String calculation)
      • hasCalculation

        public boolean hasCalculation()
        Since:
        5.7
      • isFile

        public boolean isFile​(java.lang.Object object)