org.xcmis.spi.model
Class PropertyDefinition<T>

java.lang.Object
  extended by org.xcmis.spi.model.PropertyDefinition<T>

public class PropertyDefinition<T>
extends Object

Version:
$Id: $
Author:
Andrey Parfonov

Constructor Summary
PropertyDefinition()
           
PropertyDefinition(String id, String queryName, String localName, String localNamespace, String displayName, String description, PropertyType propertyType, Updatability updatability, boolean inherited, boolean required, boolean queryable, boolean orderable, Boolean openChoice, boolean multivalued, List<Choice<T>> choices, T[] defaultValue)
           
 
Method Summary
 List<Choice<T>> getChoices()
           
 DateResolution getDateResolution()
           
 Precision getDecimalPrecision()
           
 T[] getDefaultValue()
           
 String getDescription()
          Optional property description.
 String getDisplayName()
          Optional property display name.
 String getId()
           
 Boolean getInherited()
          Is property inherited from the super type or defined directly for type provides property definition.
 String getLocalName()
          Local (internal) property name.
 String getLocalNamespace()
          Local (internal) name-space for property.
 BigDecimal getMaxDecimal()
           
 BigInteger getMaxInteger()
           
 int getMaxLength()
           
 BigDecimal getMinDecimal()
           
 BigInteger getMinInteger()
           
 PropertyType getPropertyType()
           
 String getQueryName()
          Property Query name.
 Updatability getUpdatability()
          When property may be updated.
 boolean isMultivalued()
          Indicates is property id multi-valued or not.
 Boolean isOpenChoice()
          Indicates is choice for property value is open.
 boolean isOrderable()
          Is property orderable.
 boolean isQueryable()
          Is property queryable.
 boolean isRequired()
          Is property required.
 void setChoices(List<Choice<T>> choices)
           
 void setDateResolution(DateResolution dateResolution)
           
 void setDecimalPrecision(Precision decimalPrecision)
           
 void setDefaultValue(T[] defaultValue)
           
 void setDescription(String description)
           
 void setDisplayName(String displayName)
           
 void setId(String id)
           
 void setInherited(boolean inherited)
           
 void setLocalName(String localName)
           
 void setLocalNamespace(String localNamespace)
           
 void setMaxDecimal(BigDecimal maxDecimal)
           
 void setMaxInteger(BigInteger maxInteger)
           
 void setMaxLength(int maxLength)
           
 void setMinDecimal(BigDecimal minDecimal)
           
 void setMinInteger(BigInteger minInteger)
           
 void setMultivalued(boolean multivalued)
           
 void setOpenChoice(Boolean openChoice)
           
 void setOrderable(boolean orderable)
           
 void setPropertyType(PropertyType propertyType)
           
 void setQueryable(boolean queryable)
           
 void setQueryName(String queryName)
           
 void setRequired(boolean required)
           
 void setUpdatability(Updatability updatability)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyDefinition

public PropertyDefinition(String id,
                          String queryName,
                          String localName,
                          String localNamespace,
                          String displayName,
                          String description,
                          PropertyType propertyType,
                          Updatability updatability,
                          boolean inherited,
                          boolean required,
                          boolean queryable,
                          boolean orderable,
                          Boolean openChoice,
                          boolean multivalued,
                          List<Choice<T>> choices,
                          T[] defaultValue)

PropertyDefinition

public PropertyDefinition()
Method Detail

getId

public String getId()
Returns:
property id

getQueryName

public String getQueryName()
Property Query name. It is used in SQL queries as column name.

Returns:
property query name

getLocalName

public String getLocalName()
Local (internal) property name.

Returns:
property local name

getLocalNamespace

public String getLocalNamespace()
Local (internal) name-space for property.

Returns:
property local name-space

getDisplayName

public String getDisplayName()
Optional property display name. It may be used in representation purposes.

Returns:
display name or null if not provided

getDescription

public String getDescription()
Optional property description.

Returns:
property description or null if not provided

getPropertyType

public PropertyType getPropertyType()
Returns:
type of property
See Also:
PropertyType

getUpdatability

public Updatability getUpdatability()
When property may be updated.

Returns:
property updatability
See Also:
Updatability

getInherited

public Boolean getInherited()
Is property inherited from the super type or defined directly for type provides property definition.

Returns:
true if inherited false otherwise

isRequired

public boolean isRequired()
Is property required. If required it minds property may be never set it 'value not set' state.

Returns:
true if property required false otherwise

isQueryable

public boolean isQueryable()
Is property queryable. It indicates can it be used in WHERE clause of SQL statement.

Returns:
true if property queryable false otherwise

isOrderable

public boolean isOrderable()
Is property orderable. It indicates can it be used in ORDER clause of SQL statement.

Returns:
true if property orderable false otherwise

isOpenChoice

public Boolean isOpenChoice()
Indicates is choice for property value is open. If false then value of property must be one of provided by getChoices() If true then value of can be other then provided by method described above. This attribute should be provide only for properties that provides choices (method getChoices() returns other then null or empty list). For other properties this method should return null.

Returns:
true if choice of value of property is open false otherwise and null for properties that not provide choices

getChoices

public List<Choice<T>> getChoices()
Returns:
choices for property value
See Also:
Choice

getDateResolution

public DateResolution getDateResolution()
Returns:
precision supported for DateTime property. There is no sense for properties other then DateTime and should be null

getDecimalPrecision

public Precision getDecimalPrecision()
Returns:
decimal property precision. There is no sense for properties other then BigDecimal and should be null

getDefaultValue

public T[] getDefaultValue()
Returns:
default property value. This value may be used if value for property is not provided

getMaxDecimal

public BigDecimal getMaxDecimal()
Returns:
maximal value for BigDecimal properties. There is no sense for properties other then BigDecimal and should be null. ConstraintException should be throw is application tries set value greater then this value

getMinDecimal

public BigDecimal getMinDecimal()
Returns:
minimal value for BigDecimal properties. There is no sense for properties other then BigDecimal and should be null. ConstraintException should be throw is application tries set value lower then this value

getMaxInteger

public BigInteger getMaxInteger()
Returns:
maximal value for BigInteger properties. There is no sense for properties other then BigInteger and should be null. ConstraintException should be throw is application tries set value greater then this value

getMinInteger

public BigInteger getMinInteger()
Returns:
minimal value for BigInteger properties. There is no sense for properties other then BigInteger and should be null. ConstraintException should be throw is application tries set value lower then this value

getMaxLength

public int getMaxLength()
Returns:
max length for String properties. There is no sense for other property types and should be -1

isMultivalued

public boolean isMultivalued()
Indicates is property id multi-valued or not.

Returns:
true if property is multi-valued and false otherwise

setId

public void setId(String id)

setQueryName

public void setQueryName(String queryName)

setLocalName

public void setLocalName(String localName)

setLocalNamespace

public void setLocalNamespace(String localNamespace)

setDisplayName

public void setDisplayName(String displayName)

setDescription

public void setDescription(String description)

setPropertyType

public void setPropertyType(PropertyType propertyType)

setUpdatability

public void setUpdatability(Updatability updatability)

setInherited

public void setInherited(boolean inherited)

setRequired

public void setRequired(boolean required)

setQueryable

public void setQueryable(boolean queryable)

setOrderable

public void setOrderable(boolean orderable)

setOpenChoice

public void setOpenChoice(Boolean openChoice)

setMultivalued

public void setMultivalued(boolean multivalued)

setChoices

public void setChoices(List<Choice<T>> choices)

setDateResolution

public void setDateResolution(DateResolution dateResolution)

setDecimalPrecision

public void setDecimalPrecision(Precision decimalPrecision)

setDefaultValue

public void setDefaultValue(T[] defaultValue)

setMaxLength

public void setMaxLength(int maxLength)

setMinInteger

public void setMinInteger(BigInteger minInteger)

setMaxInteger

public void setMaxInteger(BigInteger maxInteger)

setMinDecimal

public void setMinDecimal(BigDecimal minDecimal)

setMaxDecimal

public void setMaxDecimal(BigDecimal maxDecimal)


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.