Package com.avoka.fc.core.entity
Class PropertyType
- java.lang.Object
-
- org.apache.cayenne.PersistentObject
-
- org.apache.cayenne.BaseDataObject
-
- org.apache.cayenne.CayenneDataObject
-
- com.avoka.core.entity.BaseEntity
-
- com.avoka.fc.core.entity.auto._PropertyType
-
- com.avoka.fc.core.entity.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 Summary
Fields Modifier and Type Field Description static String
DATA_TYPE_Boolean
Indicates that the property will accept the values "true" and "false"static String
DATA_TYPE_CSV
Indicates that the property will accept comma-separated values (CSV)static String
DATA_TYPE_HTML
Indicates that the property will accept HTML valuesstatic String
DATA_TYPE_Image
Indicates that the property will accept image datastatic String
DATA_TYPE_JSON
Indicates that the property will accept JSON valuesstatic String
DATA_TYPE_List
Indicates that the property will accept multiple String values which can be ordered using a sequence numberstatic String
DATA_TYPE_LongText
Indicates that the property will accept long formatted textstatic String
DATA_TYPE_Number
Indicates that the property will accept numeric valuesstatic String
DATA_TYPE_String
Indicates that the property will accept String valuesstatic String[]
DATA_TYPES
The full set of possible property data typesstatic String
SCOPE_Client
Indicates that a value for this property can be defined for each clientstatic String
SCOPE_Form
Indicates that a value for this property can be defined for each formstatic String
SCOPE_User
Indicates that a value for this property can be defined for each userstatic String[]
SCOPES
The full set of property type scopesstatic String
USER_Property_Email
The "Email" user propertystatic String
USER_Property_Family_Name
The "Family Name" user propertystatic String
USER_Property_Given_Name
The "Given Name" user propertystatic String
USER_Property_Mobile
The "Mobile" user property-
Fields inherited from class com.avoka.fc.core.entity.auto._PropertyType
CLIENT, CLIENT_PROPERTIES, CLIENT_PROPERTIES_PROPERTY, CLIENT_PROPERTY, DATA_TYPE, DATA_TYPE_PROPERTY, DESCRIPTION, DESCRIPTION_PROPERTY, FORM_DESIGN_VERSION_PROPERTIES, FORM_DESIGN_VERSION_PROPERTIES_PROPERTY, NAME, NAME_PROPERTY, PROPERTY_TYPE_OID_PK_COLUMN, READONLY_FLAG, READONLY_FLAG_PROPERTY, SCOPE, SCOPE_PROPERTY, USER_PROPERTIES, USER_PROPERTIES_PROPERTY, VERSION_PROPERTY_VALUES, VERSION_PROPERTY_VALUES_PROPERTY
-
Fields inherited from class com.avoka.core.entity.BaseEntity
ID_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description PropertyType()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isValid(String type, String value)
Validate a property value of a given type.-
Methods inherited from class com.avoka.fc.core.entity.auto._PropertyType
addToClientProperties, addToFormDesignVersionProperties, addToUserProperties, addToVersionPropertyValues, getClient, getClientProperties, getDataType, getDescription, getFormDesignVersionProperties, getName, getScope, getUserProperties, getVersionPropertyValues, isReadonlyFlag, removeFromClientProperties, removeFromFormDesignVersionProperties, removeFromUserProperties, removeFromVersionPropertyValues, setClient, setDataType, setDescription, setName, setReadonlyFlag, setScope
-
Methods inherited from class com.avoka.core.entity.BaseEntity
appendProperties, getId, getValuesMap, isNew, setId, toString
-
Methods inherited from class org.apache.cayenne.CayenneDataObject
makePath, readPropertyDirectly, readState, setPersistenceState, writePropertyDirectly, writeState
-
Methods inherited from class org.apache.cayenne.BaseDataObject
addToManyTarget, beforePropertyRead, beforePropertyWrite, getSnapshotVersion, readNestedProperty, readProperty, readSerialized, removeToManyTarget, setObjectContext, setReverseRelationship, setSnapshotVersion, setToManyTarget, setToOneTarget, toStringBuffer, unsetReverseRelationship, validateForDelete, validateForInsert, validateForSave, validateForUpdate, willConnect, writeProperty, writeSerialized
-
Methods inherited from class org.apache.cayenne.PersistentObject
getMapKey, getObjectContext, getObjectId, getPersistenceState, setObjectId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.avoka.fc.core.entity.Auditable
getId, getValuesMap
-
-
-
-
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_Email
public static final String USER_Property_Email
The "Email" user property- See Also:
- Constant Field Values
-
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
-
USER_Property_Mobile
public static final String USER_Property_Mobile
The "Mobile" user property- See Also:
- Constant Field Values
-
-
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 ofDATA_TYPES
value
- the value to be validated- Returns:
- true if the value is valid for the given property type
-
-