Java Doc for Property.java in  » 6.0-JDK-Modules » jsr-283 » javax » jcr » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » jsr 283 » javax.jcr 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.jcr.Property

Property
public interface Property extends Item(Code)
A Property object represents the smallest granularity of content storage. It has a single parent node and no children. A property consists of a name and a value, or in the case of multi-value properties, a set of values all of the same type. See Value .




Method Summary
public  BinarygetBinary()
     Returns a Binary representation of the value of this property.
public  booleangetBoolean()
     Returns a boolean representation of the value of this property.
public  CalendargetDate()
     Returns a Calendar representation of the value of this property.
public  BigDecimalgetDecimal()
     Returns a BigDecimal representation of the value of this property.
public  PropertyDefinitiongetDefinition()
     Returns the property definition that applies to this property.
public  doublegetDouble()
     Returns a double representation of the value of this property.
public  longgetLength()
     Returns the length of the value of this property.
public  long[]getLengths()
     Returns an array holding the lengths of the values of this (multi-value) property in bytes if the values are PropertyType.BINARY, otherwise it returns the number of characters needed to display the value in its string form.
public  longgetLong()
     Returns a long representation of the value of this property.
public  NodegetNode()
     If this property is of type REFERENCE, WEAKREFERENCE or PATH (or convertible to one of these types) this method returns the Node to which this property refers.

If this property is of type PATH and it contains a relative path, it is interpreted relative to the parent node of this property.

public  PropertygetProperty()
     If this property is of type PATH (or convertible to this type) this method returns the Property to which this property refers.

If this property contains a relative path, it is interpreted relative to the parent node of this property. For example "." refers to the parent node itself, ".." to the parent of the parent node and "foo" to a sibling property of this property or this property itself.

If no property exists in this workspace at the specified path then an ItemNotFoundException is thrown.

public  InputStreamgetStream()
     Returns an InputStream representation of the value of this property.
public  StringgetString()
     Returns a String representation of the value of this property.
public  intgetType()
     Returns the type of this Property.
public  ValuegetValue()
     Returns the value of this property as a Value object.

If this property is multi-valued, this method throws a ValueFormatException.

The object returned is a copy of the stored value and is immutable.
throws:
  ValueFormatException - if the property is multi-valued.
throws:
  RepositoryException - if another error occurs.

public  Value[]getValues()
     Returns an array of all the values of this property.
public  voidsetValue(Value value)
     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.
public  voidsetValue(Value[] values)
     Sets the value of this property to the values array. 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 values.
public  voidsetValue(String value)
     Sets the value of this property to value.
public  voidsetValue(String[] values)
     Sets the value of this property to the values array.
public  voidsetValue(InputStream value)
     Sets the value of this property to value.
public  voidsetValue(Binary value)
     Sets the value of this property to value.
public  voidsetValue(long value)
     Sets the value of this property to value.
public  voidsetValue(double value)
     Sets the value of this property to value.
public  voidsetValue(BigDecimal value)
     Sets the value of this property to value.
public  voidsetValue(Calendar value)
     Sets the value of this property to value.
public  voidsetValue(boolean value)
     Sets the value of this property to value.
public  voidsetValue(Node value)
     Sets this REFERENCE property to refer to the specified node.



Method Detail
getBinary
public Binary getBinary() throws ValueFormatException, RepositoryException(Code)
Returns a Binary representation of the value of this property. A shortcut for Property.getValue().getBinary(). See Value .

It is the responsibility of the caller to close the returned InputStream.

If this property is multi-valued, this method throws a ValueFormatException.

A RepositoryException is thrown if another error occurs. A stream representation of the value of this property.
throws:
  ValueFormatException - if the property is multi-valued.
throws:
  RepositoryException - if another error occurs
since:
   JCR 2.0




getBoolean
public boolean getBoolean() throws ValueFormatException, RepositoryException(Code)
Returns a boolean representation of the value of this property. A shortcut for Property.getValue().getBoolean(). See Value . If this property is multi-valued, this method throws a ValueFormatException.

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

A RepositoryException is thrown if another error occurs. A boolean representation of the value of this property.
throws:
  ValueFormatException - if conversion to a boolean isnot possible or if the property is multi-valued.
throws:
  RepositoryException - if another error occurs




getDate
public Calendar getDate() throws ValueFormatException, RepositoryException(Code)
Returns a Calendar representation of the value of this property. A shortcut for Property.getValue().getDate(). See Value .

The object returned is a copy of the stored value, so changes to it are not reflected in internal storage.

If this property is multi-valued, this method throws a ValueFormatException.

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

A RepositoryException is thrown if another error occurs. A date (Calendar object) representation of the value of this property.
throws:
  ValueFormatException - if conversion to a string is not possible or if theproperty is multi-valued.
throws:
  RepositoryException - if another error occurs




getDecimal
public BigDecimal getDecimal() throws ValueFormatException, RepositoryException(Code)
Returns a BigDecimal representation of the value of this property. A shortcut for Property.getValue().getDecimal(). See Value . If this property is multi-valued, this method throws a ValueFormatException.

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

A RepositoryException is thrown if another error occurs. A BigDecimal representation of the value of this property.
throws:
  ValueFormatException - if conversion to a BigDecimalis not possible or if the property is multi-valued.
throws:
  RepositoryException - if another error occurs
since:
   JCR 2.0




getDefinition
public PropertyDefinition getDefinition() throws RepositoryException(Code)
Returns the property definition that applies to this property. In some cases there may appear to be more than one definition that could apply to this node. However, it is assumed that upon creation or change of this property, a single particular definition is chosen by the implementation. It is that definition that this method returns. How this governing definition is selected upon property creation or change from among others which may have been applicable is an implementation issue and is not covered by this specification.
See Also:   javax.jcr.nodetype.NodeType.getPropertyDefinitions
throws:
  RepositoryException - if an error occurs. a PropertyDefinition object.



getDouble
public double getDouble() throws ValueFormatException, RepositoryException(Code)
Returns a double representation of the value of this property. A shortcut for Property.getValue().getDouble(). See Value . If this property is multi-valued, this method throws a ValueFormatException.

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

A RepositoryException is thrown if another error occurs. A double representation of the value of this property.
throws:
  ValueFormatException - if conversion to a double isnot possible or if the property is multi-valued.
throws:
  RepositoryException - if another error occurs




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

Returns the length in bytes if the value is a BINARY, otherwise it returns the number of characters needed to display the value in its string form.

Returns -1 if the implementation cannot determine the length.

If this property is multi-valued, this method throws a ValueFormatException. an long.
throws:
  ValueFormatException - if this property is multi-valued.
throws:
  RepositoryException - if another error occurs.




getLengths
public long[] getLengths() throws ValueFormatException, RepositoryException(Code)
Returns an array holding the lengths of the values of this (multi-value) property in bytes if the values are PropertyType.BINARY, otherwise it returns the number of characters needed to display the value in its string form. The order of the length values corresponds to the order of the values in the property.

Returns a -1 in the appropriate position if the implementation cannot determine the length of a value.

If this property is single-valued, this method throws a ValueFormatException.

A RepositoryException is thrown if another error occurs. an array of lengths
throws:
  ValueFormatException - if this property is single-valued.
throws:
  RepositoryException - if another error occurs.




getLong
public long getLong() throws ValueFormatException, RepositoryException(Code)
Returns a long representation of the value of this property. A shortcut for Property.getValue().getLong(). See Value . If this property is multi-valued, this method throws a ValueFormatException.

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

A RepositoryException is thrown if another error occurs. A long representation of the value of this property.
throws:
  ValueFormatException - if conversion to a long is notpossible or if the property is multi-valued.
throws:
  RepositoryException - if another error occurs




getNode
public Node getNode() throws ItemNotFoundException, ValueFormatException, RepositoryException(Code)
If this property is of type REFERENCE, WEAKREFERENCE or PATH (or convertible to one of these types) this method returns the Node to which this property refers.

If this property is of type PATH and it contains a relative path, it is interpreted relative to the parent node of this property. For example "." refers to the parent node itself, ".." to the parent of the parent node and "foo" to a sibling node of this property.

If this property is of type WEAKREFERENCE and no node exists in this workspace with the specified UUID then an ItemNotFoundException is thrown.

If this property is of type PATH and no node accessible by the current Sessionexists in this workspace at the specified path then an ItemNotFoundException is thrown. Note that this applies even if a property exists at the specified location. To dereference to a target property (as opposed to a target node), the method Property.getProperty is used.

If this property is multi-valued, this method throws a ValueFormatException.

If this property cannot be converted to a REFERENCE, WEAKREFERENCE or PATH then a ValueFormatException is thrown.

If this property is currently part of the frozen state of a version in version storage, this method will throw a ValueFormatException. the referenced Node
throws:
  ValueFormatException - if this property cannot be converted to a referring type (REFERENCE,WEAKREFERENCE or PATH), if the property is multi-valued or if this property is a referring typebut is currently part of the frozen state of a version in version storage.
throws:
  ItemNotFoundException - If this property is of type PATH and no node accessible by the current Session existsin this workspace at the specified path.
throws:
  RepositoryException - if another error occurs




getProperty
public Property getProperty() throws ItemNotFoundException, ValueFormatException, RepositoryException(Code)
If this property is of type PATH (or convertible to this type) this method returns the Property to which this property refers.

If this property contains a relative path, it is interpreted relative to the parent node of this property. For example "." refers to the parent node itself, ".." to the parent of the parent node and "foo" to a sibling property of this property or this property itself.

If no property exists in this workspace at the specified path then an ItemNotFoundException is thrown. Note that this applies even if a node exists at the specified location. To dereference to a target node, the method Property.getNode is used.

If this property is multi-valued, this method throws a ValueFormatException.

If this property cannot be converted to a PATH then a ValueFormatException is thrown.

If this property is currently part of the frozen state of a version in version storage, this method will throw a ValueFormatException. the referenced property
throws:
  ValueFormatException - if this property cannot be converted to a PATH, if the property is multi-valued or if this property is a referring typebut is currently part of the frozen state of a version in version storage.
throws:
  ItemNotFoundException - If this property is of type PATH and no property accessible by the current Session existsin this workspace at the specified path.
throws:
  RepositoryException - if another error occurs
since:
   JCR 2.0




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

It is the responsibility of the caller to close the returned InputStream.

If this property is multi-valued, this method throws a ValueFormatException.

A RepositoryException is thrown if another error occurs. Property.getBinary() A stream representation of the value of this property.
throws:
  ValueFormatException - if the property is multi-valued.
throws:
  RepositoryException - if another error occurs




getString
public String getString() throws ValueFormatException, RepositoryException(Code)
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. A string representation of the value of this property.
throws:
  ValueFormatException - if conversion to a String isnot possible or if the property is multi-valued.
throws:
  RepositoryException - if another error occurs.




getType
public int getType() throws RepositoryException(Code)
Returns the type of this Property. One of:
  • PropertyType.STRING
  • PropertyType.BINARY
  • PropertyType.DATE
  • PropertyType.DOUBLE
  • PropertyType.LONG
  • PropertyType.BOOLEAN
  • PropertyType.NAME
  • PropertyType.PATH
  • PropertyType.REFERENCE
  • PropertyType.WEAKREFERENCE
  • PropertyType.URI
The type returned is that which was set at property creation. Note that for some property p, the type returned by p.getType() will 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). an int
throws:
  RepositoryException - if an error occurs



getValue
public Value getValue() throws ValueFormatException, RepositoryException(Code)
Returns the value of this property as a Value object.

If this property is multi-valued, this method throws a ValueFormatException.

The object returned is a copy of the stored value and is immutable.
throws:
  ValueFormatException - if the property is multi-valued.
throws:
  RepositoryException - if another error occurs. the value




getValues
public Value[] getValues() throws ValueFormatException, RepositoryException(Code)
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.
throws:
  ValueFormatException - if the property is single-valued.
throws:
  RepositoryException - if another error occurs. a Value array



setValue
public void setValue(Value value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException(Code)
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

A ConstraintViolationException will be thrown either immediately or on save, if the change would violate a node type or implementation-specific constraint. Implementations may differ on when this validation is performed.

A VersionException will be thrown either immediately or on save, if this property belongs to a node that is versionable and checked-in or is non-versionable but whose nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

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.
Parameters:
  value - The new value to set the property to.
throws:
  ValueFormatException - if the type or format of the specified valueis incompatible with the type of this property.
throws:
  VersionException - if this property belongs to a node that is versionable and checked-inor is non-versionable but whose nearest versionable ancestor is checked-in and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  LockException - if a lock prevents the setting of the value and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  ConstraintViolationException - if the change would violate a node-type or other constraintand this implementation performs this validation immediately instead of waiting until save.
throws:
  RepositoryException - if another error occurs.




setValue
public void setValue(Value[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException(Code)
Sets the value of this property to the values array. 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 values. If the property type is constrained, then a best-effort conversion is attempted. If conversion fails, a ValueFormatException is thrown immediately (not on save). If this property is not a multi-valued then a ValueFormatException is thrown immediately. The change will be persisted (if valid) on save.

A ConstraintViolationException will be thrown either immediately or on save, if the change would violate a node type or implementation-specific constraint. Implementations may differ on when this validation is performed.

A VersionException will be thrown either immediately or on save, if this property belongs to a node that is versionable and checked-in or is non-versionable but whose nearest versionable ancestor is checked-in. Implementations may differ on when this validation is performed.

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.
Parameters:
  values - The new values to set the property to.
throws:
  ValueFormatException - if the type or format of the specified valuesis incompatible with the type of this property.
throws:
  VersionException - if this property belongs to a node that is versionable and checked-inor is non-versionable but whose nearest versionable ancestor is checked-in and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  LockException - if a lock prevents the setting of the value and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  ConstraintViolationException - if the change would violate a node-type or other constraintand this implementation performs this validation immediately instead of waiting until save.
throws:
  RepositoryException - if another error occurs.




setValue
public void setValue(String value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException(Code)
Sets the value of this property to value. Same as Property.setValue(Value value) except that the value is specified as a String.
Parameters:
  value - The new value to set the property to.
throws:
  ValueFormatException - if the type or format of the specified valueis incompatible with the type of this property.
throws:
  VersionException - if this property belongs to a node that is versionable and checked-inor is non-versionable but whose nearest versionable ancestor is checked-in and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  LockException - if a lock prevents the setting of the value and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  ConstraintViolationException - if the change would violate a node-type or other constraintand this implementation performs this validation immediately instead of waiting until save.
throws:
  RepositoryException - if another error occurs.



setValue
public void setValue(String[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException(Code)
Sets the value of this property to the values array. Same as Property.setValue(Value[] values) except that the values are specified as a String[].
Parameters:
  values - The new values to set the property to.
throws:
  ValueFormatException - if the type or format of the specified valuesis incompatible with the type of this property.
throws:
  VersionException - if this property belongs to a node that is versionable and checked-inor is non-versionable but whose nearest versionable ancestor is checked-in and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  LockException - if a lock prevents the setting of the value and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  ConstraintViolationException - if the change would violate a node-type or other constraintand this implementation performs this validation immediately instead of waiting until save.
throws:
  RepositoryException - if another error occurs.



setValue
public void setValue(InputStream value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException(Code)
Sets the value of this property to value. Same as Property.setValue(Value value) except that the value is specified as an InputStream.

The passed stream is closed before this method returns either normally or because of an exception. Property.setValue(Binary)
Parameters:
  value - The new value to set the property to.
throws:
  ValueFormatException - if the type or format of the specified valueis incompatible with the type of this property.
throws:
  VersionException - if this property belongs to a node that is versionable and checked-inor is non-versionable but whose nearest versionable ancestor is checked-in and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  LockException - if a lock prevents the setting of the value and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  ConstraintViolationException - if the change would violate a node-type or other constraintand this implementation performs this validation immediately instead of waiting until save.
throws:
  RepositoryException - if another error occurs.




setValue
public void setValue(Binary value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException(Code)
Sets the value of this property to value. Same as Property.setValue(Value value) except that the value is specified as a Binary.
Parameters:
  value - The new value to set the property to.
throws:
  ValueFormatException - if the type or format of the specified valueis incompatible with the type of this property.
throws:
  VersionException - if this property belongs to a node that is versionable and checked-inor is non-versionable but whose nearest versionable ancestor is checked-in and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  LockException - if a lock prevents the setting of the value and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  ConstraintViolationException - if the change would violate a node-type or other constraintand this implementation performs this validation immediately instead of waiting until save.
throws:
  RepositoryException - if another error occurs.



setValue
public void setValue(long value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException(Code)
Sets the value of this property to value. Same as Property.setValue(Value value) except that the value is specified as a long.
Parameters:
  value - The new value to set the property to.
throws:
  ValueFormatException - if the type or format of the specified valueis incompatible with the type of this property.
throws:
  VersionException - if this property belongs to a node that is versionable and checked-inor is non-versionable but whose nearest versionable ancestor is checked-in and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  LockException - if a lock prevents the setting of the value and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  ConstraintViolationException - if the change would violate a node-type or other constraintand this implementation performs this validation immediately instead of waiting until save.
throws:
  RepositoryException - if another error occurs.



setValue
public void setValue(double value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException(Code)
Sets the value of this property to value. Same as Property.setValue(Value value) except that the value is specified as a double.
Parameters:
  value - The new value to set the property to.
throws:
  ValueFormatException - if the type or format of the specified valueis incompatible with the type of this property.
throws:
  VersionException - if this property belongs to a node that is versionable and checked-inor is non-versionable but whose nearest versionable ancestor is checked-in and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  LockException - if a lock prevents the setting of the value and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  ConstraintViolationException - if the change would violate a node-type or other constraintand this implementation performs this validation immediately instead of waiting until save.
throws:
  RepositoryException - if another error occurs.



setValue
public void setValue(BigDecimal value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException(Code)
Sets the value of this property to value. Same as Property.setValue(Value value) except that the value is specified as a BigDecimal.
Parameters:
  value - The new value to set the property to.
throws:
  ValueFormatException - if the type or format of the specified valueis incompatible with the type of this property.
throws:
  VersionException - if this property belongs to a node that is versionable and checked-inor is non-versionable but whose nearest versionable ancestor is checked-in and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  LockException - if a lock prevents the setting of the value and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  ConstraintViolationException - if the change would violate a node-type or other constraintand this implementation performs this validation immediately instead of waiting until save.
throws:
  RepositoryException - if another error occurs.
since:
   JCR 2.0



setValue
public void setValue(Calendar value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException(Code)
Sets the value of this property to value. Same as Property.setValue(Value value) except that the value is specified as a Calendar.
Parameters:
  value - The new value to set the property to.
throws:
  ValueFormatException - if the type or format of the specified valueis incompatible with the type of this property.
throws:
  VersionException - if this property belongs to a node that is versionable and checked-inor is non-versionable but whose nearest versionable ancestor is checked-in and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  LockException - if a lock prevents the setting of the value and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  ConstraintViolationException - if the change would violate a node-type or other constraintand this implementation performs this validation immediately instead of waiting until save.
throws:
  RepositoryException - if another error occurs.



setValue
public void setValue(boolean value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException(Code)
Sets the value of this property to value. Same as Property.setValue(Value value) except that the value is specified as a boolean.
Parameters:
  value - The new value to set the property to.
throws:
  ValueFormatException - if the type or format of the specified valueis incompatible with the type of this property.
throws:
  VersionException - if this property belongs to a node that is versionable and checked-inor is non-versionable but whose nearest versionable ancestor is checked-in and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  LockException - if a lock prevents the setting of the value and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  ConstraintViolationException - if the change would violate a node-type or other constraintand this implementation performs this validation immediately instead of waiting until save.
throws:
  RepositoryException - if another error occurs.



setValue
public void setValue(Node value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException(Code)
Sets this REFERENCE property to refer to the specified node. If this property is not of type REFERENCE or the specified node is not referenceable (i.e., is not of mixin node type mix:referenceable and therefore does not have a UUID) then a ValueFormatException is thrown.
Parameters:
  value - The node to which this REFERENCE property will refer.
throws:
  ValueFormatException - if the type or format of the specified valueis incompatible with the type of this property.
throws:
  VersionException - if this property belongs to a node that is versionable and checked-inor is non-versionable but whose nearest versionable ancestor is checked-in and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  LockException - if a lock prevents the setting of the value and thisimplementation performs this validation immediately instead of waiting until save.
throws:
  ConstraintViolationException - if the change would violate a node-type or other constraintand this implementation performs this validation immediately instead of waiting until save.
throws:
  RepositoryException - if another error occurs.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.