Interface Property

    • Field Detail

      • DEFAULT_MAXIMUM_FRACTION_DIGITS

        static final int DEFAULT_MAXIMUM_FRACTION_DIGITS
        See Also:
        Constant Field Values
      • DEFAULT_FOREIGN_KEY_FETCH_DEPTH

        static final int DEFAULT_FOREIGN_KEY_FETCH_DEPTH
        See Also:
        Constant Field Values
      • MAXIMUM_FRACTION_DIGITS

        static final PropertyValue<Integer> MAXIMUM_FRACTION_DIGITS
        Specifies the default maximum number of fraction digits for double property values
        Note that values are rounded when set.
        Value type: Integer
        Default value: 10
      • BIG_DECIMAL_ROUNDING_MODE

        static final PropertyValue<Integer> BIG_DECIMAL_ROUNDING_MODE
        Specifies the rounding mode used for BigDecimal property values
        Value type: Integer
        Default value: BigDecimal.ROUND_HALF_EVEN
        See Also:
        MAXIMUM_FRACTION_DIGITS
      • TIME_FORMAT

        static final PropertyValue<String> TIME_FORMAT
        The date format pattern to use when showing time values in tables and when creating default time input fields
        Value type: String
        Default value: HH:mm
      • TIMESTAMP_FORMAT

        static final PropertyValue<String> TIMESTAMP_FORMAT
        The date format pattern to use when showing timestamp values in tables and when creating default timestamp input fields
        Value type: String
        Default value: dd-MM-yyyy HH:mm
      • DATE_FORMAT

        static final PropertyValue<String> DATE_FORMAT
        The date format pattern to use when showing date values in tables and when creating default date input fields
        Value type: String
        Default value: dd-MM-yyyy
      • FOREIGN_KEY_FETCH_DEPTH

        static final PropertyValue<Integer> FOREIGN_KEY_FETCH_DEPTH
        Specifies the default foreign key fetch depth
        Value type: Integer
        Default value: 1
      • WILDCARD_CHARACTER

        static final PropertyValue<String> WILDCARD_CHARACTER
        Specifies the wildcard character used by the framework
        Value type: String
        Default value: %
    • Method Detail

      • getEntityId

        String getEntityId()
        Returns:
        the id of the entity this property is associated with
      • getPropertyId

        String getPropertyId()
        The property identifier, should be unique within an Entity. By default this id serves as column name for database properties.
        Returns:
        the id of this property
      • getCaption

        String getCaption()
        Returns:
        the caption
      • getDescription

        String getDescription()
        Returns:
        a String describing this attribute
      • getTypeClass

        Class getTypeClass()
        Returns:
        the Class representing the values of this attribute
      • getBeanProperty

        String getBeanProperty()
        Returns:
        the bean property name associated with this property
      • validateType

        Object validateType​(Object value)
        Parameters:
        value - the value to validate
        Returns:
        the value
        Throws:
        IllegalArgumentException - in case value is of a type incompatible with this property
      • prepareValue

        Object prepareValue​(Object value)
        Prepares the value according to the property configuration, such as rounding to the correct number of fraction digits in case of doubles
        Parameters:
        value - the value to prepare
        Returns:
        the prepared value
      • is

        boolean is​(String propertyId)
        Parameters:
        propertyId - the property ID
        Returns:
        true if this property is of the given type
      • is

        boolean is​(Property property)
        Parameters:
        property - the property
        Returns:
        true if this property is of the given type
      • getType

        int getType()
        Returns:
        the data type (Types) of the value of this property
      • isType

        boolean isType​(int type)
        Parameters:
        type - the type to check (Types)
        Returns:
        true if the type of this property is the one given
      • isNumerical

        boolean isNumerical()
        Returns:
        true if this is a numerical Property, that is, Integer or Double
      • isTemporal

        boolean isTemporal()
        Returns:
        true if this is a time based property, Date (LocalDate), Timestamp (LocalDatetime) or Time (LocalTime)
      • isDate

        boolean isDate()
        Returns:
        true if this is a date property
      • isTimestamp

        boolean isTimestamp()
        Returns:
        true if this is a timestamp property
      • isTime

        boolean isTime()
        Returns:
        true if this is a time property
      • isCharacter

        boolean isCharacter()
        Returns:
        true if this is a character property
      • isString

        boolean isString()
        Returns:
        true if this is a string property
      • isLong

        boolean isLong()
        Returns:
        true if this is a long property
      • isInteger

        boolean isInteger()
        Returns:
        true if this is a integer property
      • isDouble

        boolean isDouble()
        Returns:
        true if this is a double property
      • isBigDecimal

        boolean isBigDecimal()
        Returns:
        true if this is a BigDecimal property
      • isDecimal

        boolean isDecimal()
        Returns:
        true if this is a decimal property
      • isBoolean

        boolean isBoolean()
        Returns:
        true if this is a boolean property
      • isBlob

        boolean isBlob()
        Returns:
        true if this is a blob property
      • hasDefaultValue

        boolean hasDefaultValue()
        Returns:
        true if a default value has been set for this property
      • getDefaultValue

        Object getDefaultValue()
        Returns:
        the default value for this property, if no default value has been set null is returned
        See Also:
        hasDefaultValue()
      • isHidden

        boolean isHidden()
        Returns:
        true if this property should be hidden in table views
      • getMaximumValue

        Double getMaximumValue()
        Returns:
        the maximum allowed value for this property, null if none is defined, only applicable to numerical properties
      • getMinimumValue

        Double getMinimumValue()
        Returns:
        the minimum allowed value for this property, null if none is defined, only applicable to numerical properties
      • getMaximumFractionDigits

        int getMaximumFractionDigits()
        Returns:
        the maximum number of fraction digits to use for this property value, only applicable to properties based on Types.DOUBLE and Types.DECIMAL
      • getPreferredColumnWidth

        int getPreferredColumnWidth()
        Returns:
        the preferred column width of this property in pixels when presented in a table, 0 if none has been specified
      • isNullable

        boolean isNullable()
        Returns:
        true if values associated with this property can be set null
      • getMaximumLength

        int getMaximumLength()
        Returns:
        the maximum length of this property value, -1 is returned if the max length is undefined, this applies to String (varchar) based properties
      • getMnemonic

        Character getMnemonic()
        Returns:
        the mnemonic to use when creating a label for this property
      • getFormat

        Format getFormat()
        Returns:
        the Format object used to format the value of properties when being presented
      • getDateTimeFormatPattern

        String getDateTimeFormatPattern()
        Returns:
        the date/time format pattern
      • getDateTimeFormatter

        DateTimeFormatter getDateTimeFormatter()
        Returns:
        the DateTimeFormatter for this property or null if this is not a date/time based property