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

      • getAttribute

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

        EntityType<?> getEntityType()
        Returns:
        the type of the entity this Property is associated with
      • getCaption

        String getCaption()
        Returns:
        the caption
      • getDescription

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

        String getBeanProperty()
        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
      • getDefaultValue

        T 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, -1 if this property is not based on Types.DOUBLE or Types.DECIMAL
        See Also:
        getDecimalRoundingMode()
      • 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 associated with this property.
        Returns:
        the mnemonic to use when creating a label for this property
      • getFormat

        Format getFormat()
        Returns the Format used when presenting values for this property.
        Returns:
        the Format object used to format the value of properties when being presented
      • getDateTimePattern

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

        DateTimeFormatter getDateTimeFormatter()
        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