public final class Properties
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static ColumnProperty.Builder |
auditInsertTimeProperty(java.lang.String propertyId) |
static ColumnProperty.Builder |
auditInsertTimeProperty(java.lang.String propertyId,
java.lang.String caption) |
static ColumnProperty.Builder |
auditInsertUserProperty(java.lang.String propertyId) |
static ColumnProperty.Builder |
auditInsertUserProperty(java.lang.String propertyId,
java.lang.String caption) |
static ColumnProperty.Builder |
auditUpdateTimeProperty(java.lang.String propertyId) |
static ColumnProperty.Builder |
auditUpdateTimeProperty(java.lang.String propertyId,
java.lang.String caption) |
static ColumnProperty.Builder |
auditUpdateUserProperty(java.lang.String propertyId) |
static ColumnProperty.Builder |
auditUpdateUserProperty(java.lang.String propertyId,
java.lang.String caption) |
static ColumnProperty.Builder |
booleanProperty(java.lang.String propertyId,
int columnType,
java.lang.Object trueValue,
java.lang.Object falseValue) |
static ColumnProperty.Builder |
booleanProperty(java.lang.String propertyId,
int columnType,
java.lang.String caption,
java.lang.Object trueValue,
java.lang.Object falseValue) |
static <T> ValueConverter<java.lang.Boolean,T> |
booleanValueConverter(T trueValue,
T falseValue) |
static ColumnProperty.Builder |
columnProperty(java.lang.String propertyId) |
static ColumnProperty.Builder |
columnProperty(java.lang.String propertyId,
int type) |
static ColumnProperty.Builder |
columnProperty(java.lang.String propertyId,
int type,
java.lang.String caption) |
static Property.Builder |
denormalizedProperty(java.lang.String propertyId,
java.lang.String foreignKeyPropertyId,
Property denormalizedProperty) |
static Property.Builder |
denormalizedProperty(java.lang.String propertyId,
java.lang.String foreignKeyPropertyId,
Property denormalizedProperty,
java.lang.String caption) |
static TransientProperty.Builder |
denormalizedViewProperty(java.lang.String propertyId,
java.lang.String foreignKeyPropertyId,
Property property,
java.lang.String caption) |
static TransientProperty.Builder |
derivedProperty(java.lang.String propertyId,
int type,
java.lang.String caption,
DerivedProperty.Provider valueProvider,
java.lang.String... linkedPropertyIds) |
static ForeignKeyProperty.Builder |
foreignKeyProperty(java.lang.String propertyId,
java.lang.String caption,
java.lang.String foreignEntityId,
ColumnProperty.Builder columnPropertyBuilder)
Instantiates a
ForeignKeyProperty |
static ForeignKeyProperty.Builder |
foreignKeyProperty(java.lang.String propertyId,
java.lang.String caption,
java.lang.String foreignEntityId,
java.util.List<ColumnProperty.Builder> columnPropertyBuilders)
Instantiates a
ForeignKeyProperty |
static ColumnProperty.Builder |
mirrorProperty(java.lang.String propertyId) |
static ColumnProperty.Builder |
primaryKeyProperty(java.lang.String propertyId) |
static ColumnProperty.Builder |
primaryKeyProperty(java.lang.String propertyId,
int type) |
static ColumnProperty.Builder |
primaryKeyProperty(java.lang.String propertyId,
int type,
java.lang.String caption) |
static java.util.List<Property> |
sort(java.util.List<Property> properties)
Sorts the given properties by caption, or if that is not available, property id, ignoring case
|
static ColumnProperty.Builder |
subqueryProperty(java.lang.String propertyId,
int type,
java.lang.String caption,
java.lang.String subquery) |
static ColumnProperty.Builder |
subqueryProperty(java.lang.String propertyId,
int type,
java.lang.String caption,
java.lang.String subquery,
int columnType) |
static TransientProperty.Builder |
transientProperty(java.lang.String propertyId,
int type) |
static TransientProperty.Builder |
transientProperty(java.lang.String propertyId,
int type,
java.lang.String caption) |
static ColumnProperty.Builder |
valueListProperty(java.lang.String propertyId,
int type,
java.lang.String caption,
java.util.List<Item> validItems) |
public static ColumnProperty.Builder columnProperty(java.lang.String propertyId)
propertyId
- the property IDpublic static ColumnProperty.Builder columnProperty(java.lang.String propertyId, int type)
propertyId
- the property IDtype
- the property typepublic static ColumnProperty.Builder columnProperty(java.lang.String propertyId, int type, java.lang.String caption)
propertyId
- the property IDtype
- the property typecaption
- the captionpublic static ColumnProperty.Builder primaryKeyProperty(java.lang.String propertyId)
propertyId
- the property IDpublic static ColumnProperty.Builder primaryKeyProperty(java.lang.String propertyId, int type)
propertyId
- the property IDtype
- the property typepublic static ColumnProperty.Builder primaryKeyProperty(java.lang.String propertyId, int type, java.lang.String caption)
propertyId
- the property IDtype
- the property typecaption
- the captionpublic static ForeignKeyProperty.Builder foreignKeyProperty(java.lang.String propertyId, java.lang.String caption, java.lang.String foreignEntityId, ColumnProperty.Builder columnPropertyBuilder)
ForeignKeyProperty
propertyId
- the property IDcaption
- the captionforeignEntityId
- the ID of the entity referenced by this foreign keycolumnPropertyBuilder
- the underlying column property comprising this foreign keypublic static ForeignKeyProperty.Builder foreignKeyProperty(java.lang.String propertyId, java.lang.String caption, java.lang.String foreignEntityId, java.util.List<ColumnProperty.Builder> columnPropertyBuilders)
ForeignKeyProperty
propertyId
- the property ID, note that this is not a column namecaption
- the property captionforeignEntityId
- the ID of the entity referenced by this foreign keycolumnPropertyBuilders
- the underlying column properties comprising this foreign keypublic static TransientProperty.Builder denormalizedViewProperty(java.lang.String propertyId, java.lang.String foreignKeyPropertyId, Property property, java.lang.String caption)
propertyId
- the ID of the property, this should not be a column name since this property does not
map to a table columnforeignKeyPropertyId
- the ID of the foreign key property from which entity value this property gets its valueproperty
- the property from which this property gets its valuecaption
- the caption of this propertypublic static TransientProperty.Builder derivedProperty(java.lang.String propertyId, int type, java.lang.String caption, DerivedProperty.Provider valueProvider, java.lang.String... linkedPropertyIds)
propertyId
- the property IDtype
- the property typecaption
- the captionvalueProvider
- the object responsible for providing the derived valuelinkedPropertyIds
- the IDs of the properties on whose value this property derives its valuejava.lang.IllegalArgumentException
- in case no linked property IDs are providedpublic static Property.Builder denormalizedProperty(java.lang.String propertyId, java.lang.String foreignKeyPropertyId, Property denormalizedProperty)
propertyId
- the property ID, in case of database properties this should be the underlying column nameforeignKeyPropertyId
- the ID of the foreign key property which references the entity which owns
the denormalized propertydenormalizedProperty
- the property from which this property should get its valuepublic static Property.Builder denormalizedProperty(java.lang.String propertyId, java.lang.String foreignKeyPropertyId, Property denormalizedProperty, java.lang.String caption)
propertyId
- the property ID, in case of database properties this should be the underlying column nameforeignKeyPropertyId
- the ID of the foreign key property which references the entity which owns
the denormalized propertydenormalizedProperty
- the property from which this property should get its valuecaption
- the caption if this propertypublic static ColumnProperty.Builder subqueryProperty(java.lang.String propertyId, int type, java.lang.String caption, java.lang.String subquery)
propertyId
- the property ID, since SubqueryProperties do not map to underlying table columns,
the property ID should not be column name, only be unique for this entitytype
- the data type of this propertycaption
- the caption of this propertysubquery
- the sql querypublic static ColumnProperty.Builder subqueryProperty(java.lang.String propertyId, int type, java.lang.String caption, java.lang.String subquery, int columnType)
propertyId
- the property ID, since SubqueryProperties do not map to underlying table columns,
the property ID should not be column name, only be unique for this entitytype
- the data type of this propertycaption
- the caption of this propertysubquery
- the sql querycolumnType
- the actual column typepublic static ColumnProperty.Builder valueListProperty(java.lang.String propertyId, int type, java.lang.String caption, java.util.List<Item> validItems)
propertyId
- the property IDtype
- the data type of this propertycaption
- the property captionvalidItems
- all allowed values for this propertypublic static TransientProperty.Builder transientProperty(java.lang.String propertyId, int type)
propertyId
- the property ID, since TransientProperties do not map to underlying table columns,
the property ID should not be column name, only be unique for this entitytype
- the data type of this propertypublic static TransientProperty.Builder transientProperty(java.lang.String propertyId, int type, java.lang.String caption)
propertyId
- the property ID, since TransientProperties do not map to underlying table columns,
the property ID should not be column name, only be unique for this entitytype
- the data type of this propertycaption
- the caption of this propertypublic static ColumnProperty.Builder booleanProperty(java.lang.String propertyId, int columnType, java.lang.Object trueValue, java.lang.Object falseValue)
propertyId
- the property IDcolumnType
- the data type of the underlying columntrueValue
- the value representing 'true' in the underlying columnfalseValue
- the value representing 'false' in the underlying columnpublic static ColumnProperty.Builder booleanProperty(java.lang.String propertyId, int columnType, java.lang.String caption, java.lang.Object trueValue, java.lang.Object falseValue)
propertyId
- the property IDcolumnType
- the data type of the underlying columncaption
- the caption of this propertytrueValue
- the value representing 'true' in the underlying columnfalseValue
- the value representing 'false' in the underlying columnpublic static ColumnProperty.Builder auditInsertTimeProperty(java.lang.String propertyId)
propertyId
- the property IDpublic static ColumnProperty.Builder auditInsertTimeProperty(java.lang.String propertyId, java.lang.String caption)
propertyId
- the property IDcaption
- the captionpublic static ColumnProperty.Builder auditUpdateTimeProperty(java.lang.String propertyId)
propertyId
- the property IDpublic static ColumnProperty.Builder auditUpdateTimeProperty(java.lang.String propertyId, java.lang.String caption)
propertyId
- the property IDcaption
- the captionpublic static ColumnProperty.Builder auditInsertUserProperty(java.lang.String propertyId)
propertyId
- the property IDpublic static ColumnProperty.Builder auditInsertUserProperty(java.lang.String propertyId, java.lang.String caption)
propertyId
- the property IDcaption
- the captionpublic static ColumnProperty.Builder auditUpdateUserProperty(java.lang.String propertyId)
propertyId
- the property IDpublic static ColumnProperty.Builder auditUpdateUserProperty(java.lang.String propertyId, java.lang.String caption)
propertyId
- the property IDcaption
- the captionpublic static ColumnProperty.Builder mirrorProperty(java.lang.String propertyId)
propertyId
- the property IDpublic static <T> ValueConverter<java.lang.Boolean,T> booleanValueConverter(T trueValue, T falseValue)
T
- the type of the value used to represent a booleantrueValue
- the value used to represent 'true' in the underlying database, can be nullfalseValue
- the value used to represent 'false' in the underlying database, can be null