Interface Property<T>

    • 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
      • TIME_FORMAT

        static final PropertyValue<String> TIME_FORMAT
        The default 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
      • DATE_TIME_FORMAT

        static final PropertyValue<String> DATE_TIME_FORMAT
        The default date/time format pattern to use when showing date/time values in tables and when creating default date/time input fields
        Value type: String
        Default value: dd-MM-yyyy HH:mm [month/day order is locale specific]
      • DATE_FORMAT

        static final PropertyValue<String> DATE_FORMAT
        The default 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 [month/day order is locale specific]
      • NUMBER_FORMAT_GROUPING

        static final PropertyValue<Boolean> NUMBER_FORMAT_GROUPING
        Specifies whether number format grouping is used by default
        Value type: Boolean
        Default value: false
      • GROUPING_SEPARATOR

        static final PropertyValue<Character> GROUPING_SEPARATOR
        Specifies the default number grouping separator.
        Value type: Character
        Default value: The grouping separator for the default locale
      • DECIMAL_SEPARATOR

        static final PropertyValue<Character> DECIMAL_SEPARATOR
        Specifies the default number decimal separator.
        Value type: Character
        Default value: The decimal separator for the default locale
      • 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
      • USE_LEXICAL_STRING_COMPARATOR

        static final PropertyValue<Boolean> USE_LEXICAL_STRING_COMPARATOR
        Specifies whether String values should use a lexical comparator by default
        Value type: Boolean
        Default value: true
    • Method Detail

      • attribute

        Attribute<T> attribute()
        The Attribute this property is based on, should be unique within an Entity. By default, the Attribute.name() serves as column name for database properties.
        Returns:
        the attribute this property is based on
      • entityType

        EntityType entityType()
        Returns:
        the type of the entity this Property is associated with
      • caption

        String caption()
        Returns:
        the caption
      • description

        String description()
        Returns:
        a String describing this attribute
      • beanProperty

        String beanProperty()
        Returns:
        the bean property name associated with this property
      • prepareValue

        T prepareValue​(T 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
      • hasDefaultValue

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

        T defaultValue()
        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
      • maximumValue

        Number maximumValue()
        Returns:
        the maximum allowed value for this property, null if none is defined, only applicable to numerical properties
      • minimumValue

        Number minimumValue()
        Returns:
        the minimum allowed value for this property, null if none is defined, only applicable to numerical properties
      • maximumFractionDigits

        int maximumFractionDigits()
        Returns:
        the maximum number of fraction digits to use for this property value, -1 if this property is not based on Types.DOUBLE or Types.DECIMAL
        See Also:
        decimalRoundingMode()
      • preferredColumnWidth

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

        boolean isNullable()
        Returns:
        true if null is a valid value for this property
      • maximumLength

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

        Character mnemonic()
        Returns the mnemonic associated with this property.
        Returns:
        the mnemonic to use when creating a label for this property
      • format

        Format format()
        Returns the Format used when presenting values for this property, null if none has been specified.
        Returns:
        the Format object used to format the value of properties when being presented
      • dateTimePattern

        String dateTimePattern()
        Returns the date time format pattern used when presenting and inputting values for this property.
        Returns:
        the date/time format pattern
      • dateTimeFormatter

        DateTimeFormatter dateTimeFormatter()
        Returns the date time formatter used when presenting and inputting values for this property.
        Returns:
        the DateTimeFormatter for this property or null if this is not a date/time based property
      • comparator

        Comparator<T> comparator()
        Returns:
        the Comparator to use when comparing values for this attribute