org.jminor.framework.domain
Class Properties
java.lang.Object
org.jminor.framework.domain.Properties
public final class Properties
- extends Object
A Property factory class.
Method Summary |
static Property.AuditTimeProperty |
auditInsertTimeProperty(String propertyID)
|
static Property.AuditTimeProperty |
auditInsertTimeProperty(String propertyID,
String caption)
|
static Property.AuditUserProperty |
auditInsertUserProperty(String propertyID)
|
static Property.AuditUserProperty |
auditInsertUserProperty(String propertyID,
String caption)
|
static Property.AuditTimeProperty |
auditUpdateTimeProperty(String propertyID)
|
static Property.AuditTimeProperty |
auditUpdateTimeProperty(String propertyID,
String caption)
|
static Property.AuditUserProperty |
auditUpdateUserProperty(String propertyID)
|
static Property.AuditUserProperty |
auditUpdateUserProperty(String propertyID,
String caption)
|
static Property.BooleanProperty |
booleanProperty(String propertyID,
int columnType,
String caption)
|
static Property.BooleanProperty |
booleanProperty(String propertyID,
int columnType,
String caption,
Object trueValue,
Object falseValue)
|
static Property.BooleanProperty |
booleanProperty(String propertyID,
String caption)
|
static Property.ColumnProperty |
columnProperty(String propertyID)
|
static Property.ColumnProperty |
columnProperty(String propertyID,
int type)
|
static Property.ColumnProperty |
columnProperty(String propertyID,
int type,
String caption)
|
static Property |
denormalizedProperty(String propertyID,
String foreignKeyPropertyID,
Property denormalizedProperty)
|
static Property |
denormalizedProperty(String propertyID,
String foreignKeyPropertyID,
Property denormalizedProperty,
String caption)
|
static Property.DenormalizedViewProperty |
denormalizedViewProperty(String propertyID,
String foreignKeyPropertyID,
Property property,
String caption)
|
static Property.DerivedProperty |
derivedProperty(String propertyID,
int type,
String caption,
Property.DerivedProperty.Provider valueProvider,
String... linkedPropertyIDs)
|
static Property.ForeignKeyProperty |
foreignKeyProperty(String propertyID,
String caption,
String referencedEntityID,
Property.ColumnProperty referenceProperty)
|
static Property.ForeignKeyProperty |
foreignKeyProperty(String propertyID,
String caption,
String referencedEntityID,
Property.ColumnProperty[] referenceProperties,
String[] referencedPropertyIDs)
|
static Property.MirrorProperty |
mirrorProperty(String propertyID)
|
static Property.PrimaryKeyProperty |
primaryKeyProperty(String propertyID)
|
static Property.PrimaryKeyProperty |
primaryKeyProperty(String propertyID,
int type)
|
static Property.PrimaryKeyProperty |
primaryKeyProperty(String propertyID,
int type,
String caption)
|
static Property.SubqueryProperty |
subqueryProperty(String propertyID,
int type,
String caption,
String subquery)
|
static Property.TransientProperty |
transientProperty(String propertyID,
int type)
|
static Property.TransientProperty |
transientProperty(String propertyID,
int type,
String caption)
|
static Property.ValueListProperty |
valueListProperty(String propertyID,
int type,
String caption,
List<Item<Object>> values)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
columnProperty
public static Property.ColumnProperty columnProperty(String propertyID)
- Parameters:
propertyID
- the property ID
- Returns:
- a new column property
columnProperty
public static Property.ColumnProperty columnProperty(String propertyID,
int type)
- Parameters:
propertyID
- the property IDtype
- the property type
- Returns:
- a new column property
columnProperty
public static Property.ColumnProperty columnProperty(String propertyID,
int type,
String caption)
- Parameters:
propertyID
- the property IDtype
- the property typecaption
- the caption
- Returns:
- a new column property
primaryKeyProperty
public static Property.PrimaryKeyProperty primaryKeyProperty(String propertyID)
- Parameters:
propertyID
- the property ID
- Returns:
- a new primary key property
primaryKeyProperty
public static Property.PrimaryKeyProperty primaryKeyProperty(String propertyID,
int type)
- Parameters:
propertyID
- the property IDtype
- the property type
- Returns:
- a new primary key property
primaryKeyProperty
public static Property.PrimaryKeyProperty primaryKeyProperty(String propertyID,
int type,
String caption)
- Parameters:
propertyID
- the property IDtype
- the property typecaption
- the caption
- Returns:
- a new primary key property
foreignKeyProperty
public static Property.ForeignKeyProperty foreignKeyProperty(String propertyID,
String caption,
String referencedEntityID,
Property.ColumnProperty referenceProperty)
- Parameters:
propertyID
- the property IDcaption
- the captionreferencedEntityID
- the ID of the referenced entityreferenceProperty
- the actual reference property
- Returns:
- a new foreign key property
foreignKeyProperty
public static Property.ForeignKeyProperty foreignKeyProperty(String propertyID,
String caption,
String referencedEntityID,
Property.ColumnProperty[] referenceProperties,
String[] referencedPropertyIDs)
- Parameters:
propertyID
- the property ID, since EntityProperties are meta properties, the property ID should not
be a underlying table column, it must only be unique for this entitycaption
- the property captionreferencedEntityID
- the ID of the referenced entity typereferenceProperties
- the actual column properties involved in the referencereferencedPropertyIDs
- the IDs of the properties referenced, in the same order as the reference properties
- Returns:
- a new foreign key proeprty
denormalizedViewProperty
public static Property.DenormalizedViewProperty denormalizedViewProperty(String propertyID,
String foreignKeyPropertyID,
Property property,
String caption)
- Parameters:
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 property
- Returns:
- a new denormalized view property
derivedProperty
public static Property.DerivedProperty derivedProperty(String propertyID,
int type,
String caption,
Property.DerivedProperty.Provider valueProvider,
String... linkedPropertyIDs)
- Parameters:
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 value
- Returns:
- a new derived property
denormalizedProperty
public static Property denormalizedProperty(String propertyID,
String foreignKeyPropertyID,
Property denormalizedProperty)
- Parameters:
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 value
- Returns:
- a new denormalized property
denormalizedProperty
public static Property denormalizedProperty(String propertyID,
String foreignKeyPropertyID,
Property denormalizedProperty,
String caption)
- Parameters:
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 property
- Returns:
- a new denormalized property
subqueryProperty
public static Property.SubqueryProperty subqueryProperty(String propertyID,
int type,
String caption,
String subquery)
- Parameters:
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 query
- Returns:
- a new subquery property
valueListProperty
public static Property.ValueListProperty valueListProperty(String propertyID,
int type,
String caption,
List<Item<Object>> values)
- Parameters:
propertyID
- the property IDtype
- the data type of this propertycaption
- the property captionvalues
- the values to base this property on
- Returns:
- a new value list property
transientProperty
public static Property.TransientProperty transientProperty(String propertyID,
int type)
- Parameters:
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 property
- Returns:
- a new transient property
transientProperty
public static Property.TransientProperty transientProperty(String propertyID,
int type,
String caption)
- Parameters:
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 property
- Returns:
- a new transient property
booleanProperty
public static Property.BooleanProperty booleanProperty(String propertyID,
String caption)
- Parameters:
propertyID
- the property ID, in case of database properties this should be the underlying column namecaption
- the caption of this property
- Returns:
- a new boolean property
booleanProperty
public static Property.BooleanProperty booleanProperty(String propertyID,
int columnType,
String caption)
- Parameters:
propertyID
- the property ID, in case of database properties this should be the underlying column namecolumnType
- the data type of the underlying columncaption
- the caption of this property
- Returns:
- a new boolean property
booleanProperty
public static Property.BooleanProperty booleanProperty(String propertyID,
int columnType,
String caption,
Object trueValue,
Object falseValue)
- Parameters:
propertyID
- the property ID, in case of database properties this should be the underlying column namecolumnType
- the data type of the underlying columncaption
- the caption of this propertytrueValue
- the Object value representing 'true' in the underlying columnfalseValue
- the Object value representing 'false' in the underlying column
- Returns:
- a new boolean property
auditInsertTimeProperty
public static Property.AuditTimeProperty auditInsertTimeProperty(String propertyID)
- Parameters:
propertyID
- the property ID
- Returns:
- a new audit insert time property
auditInsertTimeProperty
public static Property.AuditTimeProperty auditInsertTimeProperty(String propertyID,
String caption)
- Parameters:
propertyID
- the property IDcaption
- the caption
- Returns:
- a new audit insert time property
auditUpdateTimeProperty
public static Property.AuditTimeProperty auditUpdateTimeProperty(String propertyID)
- Parameters:
propertyID
- the property ID
- Returns:
- a new audit update time property
auditUpdateTimeProperty
public static Property.AuditTimeProperty auditUpdateTimeProperty(String propertyID,
String caption)
- Parameters:
propertyID
- the property IDcaption
- the caption
- Returns:
- a new audit update time property
auditInsertUserProperty
public static Property.AuditUserProperty auditInsertUserProperty(String propertyID)
- Parameters:
propertyID
- the property ID
- Returns:
- a new audit insert user property
auditInsertUserProperty
public static Property.AuditUserProperty auditInsertUserProperty(String propertyID,
String caption)
- Parameters:
propertyID
- the property IDcaption
- the caption
- Returns:
- a new audit insert user property
auditUpdateUserProperty
public static Property.AuditUserProperty auditUpdateUserProperty(String propertyID)
- Parameters:
propertyID
- the property ID
- Returns:
- a new audit update user property
auditUpdateUserProperty
public static Property.AuditUserProperty auditUpdateUserProperty(String propertyID,
String caption)
- Parameters:
propertyID
- the property IDcaption
- the caption
- Returns:
- a new audit update user property
mirrorProperty
public static Property.MirrorProperty mirrorProperty(String propertyID)
- Parameters:
propertyID
- the property ID
- Returns:
- a new mirror property