Class QPropertyDefinitionImpl
java.lang.Object
org.apache.jackrabbit.spi.commons.QItemDefinitionImpl
org.apache.jackrabbit.spi.commons.QPropertyDefinitionImpl
- All Implemented Interfaces:
Serializable,QItemDefinition,QPropertyDefinition
QPropertyDefinitionImpl implements SPI property
definition interface.- See Also:
-
Field Summary
Fields inherited from interface org.apache.jackrabbit.spi.QItemDefinition
EMPTY_ARRAYFields inherited from interface org.apache.jackrabbit.spi.QPropertyDefinition
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionQPropertyDefinitionImpl(PropertyDefinition propDef, NamePathResolver resolver, QValueFactory qValueFactory) Creates a new property definition based onpropDef.QPropertyDefinitionImpl(Name name, Name declaringNodeType, boolean isAutoCreated, boolean isMandatory, int onParentVersion, boolean isProtected, QValue[] defaultValues, boolean isMultiple, int requiredType, QValueConstraint[] valueConstraints, String[] availableQueryOperators, boolean isFullTextSearchable, boolean isQueryOrderable) Creates a new serializable property definition.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines whether this item definition defines a node.booleanCompares two property definitions for equality.String[]Returns the available query operators.QValue[]Returns the array of default values ornullif no default values are defined.intReturns the required type.Returns the array of value constraints.inthashCode()OverridesQItemDefinitionImpl.hashCode().booleanReports whether this property definition is full text searchable.booleanReports whether this property can have multiple values.booleanReports whether this property definition is query-orderable.Methods inherited from class org.apache.jackrabbit.spi.commons.QItemDefinitionImpl
definesResidual, getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtectedMethods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jackrabbit.spi.QItemDefinition
definesResidual, getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected
-
Constructor Details
-
QPropertyDefinitionImpl
Copy constructor.- Parameters:
propDef- some other property definition.
-
QPropertyDefinitionImpl
public QPropertyDefinitionImpl(Name name, Name declaringNodeType, boolean isAutoCreated, boolean isMandatory, int onParentVersion, boolean isProtected, QValue[] defaultValues, boolean isMultiple, int requiredType, QValueConstraint[] valueConstraints, String[] availableQueryOperators, boolean isFullTextSearchable, boolean isQueryOrderable) Creates a new serializable property definition.- Parameters:
name- the name of the child item.declaringNodeType- the declaring node typeisAutoCreated- if this item is auto created.isMandatory- if this is a mandatory item.onParentVersion- the on parent version behaviour.isProtected- if this item is protected.defaultValues- the default values ornullif there are none.isMultiple- if this property is multi-valued.requiredType- the required type for this property.valueConstraints- the value constraints for this property. If none exist an empty array must be passed.availableQueryOperators- the available query operatorsisFullTextSearchable- if this is fulltext searchableisQueryOrderable- if this is queryable- Throws:
NullPointerException- ifvalueConstraintsoravailableQueryOperatorsisnull.- Since:
- JCR 2.0
-
QPropertyDefinitionImpl
public QPropertyDefinitionImpl(PropertyDefinition propDef, NamePathResolver resolver, QValueFactory qValueFactory) throws RepositoryException Creates a new property definition based onpropDef.- Parameters:
propDef- the JCR property definition.resolver- the name/path resolver of the session that provided the property definition.qValueFactory- the QValue factory.- Throws:
RepositoryException- if an error occurs while reading frompropDef.
-
-
Method Details
-
getRequiredType
public int getRequiredType()Returns the required type.- Specified by:
getRequiredTypein interfaceQPropertyDefinition- Returns:
- the required type.
-
getValueConstraints
Returns the array of value constraints.- Specified by:
getValueConstraintsin interfaceQPropertyDefinition- Returns:
- the array of value constraints.
-
getDefaultValues
Returns the array of default values ornullif no default values are defined.- Specified by:
getDefaultValuesin interfaceQPropertyDefinition- Returns:
- the array of default values or
null
-
isMultiple
public boolean isMultiple()Reports whether this property can have multiple values.- Specified by:
isMultiplein interfaceQPropertyDefinition- Returns:
- the 'multiple' flag.
-
getAvailableQueryOperators
Returns the available query operators.- Specified by:
getAvailableQueryOperatorsin interfaceQPropertyDefinition- Returns:
- the available query operators.
-
isFullTextSearchable
public boolean isFullTextSearchable()Reports whether this property definition is full text searchable.- Specified by:
isFullTextSearchablein interfaceQPropertyDefinition- Returns:
trueif this property definition is full text searchable.
-
isQueryOrderable
public boolean isQueryOrderable()Reports whether this property definition is query-orderable.- Specified by:
isQueryOrderablein interfaceQPropertyDefinition- Returns:
trueif this property definition is query-orderable.
-
definesNode
public boolean definesNode()Determines whether this item definition defines a node.- Specified by:
definesNodein interfaceQItemDefinition- Returns:
- always
false
-
equals
Compares two property definitions for equality. Returnstrueif the given object is a property definition and has the same attributes as this property definition.- Overrides:
equalsin classQItemDefinitionImpl- Parameters:
obj- the object to compare this property definition with- Returns:
trueif the object is equal to this property definition,falseotherwise- See Also:
-
hashCode
public int hashCode()OverridesQItemDefinitionImpl.hashCode().- Overrides:
hashCodein classQItemDefinitionImpl- Returns:
- the hash code
-