org.jboss.dna.jcr.cache
Class PropertyInfo

java.lang.Object
  extended by org.jboss.dna.jcr.cache.PropertyInfo

@Immutable
public class PropertyInfo
extends Object

An immutable representation of the name and current value(s) for a property, along with the JCR metadata for the property, including the property definition and property type.

This class is immutable, which means that clients should never hold onto an instance. Instead, clients can obtain an instance by using a PropertyId, quickly use the information in the instance, and then immediately discard their reference. This is because these instances are replaced and discarded whenever anything about the property changes.


Constructor Summary
PropertyInfo(PropertyId propertyId, PropertyDefinitionId definitionId, int propertyType, Property dnaProperty, boolean multiValued, boolean isNew, boolean isModified)
           
 
Method Summary
 boolean equals(Object obj)
          
 PropertyDefinitionId getDefinitionId()
          The identifier for the property definition.
 UUID getNodeUuid()
          Get the UUID of the node to which this property belongs.
 Property getProperty()
          Get the DNA Property, which contains the name and value(s)
 PropertyId getPropertyId()
          Get the durable identifier for this property.
 Name getPropertyName()
          Get the property name.
 int getPropertyType()
          Get the JCR PropertyType for this property.
 int hashCode()
          
 boolean isModified()
          Indicates whether this property/value combination is modified (i.e., exists in the persistent repository with a different value or values).
 boolean isMultiValued()
           
 boolean isNew()
          Indicates whether this property/value combination is new (i.e., does not yet exist in the persistent repository).
 String toString()
          
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyInfo

public PropertyInfo(PropertyId propertyId,
                    PropertyDefinitionId definitionId,
                    int propertyType,
                    Property dnaProperty,
                    boolean multiValued,
                    boolean isNew,
                    boolean isModified)
Method Detail

getPropertyId

public PropertyId getPropertyId()
Get the durable identifier for this property.

Returns:
propertyId

getNodeUuid

public UUID getNodeUuid()
Get the UUID of the node to which this property belongs.

Returns:
the owner node's UUID; never null

getDefinitionId

public PropertyDefinitionId getDefinitionId()
The identifier for the property definition.

Returns:
the property definition ID; never null

getProperty

public Property getProperty()
Get the DNA Property, which contains the name and value(s)

Returns:
the property; never null

getPropertyName

public Name getPropertyName()
Get the property name.

Returns:
the property name; never null

getPropertyType

public int getPropertyType()
Get the JCR PropertyType for this property.

Returns:
the property type

isMultiValued

public boolean isMultiValued()
Returns:
multiValued

isNew

public boolean isNew()
Indicates whether this property/value combination is new (i.e., does not yet exist in the persistent repository).

Returns:
true if the property has not yet been saved to the persistent repository.
See Also:
Item.isNew()

isModified

public boolean isModified()
Indicates whether this property/value combination is modified (i.e., exists in the persistent repository with a different value or values).

Returns:
true if the property has been modified since the last time it was saved to the persistent repository
See Also:
Item.isModified()

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()


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