org.apache.jackrabbit.core
Class ItemData

java.lang.Object
  extended by org.apache.jackrabbit.core.ItemData
Direct Known Subclasses:
AbstractNodeData, PropertyData

public abstract class ItemData
extends Object

Data object referenced by different ItemImpl instances that all represent the same item, i.e. items having the same ItemId.


Constructor Summary
protected ItemData(ItemId id)
          Create a new instance of this class.
protected ItemData(ItemState state, ItemManager itemMgr)
          Create a new instance of this class.
 
Method Summary
 ItemDefinition getDefinition()
          Return the associated item definition.
 ItemId getId()
          Return the id associated with this item.
 NodeId getParentId()
          Return the parent id of this item.
 ItemState getState()
          Return the associated item state.
 int getStatus()
          Return the status.
 boolean isNode()
          Return a flag indicating whether item is a node.
protected  void setDefinition(ItemDefinition definition)
          Set the associated item definition.
protected  void setState(ItemState state)
          Set the associated item state.
protected  void setStatus(int status)
          Set the status.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ItemData

protected ItemData(ItemState state,
                   ItemManager itemMgr)
Create a new instance of this class.

Parameters:
state - item state
itemMgr - item manager

ItemData

protected ItemData(ItemId id)
Create a new instance of this class.

Parameters:
id - item id
Method Detail

getState

public ItemState getState()
Return the associated item state.

Returns:
item state

setState

protected void setState(ItemState state)
Set the associated item state.

Parameters:
state - item state

getDefinition

public ItemDefinition getDefinition()
                             throws RepositoryException
Return the associated item definition.

Returns:
item definition
Throws:
RepositoryException - if the definition cannot be retrieved.

setDefinition

protected void setDefinition(ItemDefinition definition)
Set the associated item definition.

Parameters:
definition - item definition

getStatus

public int getStatus()
Return the status.

Returns:
status

setStatus

protected void setStatus(int status)
Set the status.

Parameters:
status -

isNode

public boolean isNode()
Return a flag indicating whether item is a node.

Returns:
true if this item is a node; false otherwise.

getId

public ItemId getId()
Return the id associated with this item.

Returns:
item id

getParentId

public NodeId getParentId()
Return the parent id of this item.

Returns:
parent id

toString

public String toString()

Overrides:
toString in class Object


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