org.jboss.dna.connector.store.jpa.model.basic
Class PropertiesEntity

java.lang.Object
  extended by org.jboss.dna.connector.store.jpa.model.basic.PropertiesEntity

public class PropertiesEntity
extends Object

Represents the packed properties of a single node. Node that the object has the node's identifier and the packed properties, but nothing else. The PropertiesEntity doesn't even have the name. This is because this class is used to read, modify, and save the properties of a node. Finding a node by its name or working with the children, however, requires working with the node children.


Constructor Summary
PropertiesEntity()
           
PropertiesEntity(NodeId id)
           
 
Method Summary
static int deletePropertiesFor(Long workspaceId, String uuid, javax.persistence.EntityManager manager)
          Delete all properties for the node with the supplied UUID.
 boolean equals(Object obj)
          
 byte[] getData()
          Get the data that represents the packed properties.
 NodeId getId()
          Get the node's identifier.
 Collection<LargeValueId> getLargeValues()
           
 int getPropertyCount()
           
 int hashCode()
          
 boolean isCompressed()
           
 boolean isReferentialIntegrityEnforced()
           
 void setCompressed(boolean compressed)
           
 void setData(byte[] data)
          Set the data that represents the packed properties.
 void setId(NodeId id)
          Set the node's identifier.
 void setPropertyCount(int propertyCount)
           
 void setReferentialIntegrityEnforced(boolean referentialIntegrityEnforced)
           
 String toString()
          
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertiesEntity

public PropertiesEntity()

PropertiesEntity

public PropertiesEntity(NodeId id)
Method Detail

getId

public NodeId getId()
Get the node's identifier.

Returns:
the node's identifier

setId

public void setId(NodeId id)
Set the node's identifier.

Parameters:
id - the new identifier for the node

getData

public byte[] getData()
Get the data that represents the packed properties.

Returns:
the raw data representing the properties

setData

public void setData(byte[] data)
Set the data that represents the packed properties.

Parameters:
data - the raw data representing the properties

getPropertyCount

public int getPropertyCount()
Returns:
propertyCount

setPropertyCount

public void setPropertyCount(int propertyCount)
Parameters:
propertyCount - Sets propertyCount to the specified value.

isCompressed

public boolean isCompressed()
Returns:
compressed

setCompressed

public void setCompressed(boolean compressed)
Parameters:
compressed - Sets compressed to the specified value.

getLargeValues

public Collection<LargeValueId> getLargeValues()
Returns:
largeValues

isReferentialIntegrityEnforced

public boolean isReferentialIntegrityEnforced()
Returns:
referentialIntegrityEnforced

setReferentialIntegrityEnforced

public void setReferentialIntegrityEnforced(boolean referentialIntegrityEnforced)
Parameters:
referentialIntegrityEnforced - Sets referentialIntegrityEnforced to the specified value.

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()

deletePropertiesFor

public static int deletePropertiesFor(Long workspaceId,
                                      String uuid,
                                      javax.persistence.EntityManager manager)
Delete all properties for the node with the supplied UUID.

Parameters:
workspaceId - the ID of the workspace; may not be null
uuid - the UUID of the node from which the references start
manager - the manager; may not be null
Returns:
the number of deleted references


Copyright © 2008-2009 JBoss, a division of Red Hat. All Rights Reserved.