Skip navigation links

Oracle Beehive Java Content Repository Java API Reference
Release 1 (1.3)

E11993-02


oracle.ocs.jcr
Interface OracleProperty

All Superinterfaces:
javax.jcr.Item, javax.jcr.Property

public interface OracleProperty
extends javax.jcr.Property

A OracleProperty object represents the smallest granularity of content storage. A property must have one and only one parent node. A property does not have children. When we say that node A "has" property B it means that B is a child of A.

A property consists of a name and a value. See OracleValue. Following piece of code shows the operations done on OracleProperty

    // Assume we have node /entName/orgName/wspName/Documents/myFolder and
    // property /entName/orgName/wspName/Documents/myFolder/beehive:createdon 
    // Assume that mySession is the Session obtained after javax.jcr.Repository.login()
    Node myNode = (Node) mySession.getItem("/entName/orgName/wspName/Documents/myFolder");
    Property createdOnProperty = myNode.getProperty(BEEHIVE_CREATEDON);
 

Field Summary
static java.lang.String BEEHIVE_CONTENT
          The beehive:content represents Content Services - content property of document.
static java.lang.String BEEHIVE_CONTENTENCODING
          The beehive:contentencoding represents Content Services - contentencoding property.
static java.lang.String BEEHIVE_CREATEDON
          The beehive:createdon represents Content Services createdOn property.
static java.lang.String BEEHIVE_CREATOR
          The beehive:creator represents Content Services - creator property.
static java.lang.String BEEHIVE_DELETEDBY
          The beehive:deletedBy represents Content Services - deletedBy property.
static java.lang.String BEEHIVE_DELETEDDATE
          The beehive:deletedDate represents Content Services - deletedDate property.
static java.lang.String BEEHIVE_DELETEDENTITYSIZE
          The beehive:deletedEntitySize represents Content Services - deletedEntitySize property.
static java.lang.String BEEHIVE_DELETEDENTITYUUID
          The beehive:deletedEntityUuid represents Content Services - deletedEntityUuid property.
static java.lang.String BEEHIVE_LENGTH
          The beehive:length represents Content Services - length property.
static java.lang.String BEEHIVE_MEDIATYPE
          The beehive:mediatype represents Content Services - mediatype property.
static java.lang.String BEEHIVE_MODIFIEDBY
          The beehive:modifiedby represents Content Services - modifiedby property.
static java.lang.String BEEHIVE_MODIFIEDON
          The beehive:modifiedon represents Content Services - modifiedon property.
static java.lang.String BEEHIVE_NAME
          The beehive:name represents Content Services name property.
static java.lang.String BEEHIVE_ORIGINALNAME
          The beehive:originalName represents Content Services - originalName property.
static java.lang.String BEEHIVE_ORIGINALPARENTUUID
          The beehive:originalParentUuid represents Content Services - originalParentUuid property.
static java.lang.String BEEHIVE_PATH
          The beehive:path represents Content Services - path property.
static java.lang.String BEEHIVE_URL
          The beehive:url represents Content Services - url property.
static java.lang.String JCR_CREATED
          The jcr:created represents created property.
static java.lang.String JCR_FROZENMIXINTYPES
          The jcr:frozenMixinTypes represents frozenMixinTypes property.
static java.lang.String JCR_FROZENPRIMARYTYPE
          The jcr:frozenPrimaryType represents frozenPrimaryType property.
static java.lang.String JCR_FROZENUUID
          The jcr:frozenUuid represents frozenUuid property.
static java.lang.String JCR_PREDECESSORS
          The jcr:predecessors represents predecessors property.
static java.lang.String JCR_SUCCESSORS
          The jcr:successors represents successors property.
static java.lang.String JCR_UUID
          The jcr:uuid represents Content Services - CollabId property.
static java.lang.String JCR_VERSIONABLEUUID
          The jcr:versionableUuid represents versionableUuid property.

 

Method Summary
 boolean getBoolean()
          Returns a boolean representation of the value of this property.
 java.util.Calendar getDate()
          Returns a Calendar representation of the value of this property.
 javax.jcr.nodetype.PropertyDefinition getDefinition()
          Returns the property definition that applies to this property.
 double getDouble()
          Returns a double representation of the value of this property.
 long getLength()
          Returns the length of the value of this property.
 long[] getLengths()
          throws Exception since multivalue properties are not supported.
 long getLong()
          Returns a long representation of the value of this property.
 javax.jcr.Node getNode()
          If this property is of type REFERENCE this method returns the node to which this property refers.
 java.io.InputStream getStream()
          Returns an InputStream representation of the value of this property.
 java.lang.String getString()
          Returns a String representation of the value of this property.
 int getType()
          Returns the type of this Property.
 javax.jcr.Value getValue()
          Returns the value of this property as a generic Value object.
 javax.jcr.Value[] getValues()
          Returns an array of all the values of this property.
 void setValue(boolean value)
          Sets the value of this property to value.
 void setValue(java.util.Calendar value)
          Sets the value of this property to value.
 void setValue(double value)
          Sets the value of this property to value.
 void setValue(java.io.InputStream value)
          Sets the value of this property to value.
 void setValue(long value)
          Sets the value of this property to value.
 void setValue(javax.jcr.Node value)
          This operation throws Exception since setting Reference property is not supported.
 void setValue(java.lang.String value)
          Sets the value of this property to value.
 void setValue(java.lang.String[] values)
          This operation throws Exception since multi-value properties are not supported.
 void setValue(javax.jcr.Value value)
          Sets the value of this property to value.
 void setValue(javax.jcr.Value[] values)
          This operation throws Exception since multi-value properties are not supported.

 

Methods inherited from interface javax.jcr.Item
accept, getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isNode, isSame, refresh, remove, save

 

Field Detail

BEEHIVE_CREATEDON

static final java.lang.String BEEHIVE_CREATEDON
The beehive:createdon represents Content Services createdOn property.
See Also:
Constant Field Values

BEEHIVE_NAME

static final java.lang.String BEEHIVE_NAME
The beehive:name represents Content Services name property.
See Also:
Constant Field Values

BEEHIVE_MODIFIEDBY

static final java.lang.String BEEHIVE_MODIFIEDBY
The beehive:modifiedby represents Content Services - modifiedby property.
See Also:
Constant Field Values

BEEHIVE_MODIFIEDON

static final java.lang.String BEEHIVE_MODIFIEDON
The beehive:modifiedon represents Content Services - modifiedon property.
See Also:
Constant Field Values

BEEHIVE_CREATOR

static final java.lang.String BEEHIVE_CREATOR
The beehive:creator represents Content Services - creator property.
See Also:
Constant Field Values

BEEHIVE_PATH

static final java.lang.String BEEHIVE_PATH
The beehive:path represents Content Services - path property.
See Also:
Constant Field Values

BEEHIVE_CONTENT

static final java.lang.String BEEHIVE_CONTENT
The beehive:content represents Content Services - content property of document.
See Also:
Constant Field Values

BEEHIVE_MEDIATYPE

static final java.lang.String BEEHIVE_MEDIATYPE
The beehive:mediatype represents Content Services - mediatype property.
See Also:
Constant Field Values

BEEHIVE_CONTENTENCODING

static final java.lang.String BEEHIVE_CONTENTENCODING
The beehive:contentencoding represents Content Services - contentencoding property.
See Also:
Constant Field Values

BEEHIVE_LENGTH

static final java.lang.String BEEHIVE_LENGTH
The beehive:length represents Content Services - length property.
See Also:
Constant Field Values

BEEHIVE_URL

static final java.lang.String BEEHIVE_URL
The beehive:url represents Content Services - url property.
See Also:
Constant Field Values

BEEHIVE_DELETEDBY

static final java.lang.String BEEHIVE_DELETEDBY
The beehive:deletedBy represents Content Services - deletedBy property.
See Also:
Constant Field Values

BEEHIVE_DELETEDENTITYUUID

static final java.lang.String BEEHIVE_DELETEDENTITYUUID
The beehive:deletedEntityUuid represents Content Services - deletedEntityUuid property.
See Also:
Constant Field Values

BEEHIVE_DELETEDENTITYSIZE

static final java.lang.String BEEHIVE_DELETEDENTITYSIZE
The beehive:deletedEntitySize represents Content Services - deletedEntitySize property.
See Also:
Constant Field Values

BEEHIVE_DELETEDDATE

static final java.lang.String BEEHIVE_DELETEDDATE
The beehive:deletedDate represents Content Services - deletedDate property.
See Also:
Constant Field Values

BEEHIVE_ORIGINALNAME

static final java.lang.String BEEHIVE_ORIGINALNAME
The beehive:originalName represents Content Services - originalName property.
See Also:
Constant Field Values

BEEHIVE_ORIGINALPARENTUUID

static final java.lang.String BEEHIVE_ORIGINALPARENTUUID
The beehive:originalParentUuid represents Content Services - originalParentUuid property.
See Also:
Constant Field Values

JCR_FROZENPRIMARYTYPE

static final java.lang.String JCR_FROZENPRIMARYTYPE
The jcr:frozenPrimaryType represents frozenPrimaryType property.
See Also:
Constant Field Values

JCR_FROZENMIXINTYPES

static final java.lang.String JCR_FROZENMIXINTYPES
The jcr:frozenMixinTypes represents frozenMixinTypes property.
See Also:
Constant Field Values

JCR_FROZENUUID

static final java.lang.String JCR_FROZENUUID
The jcr:frozenUuid represents frozenUuid property.
See Also:
Constant Field Values

JCR_CREATED

static final java.lang.String JCR_CREATED
The jcr:created represents created property.
See Also:
Constant Field Values

JCR_PREDECESSORS

static final java.lang.String JCR_PREDECESSORS
The jcr:predecessors represents predecessors property.
See Also:
Constant Field Values

JCR_SUCCESSORS

static final java.lang.String JCR_SUCCESSORS
The jcr:successors represents successors property.
See Also:
Constant Field Values

JCR_VERSIONABLEUUID

static final java.lang.String JCR_VERSIONABLEUUID
The jcr:versionableUuid represents versionableUuid property.
See Also:
Constant Field Values

JCR_UUID

static final java.lang.String JCR_UUID
The jcr:uuid represents Content Services - CollabId property.
See Also:
Constant Field Values

Method Detail

setValue

void setValue(javax.jcr.Value value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
Sets the value of this property to value. If this property's property type is not constrained by the node type of its parent node, then the property type is changed to that of the supplied value. If the property type is constrained, then a best-effort conversion is attempted. If conversion fails, a ValueFormatException is thrown immediately (not on save). The change will be persisted (if valid) on save <p/> A ConstraintViolationException will be thrown immediately if the change would violate a node type constraint. <p/> A VersionException will be thrown immediately if this property belongs to a node that is versionable and checked-in <p/> A LockException will be thrown either immediately or on save, if a lock prevents the setting of the value. Implementations may differ on when this validation is performed.
Specified by:
setValue in interface javax.jcr.Property
Parameters:
value - The new value to set the property to.
Throws:
javax.jcr.ValueFormatException - if the type or format of the specified value is incompatible with the type of this property.
javax.jcr.version.VersionException - if this property belongs to a node that is versionable and checked-in this implementation performs this validation immediately instead of waiting until save.
javax.jcr.lock.LockException - if a lock prevents the setting of the value and this implementation performs this validation immediately instead of waiting until save.
javax.jcr.nodetype.ConstraintViolationException - if the change would violate a node-type constraint and this implementation performs this validation immediately instead of waiting until save.
javax.jcr.RepositoryException - if another error occurs.

setValue

void setValue(javax.jcr.Value[] values)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
This operation throws Exception since multi-value properties are not supported.
Specified by:
setValue in interface javax.jcr.Property
Throws:
RepositoryException.
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException

setValue

void setValue(java.lang.String value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
Sets the value of this property to value. Same as setValue(Value value) except that the value is specified as a String.
Specified by:
setValue in interface javax.jcr.Property
Parameters:
value - The new value to set the property to.
Throws:
javax.jcr.ValueFormatException - if the type or format of the specified value is incompatible with the type of this property.
javax.jcr.version.VersionException - if this property belongs to a node that is versionable and checked-in this implementation performs this validation immediately instead of waiting until save.
javax.jcr.lock.LockException - if a lock prevents the setting of the value and this implementation performs this validation immediately instead of waiting until save.
javax.jcr.nodetype.ConstraintViolationException - if the change would violate a node-type constraint and this implementation performs this validation immediately instead of waiting until save.
javax.jcr.RepositoryException - if another error occurs.

setValue

void setValue(java.lang.String[] values)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
This operation throws Exception since multi-value properties are not supported.
Specified by:
setValue in interface javax.jcr.Property
Throws:
RepositoryException.
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException

setValue

void setValue(java.io.InputStream value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
Sets the value of this property to value. Same as setValue(Value value) except that the value is specified as a InputStream.
Specified by:
setValue in interface javax.jcr.Property
Parameters:
value - The new value to set the property to.
Throws:
javax.jcr.ValueFormatException - if the type or format of the specified value is incompatible with the type of this property.
javax.jcr.version.VersionException - if this property belongs to a node that is versionable and checked-in this implementation performs this validation immediately instead of waiting until save.
javax.jcr.lock.LockException - if a lock prevents the setting of the value and this implementation performs this validation immediately instead of waiting until save.
javax.jcr.nodetype.ConstraintViolationException - if the change would violate a node-type constraint and this implementation performs this validation immediately instead of waiting until save.
javax.jcr.RepositoryException - if another error occurs.

setValue

void setValue(long value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
Sets the value of this property to value. Same as setValue(Value value) except that the value is specified as a long.
Specified by:
setValue in interface javax.jcr.Property
Parameters:
value - The new value to set the property to.
Throws:
javax.jcr.ValueFormatException - if the type or format of the specified value is incompatible with the type of this property.
javax.jcr.version.VersionException - if this property belongs to a node that is versionable and checked-in this implementation performs this validation immediately instead of waiting until save.
javax.jcr.lock.LockException - if a lock prevents the setting of the value and this implementation performs this validation immediately instead of waiting until save.
javax.jcr.nodetype.ConstraintViolationException - if the change would violate a node-type constraint and this implementation performs this validation immediately instead of waiting until save.
javax.jcr.RepositoryException - if another error occurs.

setValue

void setValue(double value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
Sets the value of this property to value. Same as setValue(Value value) except that the value is specified as a double.
Specified by:
setValue in interface javax.jcr.Property
Parameters:
value - The new value to set the property to.
Throws:
javax.jcr.ValueFormatException - if the type or format of the specified value is incompatible with the type of this property.
javax.jcr.version.VersionException - if this property belongs to a node that is versionable and checked-in this implementation performs this validation immediately instead of waiting until save.
javax.jcr.lock.LockException - if a lock prevents the setting of the value and this implementation performs this validation immediately instead of waiting until save.
javax.jcr.nodetype.ConstraintViolationException - if the change would violate a node-type constraint and this implementation performs this validation immediately instead of waiting until save.
javax.jcr.RepositoryException - if another error occurs.

setValue

void setValue(java.util.Calendar value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
Sets the value of this property to value. Same as setValue(Value value) except that the value is specified as a Calendar.
Specified by:
setValue in interface javax.jcr.Property
Parameters:
value - The new value to set the property to.
Throws:
javax.jcr.ValueFormatException - if the type or format of the specified value is incompatible with the type of this property.
javax.jcr.version.VersionException - if this property belongs to a node that is versionable and checked-in this implementation performs this validation immediately instead of waiting until save.
javax.jcr.lock.LockException - if a lock prevents the setting of the value and this implementation performs this validation immediately instead of waiting until save.
javax.jcr.nodetype.ConstraintViolationException - if the change would violate a node-type constraint and this implementation performs this validation immediately instead of waiting until save.
javax.jcr.RepositoryException - if another error occurs.

setValue

void setValue(boolean value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
Sets the value of this property to value. Same as setValue(Value value) except that the value is specified as a boolean.
Specified by:
setValue in interface javax.jcr.Property
Parameters:
value - The new value to set the property to.
Throws:
javax.jcr.ValueFormatException - if the type or format of the specified value is incompatible with the type of this property.
javax.jcr.version.VersionException - if this property belongs to a node that is versionable and checked-in this implementation performs this validation immediately instead of waiting until save.
javax.jcr.lock.LockException - if a lock prevents the setting of the value and this implementation performs this validation immediately instead of waiting until save.
javax.jcr.nodetype.ConstraintViolationException - if the change would violate a node-type constraint and this implementation performs this validation immediately instead of waiting until save.
javax.jcr.RepositoryException - if another error occurs.

setValue

void setValue(javax.jcr.Node value)
              throws javax.jcr.ValueFormatException,
                     javax.jcr.version.VersionException,
                     javax.jcr.lock.LockException,
                     javax.jcr.nodetype.ConstraintViolationException,
                     javax.jcr.RepositoryException
This operation throws Exception since setting Reference property is not supported.
Specified by:
setValue in interface javax.jcr.Property
Throws:
RepositoryException.
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException

getValue

javax.jcr.Value getValue()
                         throws javax.jcr.ValueFormatException,
                                javax.jcr.RepositoryException
Returns the value of this property as a generic Value object.

If the property is multi-valued, this method throws a ValueFormatException. <p/> The object returned is a copy of the stored value and is immutable.

Specified by:
getValue in interface javax.jcr.Property
Returns:
the value
Throws:
javax.jcr.ValueFormatException - if the property is multi-valued.
javax.jcr.RepositoryException - if another error occurs.

getValues

javax.jcr.Value[] getValues()
                            throws javax.jcr.ValueFormatException,
                                   javax.jcr.RepositoryException
Returns an array of all the values of this property. Used to access multi-value properties. If the property is single-valued, this method throws a ValueFormatException. The array returned is a copy of the stored values, so changes to it are not reflected in internal storage.
Specified by:
getValues in interface javax.jcr.Property
Returns:
a Value array
Throws:
javax.jcr.ValueFormatException - if the property is single-valued.
javax.jcr.RepositoryException - if another error occurs.

getString

java.lang.String getString()
                           throws javax.jcr.ValueFormatException,
                                  javax.jcr.RepositoryException
Returns a String representation of the value of this property. A shortcut for Property.getValue().getString(). See Value. If this property is multi-valued, this method throws a ValueFormatException.

If the value of this property cannot be converted to a string, a ValueFormatException is thrown.

A RepositoryException is thrown if another error occurs.

Specified by:
getString in interface javax.jcr.Property
Returns:
A string representation of the value of this property.
Throws:
javax.jcr.ValueFormatException - if conversion to a string is not possible
javax.jcr.RepositoryException - if another error occurs.

getStream

java.io.InputStream getStream()
                              throws javax.jcr.ValueFormatException,
                                     javax.jcr.RepositoryException
Returns an InputStream representation of the value of this property. A shortcut for Property.getValue().getStream(). See Value.

A RepositoryException is thrown if another error occurs.

Specified by:
getStream in interface javax.jcr.Property
Returns:
A stream representation of the value of this property.
Throws:
javax.jcr.ValueFormatException - if the property is multi-valued.
javax.jcr.RepositoryException - if another error occurs

getLong

long getLong()
             throws javax.jcr.ValueFormatException,
                    javax.jcr.RepositoryException
Returns a long representation of the value of this property. A shortcut for Property.getValue().getLong(). See Value.

If the value of this property cannot be converted to a long, a ValueFormatException is thrown.

A RepositoryException is thrown if another error occurs.

Specified by:
getLong in interface javax.jcr.Property
Returns:
A long representation of the value of this property.
Throws:
javax.jcr.ValueFormatException - if conversion to a string is not possible.
javax.jcr.RepositoryException - if another error occurs

getDouble

double getDouble()
                 throws javax.jcr.ValueFormatException,
                        javax.jcr.RepositoryException
Returns a double representation of the value of this property. A shortcut for Property.getValue().getDouble(). See Value. If the value of this property cannot be converted to a double, a ValueFormatException is thrown.

A RepositoryException is thrown if another error occurs.

Specified by:
getDouble in interface javax.jcr.Property
Returns:
A double representation of the value of this property.
Throws:
javax.jcr.ValueFormatException - if conversion to a string is not possible
javax.jcr.RepositoryException - if another error occurs

getDate

java.util.Calendar getDate()
                           throws javax.jcr.ValueFormatException,
                                  javax.jcr.RepositoryException
Returns a Calendar representation of the value of this property. A shortcut for Property.getValue().getDate(). See Value. <p/> The object returned is a copy of the stored value, so changes to it are not reflected in internal storage. <p/> If the value of this property cannot be converted to a date, a ValueFormatException is thrown.

A RepositoryException is thrown if another error occurs.

Specified by:
getDate in interface javax.jcr.Property
Returns:
A date (Calendar object) representation of the value of this property.
Throws:
javax.jcr.ValueFormatException - if conversion to a string is not possible
javax.jcr.RepositoryException - if another error occurs

getBoolean

boolean getBoolean()
                   throws javax.jcr.ValueFormatException,
                          javax.jcr.RepositoryException
Returns a boolean representation of the value of this property. A shortcut for Property.getValue().getBoolean(). See Value.

If the value of this property cannot be converted to a boolean, a ValueFormatException is thrown.

A RepositoryException is thrown if another error occurs.

Specified by:
getBoolean in interface javax.jcr.Property
Returns:
A boolean representation of the value of this property.
Throws:
javax.jcr.ValueFormatException - if conversion to a string is not possible
javax.jcr.RepositoryException - if another error occurs

getNode

javax.jcr.Node getNode()
                       throws javax.jcr.ValueFormatException,
                              javax.jcr.RepositoryException
If this property is of type REFERENCE this method returns the node to which this property refers. If this property is not of type reference, then a ValueFormatException is thrown.

If this property is a REFERENCE property but is currently part of the frozen state of a version in version storage, this method will throw a ValueFormatException.

A RepositoryException is thrown if another error occurs.

Specified by:
getNode in interface javax.jcr.Property
Returns:
the referenced Node
Throws:
javax.jcr.ValueFormatException - if this property cannot be converted to a reference, if the property is multi-valued or if this property is a REFERENCE property but is currently part of the frozen state of a version in version storage.
javax.jcr.RepositoryException - if another error occurs

getLength

long getLength()
               throws javax.jcr.ValueFormatException,
                      javax.jcr.RepositoryException
Returns the length of the value of this property.

Returns the length in bytes if the value is a PropertyType.BINARY, otherwise it returns the number of characters needed to display the value in its string form. <p/> Returns -1 if the implementation cannot determine the length. <p/>

Specified by:
getLength in interface javax.jcr.Property
Returns:
an long.
Throws:
javax.jcr.RepositoryException - if another error occurs.
javax.jcr.ValueFormatException

getLengths

long[] getLengths()
                  throws javax.jcr.ValueFormatException,
                         javax.jcr.RepositoryException
throws Exception since multivalue properties are not supported.
Specified by:
getLengths in interface javax.jcr.Property
Throws:
ValueFormatException.
RepositoryException.
javax.jcr.ValueFormatException
javax.jcr.RepositoryException

getDefinition

javax.jcr.nodetype.PropertyDefinition getDefinition()
                                                    throws javax.jcr.RepositoryException
Returns the property definition that applies to this property.
Specified by:
getDefinition in interface javax.jcr.Property
Returns:
a PropertyDefinition object.
Throws:
javax.jcr.RepositoryException - if an error occurs.
See Also:
NodeType.getPropertyDefinitions()

getType

int getType()
            throws javax.jcr.RepositoryException
Returns the type of this Property. One of: The type returned is that which was set at property creation. Note that for some property p, the type returned by p.getType() may differ from the type returned by p.getDefinition.getRequiredType() only in the case where the latter returns UNDEFINED. The type of a property instance is never UNDEFINED (it must always have some actual type).
Specified by:
getType in interface javax.jcr.Property
Returns:
an int
Throws:
javax.jcr.RepositoryException - if an error occurs

Skip navigation links

Oracle Beehive Java Content Repository Java API Reference
Release 1 (1.3)

E11993-02


Copyright © 2007, 2008, Oracle. All rights reserved.