org.apache.jackrabbit.core.state
Class PropertyState

java.lang.Object
  extended byorg.apache.jackrabbit.core.state.ItemState
      extended byorg.apache.jackrabbit.core.state.PropertyState
All Implemented Interfaces:
ItemStateListener, Serializable
Direct Known Subclasses:
VirtualPropertyState

public class PropertyState
extends ItemState

PropertyState represents the state of a Property.

See Also:
Serialized Form

Field Summary
protected  PropDefId defId
           
protected  boolean multiValued
           
protected  QName name
           
protected  int type
           
protected  InternalValue[] values
           
 
Fields inherited from class org.apache.jackrabbit.core.state.ItemState
id, overlayedState, parentUUID, status, STATUS_EXISTING, STATUS_EXISTING_MODIFIED, STATUS_EXISTING_REMOVED, STATUS_NEW, STATUS_STALE_DESTROYED, STATUS_STALE_MODIFIED, STATUS_UNDEFINED
 
Constructor Summary
PropertyState(PropertyState overlayedState, int initialStatus, boolean isTransient)
          Package private constructor
PropertyState(QName name, String parentUUID, int initialStatus, boolean isTransient)
          Package private constructor
 
Method Summary
protected  void copy(ItemState state)
          Copy state information from a state into this state
 PropDefId getDefinitionId()
          Returns the id of the definition applicable to this property state.
 QName getName()
          Returns the name of this property.
 int getType()
          Returns the type of this property.
 InternalValue[] getValues()
          Returns the value(s) of this property.
 boolean isMultiValued()
          Returns true if this property is multi-valued, otherwise false.
 boolean isNode()
          Determines if this item state represents a node.
 void setDefinitionId(PropDefId defId)
          Sets the id of the definition applicable to this property state.
 void setMultiValued(boolean multiValued)
          Sets the flag indicating whether this property is multi-valued.
 void setType(int type)
          Sets the type of this property.
 void setValues(InternalValue[] values)
          Sets the value(s) of this property.
 
Methods inherited from class org.apache.jackrabbit.core.state.ItemState
addListener, connect, discard, disconnect, getId, getOverlayedState, getParentUUID, getStatus, hasOverlayedState, isStale, isTransient, notifyStateCreated, notifyStateDestroyed, notifyStateDiscarded, notifyStateUpdated, reconnect, removeListener, setParentUUID, setStatus, stateCreated, stateDestroyed, stateDiscarded, stateModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected QName name

values

protected InternalValue[] values

type

protected int type

multiValued

protected boolean multiValued

defId

protected PropDefId defId
Constructor Detail

PropertyState

public PropertyState(PropertyState overlayedState,
                     int initialStatus,
                     boolean isTransient)
Package private constructor

Parameters:
overlayedState - the backing property state being overlayed
initialStatus - the initial status of the property state object
isTransient - flag indicating whether this state is transient or not

PropertyState

public PropertyState(QName name,
                     String parentUUID,
                     int initialStatus,
                     boolean isTransient)
Package private constructor

Parameters:
name - name of the property
parentUUID - the uuid of the parent node
initialStatus - the initial status of the property state object
isTransient - flag indicating whether this state is transient or not
Method Detail

copy

protected void copy(ItemState state)
Copy state information from a state into this state

Overrides:
copy in class ItemState
Parameters:
state - source state information

isNode

public boolean isNode()
Determines if this item state represents a node.

Specified by:
isNode in class ItemState
Returns:
always false
See Also:
ItemState.isNode()

getName

public QName getName()
Returns the name of this property.

Returns:
the name of this property.

setType

public void setType(int type)
Sets the type of this property.

Parameters:
type - the type to be set
See Also:
PropertyType

setMultiValued

public void setMultiValued(boolean multiValued)
Sets the flag indicating whether this property is multi-valued.

Parameters:
multiValued - flag indicating whether this property is multi-valued

getType

public int getType()
Returns the type of this property.

Returns:
the type of this property.
See Also:
PropertyType

isMultiValued

public boolean isMultiValued()
Returns true if this property is multi-valued, otherwise false.

Returns:
true if this property is multi-valued, otherwise false.

getDefinitionId

public PropDefId getDefinitionId()
Returns the id of the definition applicable to this property state.

Returns:
the id of the definition

setDefinitionId

public void setDefinitionId(PropDefId defId)
Sets the id of the definition applicable to this property state.

Parameters:
defId - the id of the definition

setValues

public void setValues(InternalValue[] values)
Sets the value(s) of this property.

Parameters:
values - the new values

getValues

public InternalValue[] getValues()
Returns the value(s) of this property.

Returns:
the value(s) of this property.


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