Class QPropertyDefinitionImpl

java.lang.Object
org.apache.jackrabbit.spi.commons.QItemDefinitionImpl
org.apache.jackrabbit.spi.commons.QPropertyDefinitionImpl
All Implemented Interfaces:
Serializable, QItemDefinition, QPropertyDefinition

public class QPropertyDefinitionImpl extends QItemDefinitionImpl implements QPropertyDefinition
QPropertyDefinitionImpl implements SPI property definition interface.
See Also:
  • Constructor Details

    • QPropertyDefinitionImpl

      public QPropertyDefinitionImpl(QPropertyDefinition propDef)
      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 type
      isAutoCreated - 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 or null if 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 operators
      isFullTextSearchable - if this is fulltext searchable
      isQueryOrderable - if this is queryable
      Throws:
      NullPointerException - if valueConstraints or availableQueryOperators is null.
      Since:
      JCR 2.0
    • QPropertyDefinitionImpl

      public QPropertyDefinitionImpl(PropertyDefinition propDef, NamePathResolver resolver, QValueFactory qValueFactory) throws RepositoryException
      Creates a new property definition based on propDef.
      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 from propDef.
  • Method Details

    • getRequiredType

      public int getRequiredType()
      Returns the required type.
      Specified by:
      getRequiredType in interface QPropertyDefinition
      Returns:
      the required type.
    • getValueConstraints

      public QValueConstraint[] getValueConstraints()
      Returns the array of value constraints.
      Specified by:
      getValueConstraints in interface QPropertyDefinition
      Returns:
      the array of value constraints.
    • getDefaultValues

      public QValue[] getDefaultValues()
      Returns the array of default values or null if no default values are defined.
      Specified by:
      getDefaultValues in interface QPropertyDefinition
      Returns:
      the array of default values or null
    • isMultiple

      public boolean isMultiple()
      Reports whether this property can have multiple values.
      Specified by:
      isMultiple in interface QPropertyDefinition
      Returns:
      the 'multiple' flag.
    • getAvailableQueryOperators

      public String[] getAvailableQueryOperators()
      Returns the available query operators.
      Specified by:
      getAvailableQueryOperators in interface QPropertyDefinition
      Returns:
      the available query operators.
    • isFullTextSearchable

      public boolean isFullTextSearchable()
      Reports whether this property definition is full text searchable.
      Specified by:
      isFullTextSearchable in interface QPropertyDefinition
      Returns:
      true if this property definition is full text searchable.
    • isQueryOrderable

      public boolean isQueryOrderable()
      Reports whether this property definition is query-orderable.
      Specified by:
      isQueryOrderable in interface QPropertyDefinition
      Returns:
      true if this property definition is query-orderable.
    • definesNode

      public boolean definesNode()
      Determines whether this item definition defines a node.
      Specified by:
      definesNode in interface QItemDefinition
      Returns:
      always false
    • equals

      public boolean equals(Object obj)
      Compares two property definitions for equality. Returns true if the given object is a property definition and has the same attributes as this property definition.
      Overrides:
      equals in class QItemDefinitionImpl
      Parameters:
      obj - the object to compare this property definition with
      Returns:
      true if the object is equal to this property definition, false otherwise
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class QItemDefinitionImpl
      Returns:
      the hash code