org.jminor.framework.domain
Class Properties

java.lang.Object
  extended by 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
 

Method Detail

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 ID
type - the property type
Returns:
a new column property

columnProperty

public static Property.ColumnProperty columnProperty(String propertyID,
                                                     int type,
                                                     String caption)
Parameters:
propertyID - the property ID
type - the property type
caption - 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 ID
type - 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 ID
type - the property type
caption - 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 ID
caption - the caption
referencedEntityID - the ID of the referenced entity
referenceProperty - 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 entity
caption - the property caption
referencedEntityID - the ID of the referenced entity type
referenceProperties - the actual column properties involved in the reference
referencedPropertyIDs - 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 column
foreignKeyPropertyID - the ID of the foreign key property from which entity value this property gets its value
property - the property from which this property gets its value
caption - 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 ID
type - the property type
caption - the caption
valueProvider - the object responsible for providing the derived value
linkedPropertyIDs - 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 name
foreignKeyPropertyID - the ID of the foreign key property which references the entity which owns the denormalized property
denormalizedProperty - 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 name
foreignKeyPropertyID - the ID of the foreign key property which references the entity which owns the denormalized property
denormalizedProperty - the property from which this property should get its value
caption - 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 entity
type - the data type of this property
caption - the caption of this property
subquery - 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 ID
type - the data type of this property
caption - the property caption
values - 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 entity
type - 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 entity
type - the data type of this property
caption - 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 name
caption - 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 name
columnType - the data type of the underlying column
caption - 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 name
columnType - the data type of the underlying column
caption - the caption of this property
trueValue - the Object value representing 'true' in the underlying column
falseValue - 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 ID
caption - 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 ID
caption - 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 ID
caption - 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 ID
caption - 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