Class PropertyType

  • All Implemented Interfaces:
    IEntity, Auditable, Serializable, org.apache.cayenne.DataObject, org.apache.cayenne.Persistent, org.apache.cayenne.Validating

    @CacheGroups("CONFIG")
    public class PropertyType
    extends _PropertyType
    implements Auditable
    Provides a property type that can be assigned concrete values depending on its scope (client, form, user) and data type.
    See Also:
    Serialized Form
    • Field Detail

      • DATA_TYPE_Boolean

        public static final String DATA_TYPE_Boolean
        Indicates that the property will accept the values "true" and "false"
        See Also:
        Constant Field Values
      • DATA_TYPE_CSV

        public static final String DATA_TYPE_CSV
        Indicates that the property will accept comma-separated values (CSV)
        See Also:
        Constant Field Values
      • DATA_TYPE_HTML

        public static final String DATA_TYPE_HTML
        Indicates that the property will accept HTML values
        See Also:
        Constant Field Values
      • DATA_TYPE_Image

        public static final String DATA_TYPE_Image
        Indicates that the property will accept image data
        See Also:
        Constant Field Values
      • DATA_TYPE_JSON

        public static final String DATA_TYPE_JSON
        Indicates that the property will accept JSON values
        See Also:
        Constant Field Values
      • DATA_TYPE_List

        public static final String DATA_TYPE_List
        Indicates that the property will accept multiple String values which can be ordered using a sequence number
        See Also:
        Constant Field Values
      • DATA_TYPE_LongText

        public static final String DATA_TYPE_LongText
        Indicates that the property will accept long formatted text
        See Also:
        Constant Field Values
      • DATA_TYPE_Number

        public static final String DATA_TYPE_Number
        Indicates that the property will accept numeric values
        See Also:
        Constant Field Values
      • DATA_TYPE_String

        public static final String DATA_TYPE_String
        Indicates that the property will accept String values
        See Also:
        Constant Field Values
      • DATA_TYPES

        public static final String[] DATA_TYPES
        The full set of possible property data types
      • SCOPE_User

        public static final String SCOPE_User
        Indicates that a value for this property can be defined for each user
        See Also:
        Constant Field Values
      • SCOPE_Form

        public static final String SCOPE_Form
        Indicates that a value for this property can be defined for each form
        See Also:
        Constant Field Values
      • SCOPE_Client

        public static final String SCOPE_Client
        Indicates that a value for this property can be defined for each client
        See Also:
        Constant Field Values
      • SCOPES

        public static final String[] SCOPES
        The full set of property type scopes
      • USER_Property_Given_Name

        public static final String USER_Property_Given_Name
        The "Given Name" user property
        See Also:
        Constant Field Values
      • USER_Property_Family_Name

        public static final String USER_Property_Family_Name
        The "Family Name" user property
        See Also:
        Constant Field Values
    • Constructor Detail

      • PropertyType

        public PropertyType()
    • Method Detail

      • isValid

        public static boolean isValid​(String type,
                                      String value)
        Validate a property value of a given type.
        Parameters:
        type - the non-null name of the data type to validate against (one of DATA_TYPES
        value - the value to be validated
        Returns:
        true if the value is valid for the given property type