org.apache.jackrabbit.spi.commons
Class QPropertyDefinitionImpl

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

public class QPropertyDefinitionImpl
extends QItemDefinitionImpl
implements QPropertyDefinition

QPropertyDefinitionImpl implements a qualified property definition.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.jackrabbit.spi.commons.QItemDefinitionImpl
ANY_NAME, hashCode
 
Fields inherited from interface org.apache.jackrabbit.spi.QPropertyDefinition
EMPTY_ARRAY
 
Constructor Summary
QPropertyDefinitionImpl(Name name, Name declaringNodeType, boolean isAutoCreated, boolean isMandatory, int onParentVersion, boolean isProtected, QValue[] defaultValues, boolean isMultiple, int requiredType, String[] valueConstraints)
          Creates a new serializable qualified property definition.
QPropertyDefinitionImpl(QPropertyDefinition propDef)
          Copy constructor.
 
Method Summary
 boolean definesNode()
          
 boolean equals(Object obj)
          Compares two property definitions for equality.
 QValue[] getDefaultValues()
          
 int getRequiredType()
          
 String[] getValueConstraints()
          
 int hashCode()
          Overwrites QItemDefinitionImpl.hashCode().
 boolean isMultiple()
          
 
Methods inherited from class org.apache.jackrabbit.spi.commons.QItemDefinitionImpl
definesResidual, getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jackrabbit.spi.QItemDefinition
definesResidual, getDeclaringNodeType, getName, getOnParentVersion, isAutoCreated, isMandatory, isProtected
 

Constructor Detail

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,
                               String[] valueConstraints)
Creates a new serializable qualified property definition.

Parameters:
name - the name of the child item.
declaringNodeType - the delaring 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.
Throws:
NullPointerException - if valueConstraints is null.
Method Detail

getRequiredType

public int getRequiredType()

Specified by:
getRequiredType in interface QPropertyDefinition

getValueConstraints

public String[] getValueConstraints()

Specified by:
getValueConstraints in interface QPropertyDefinition

getDefaultValues

public QValue[] getDefaultValues()

Specified by:
getDefaultValues in interface QPropertyDefinition

isMultiple

public boolean isMultiple()

Specified by:
isMultiple in interface QPropertyDefinition

definesNode

public boolean definesNode()

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 defintion 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:
Object.equals(Object)

hashCode

public int hashCode()
Overwrites QItemDefinitionImpl.hashCode().

Specified by:
hashCode in class QItemDefinitionImpl
Returns:


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