org.apache.jackrabbit.spi.commons.nodetype
Class PropertyDefinitionImpl

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl
All Implemented Interfaces:
ItemDefinition, PropertyDefinition

public class PropertyDefinitionImpl
extends Object
implements PropertyDefinition

This class implements the PropertyDefinition interface. All method calls are delegated to the wrapped QPropertyDefinition, performing the translation from Names to JCR names (and vice versa) where necessary.


Field Summary
protected static String ANY_NAME
          Literal for 'any name'.
protected  QItemDefinition itemDef
          The wrapped item definition.
protected  AbstractNodeTypeManager ntMgr
          The node type manager of this session.
protected  NamePathResolver resolver
          The namespace resolver used to translate Names to JCR name strings.
 
Constructor Summary
PropertyDefinitionImpl(QPropertyDefinition propDef, AbstractNodeTypeManager ntMgr, NamePathResolver resolver, ValueFactory valueFactory)
           
PropertyDefinitionImpl(QPropertyDefinition propDef, NamePathResolver resolver, ValueFactory valueFactory)
          Package private constructor
 
Method Summary
 boolean equals(Object o)
          
 String[] getAvailableQueryOperators()
           
 NodeType getDeclaringNodeType()
          
 Value[] getDefaultValues()
          
 String getName()
          
 int getOnParentVersion()
          
 int getRequiredType()
          
 String[] getValueConstraints()
          
 int hashCode()
          
 boolean isAutoCreated()
          
 boolean isFullTextSearchable()
           
 boolean isMandatory()
          
 boolean isMultiple()
          
 boolean isProtected()
          
 boolean isQueryOrderable()
           
 QPropertyDefinition unwrap()
          Returns the wrapped property definition.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jcr.nodetype.ItemDefinition
getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected
 

Field Detail

ANY_NAME

protected static final String ANY_NAME
Literal for 'any name'.

See Also:
Constant Field Values

resolver

protected final NamePathResolver resolver
The namespace resolver used to translate Names to JCR name strings.


ntMgr

protected final AbstractNodeTypeManager ntMgr
The node type manager of this session.


itemDef

protected final QItemDefinition itemDef
The wrapped item definition.

Constructor Detail

PropertyDefinitionImpl

public PropertyDefinitionImpl(QPropertyDefinition propDef,
                              NamePathResolver resolver,
                              ValueFactory valueFactory)
Package private constructor

Parameters:
propDef - property definition
resolver - the name-path resolver
valueFactory - a value factory

PropertyDefinitionImpl

public PropertyDefinitionImpl(QPropertyDefinition propDef,
                              AbstractNodeTypeManager ntMgr,
                              NamePathResolver resolver,
                              ValueFactory valueFactory)
Parameters:
propDef - underlying propdef
ntMgr - nodetype manager
resolver - name-path resolver
valueFactory - value factory (for default values)
Method Detail

unwrap

public QPropertyDefinition unwrap()
Returns the wrapped property definition.

Returns:
the wrapped property definition.

getDefaultValues

public Value[] getDefaultValues()

Specified by:
getDefaultValues in interface PropertyDefinition

getRequiredType

public int getRequiredType()

Specified by:
getRequiredType in interface PropertyDefinition

getValueConstraints

public String[] getValueConstraints()

Specified by:
getValueConstraints in interface PropertyDefinition

isMultiple

public boolean isMultiple()

Specified by:
isMultiple in interface PropertyDefinition

getAvailableQueryOperators

public String[] getAvailableQueryOperators()
Specified by:
getAvailableQueryOperators in interface PropertyDefinition
See Also:
PropertyDefinition.getAvailableQueryOperators()

isFullTextSearchable

public boolean isFullTextSearchable()
Specified by:
isFullTextSearchable in interface PropertyDefinition
See Also:
PropertyDefinition.isFullTextSearchable()

isQueryOrderable

public boolean isQueryOrderable()
Specified by:
isQueryOrderable in interface PropertyDefinition
See Also:
PropertyDefinition.isQueryOrderable()

getDeclaringNodeType

public NodeType getDeclaringNodeType()

Specified by:
getDeclaringNodeType in interface ItemDefinition

getName

public String getName()

Specified by:
getName in interface ItemDefinition

getOnParentVersion

public int getOnParentVersion()

Specified by:
getOnParentVersion in interface ItemDefinition

isAutoCreated

public boolean isAutoCreated()

Specified by:
isAutoCreated in interface ItemDefinition

isMandatory

public boolean isMandatory()

Specified by:
isMandatory in interface ItemDefinition

isProtected

public boolean isProtected()

Specified by:
isProtected in interface ItemDefinition

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.