Package javax.jcr
Class PropertyType
- java.lang.Object
-
- javax.jcr.PropertyType
-
public final class PropertyType extends java.lang.Object
The property types supported by the JCR standard.This interface defines following property types:
STRING
BINARY
LONG
DOUBLE
DECIMAL
DATE
BOOLEAN
NAME
PATH
REFERENCE
WEAKREFERENCE
URI
-
-
Field Summary
Fields Modifier and Type Field Description static int
BINARY
BINARY
properties are used to store binary data.static int
BOOLEAN
TheBOOLEAN
property type is used to store boolean values.static int
DATE
TheDATE
property type is used to store time and date information.static int
DECIMAL
TheDECIMAL
property type is used to store precise decimal numbers.static int
DOUBLE
TheDOUBLE
property type is used to store floating point numbers.static int
LONG
TheLONG
property type is used to store integers.static int
NAME
ANAME
is a pairing of a namespace and a local name.static int
PATH
APATH
property is an ordered list of path elements.static int
REFERENCE
AREFERENCE
property stores the identifier of a referenceable node (one having typemix:referenceable
), which must exist within the same workspace or session as theREFERENCE
property.static int
STRING
TheSTRING
property type is used to store strings.static java.lang.String
TYPENAME_BINARY
String constant for type name as used in serialization.static java.lang.String
TYPENAME_BOOLEAN
String constant for type name as used in serialization.static java.lang.String
TYPENAME_DATE
String constant for type name as used in serialization.static java.lang.String
TYPENAME_DECIMAL
String constant for type name as used in serialization.static java.lang.String
TYPENAME_DOUBLE
String constant for type name as used in serialization.static java.lang.String
TYPENAME_LONG
String constant for type name as used in serialization.static java.lang.String
TYPENAME_NAME
String constant for type name as used in serialization.static java.lang.String
TYPENAME_PATH
String constant for type name as used in serialization.static java.lang.String
TYPENAME_REFERENCE
String constant for type name as used in serialization.static java.lang.String
TYPENAME_STRING
String constant for type name as used in serialization.static java.lang.String
TYPENAME_UNDEFINED
static java.lang.String
TYPENAME_URI
String constant for type name as used in serialization.static java.lang.String
TYPENAME_WEAKREFERENCE
String constant for type name as used in serialization.static int
UNDEFINED
This constant can be used within a property definition (see 4.7.5 Property Definitions) to specify that the property in question may be of any type.static int
URI
AURI
property is identical toSTRING
property except that it only accepts values that conform to the syntax of a URI-reference as defined in RFC 3986.static int
WEAKREFERENCE
AWEAKREFERENCE
property stores the identifier of a referenceable node (one having typemix:referenceable
).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
nameFromValue(int type)
Returns the name of the specifiedtype
, as used in serialization.static int
valueFromName(java.lang.String name)
Returns the numeric constant value of the type with the specified name.
-
-
-
Field Detail
-
STRING
public static final int STRING
TheSTRING
property type is used to store strings. It has the same characteristics as the JavaString
class.- See Also:
- Constant Field Values
-
BINARY
public static final int BINARY
BINARY
properties are used to store binary data.- See Also:
- Constant Field Values
-
LONG
public static final int LONG
TheLONG
property type is used to store integers. It has the same characteristics as the Java primitive typelong
.- See Also:
- Constant Field Values
-
DOUBLE
public static final int DOUBLE
TheDOUBLE
property type is used to store floating point numbers. It has the same characteristics as the Java primitive typedouble
.- See Also:
- Constant Field Values
-
DATE
public static final int DATE
TheDATE
property type is used to store time and date information.- See Also:
- Constant Field Values
-
BOOLEAN
public static final int BOOLEAN
TheBOOLEAN
property type is used to store boolean values. It has the same characteristics as the Java primitive typeboolean
.- See Also:
- Constant Field Values
-
NAME
public static final int NAME
ANAME
is a pairing of a namespace and a local name. When read, the namespace is mapped to the current prefix.- See Also:
- Constant Field Values
-
PATH
public static final int PATH
APATH
property is an ordered list of path elements. A path element is aNAME
with an optional index. When read, theNAME
s within the path are mapped to their current prefix. A path may be absolute or relative.- See Also:
- Constant Field Values
-
REFERENCE
public static final int REFERENCE
AREFERENCE
property stores the identifier of a referenceable node (one having typemix:referenceable
), which must exist within the same workspace or session as theREFERENCE
property. AREFERENCE
property enforces this referential integrity by preventing the removal of its target node.- See Also:
- Constant Field Values
-
WEAKREFERENCE
public static final int WEAKREFERENCE
AWEAKREFERENCE
property stores the identifier of a referenceable node (one having typemix:referenceable
). AWEAKREFERENCE
property does not enforce referential integrity.- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
URI
public static final int URI
AURI
property is identical toSTRING
property except that it only accepts values that conform to the syntax of a URI-reference as defined in RFC 3986.- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
DECIMAL
public static final int DECIMAL
TheDECIMAL
property type is used to store precise decimal numbers. It has the same characteristics as the Java classjava.math.BigDecimal
.- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
UNDEFINED
public static final int UNDEFINED
This constant can be used within a property definition (see 4.7.5 Property Definitions) to specify that the property in question may be of any type. However, it cannot be the actual type of any property instance. For example, it will never be returned byProperty.getType()
and it cannot be assigned as the type when creating a new property.- See Also:
- Constant Field Values
-
TYPENAME_STRING
public static final java.lang.String TYPENAME_STRING
String constant for type name as used in serialization.- See Also:
- Constant Field Values
-
TYPENAME_BINARY
public static final java.lang.String TYPENAME_BINARY
String constant for type name as used in serialization.- See Also:
- Constant Field Values
-
TYPENAME_LONG
public static final java.lang.String TYPENAME_LONG
String constant for type name as used in serialization.- See Also:
- Constant Field Values
-
TYPENAME_DOUBLE
public static final java.lang.String TYPENAME_DOUBLE
String constant for type name as used in serialization.- See Also:
- Constant Field Values
-
TYPENAME_DECIMAL
public static final java.lang.String TYPENAME_DECIMAL
String constant for type name as used in serialization.- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
TYPENAME_DATE
public static final java.lang.String TYPENAME_DATE
String constant for type name as used in serialization.- See Also:
- Constant Field Values
-
TYPENAME_BOOLEAN
public static final java.lang.String TYPENAME_BOOLEAN
String constant for type name as used in serialization.- See Also:
- Constant Field Values
-
TYPENAME_NAME
public static final java.lang.String TYPENAME_NAME
String constant for type name as used in serialization.- See Also:
- Constant Field Values
-
TYPENAME_PATH
public static final java.lang.String TYPENAME_PATH
String constant for type name as used in serialization.- See Also:
- Constant Field Values
-
TYPENAME_REFERENCE
public static final java.lang.String TYPENAME_REFERENCE
String constant for type name as used in serialization.- See Also:
- Constant Field Values
-
TYPENAME_WEAKREFERENCE
public static final java.lang.String TYPENAME_WEAKREFERENCE
String constant for type name as used in serialization.- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
TYPENAME_URI
public static final java.lang.String TYPENAME_URI
String constant for type name as used in serialization.- Since:
- JCR 2.0
- See Also:
- Constant Field Values
-
TYPENAME_UNDEFINED
public static final java.lang.String TYPENAME_UNDEFINED
- See Also:
- Constant Field Values
-
-
Method Detail
-
nameFromValue
public static java.lang.String nameFromValue(int type)
Returns the name of the specifiedtype
, as used in serialization.- Parameters:
type
- the property type- Returns:
- the name of the specified
type
- Throws:
java.lang.IllegalArgumentException
- iftype
is not a valid property type.
-
valueFromName
public static int valueFromName(java.lang.String name)
Returns the numeric constant value of the type with the specified name.- Parameters:
name
- the name of the property type.- Returns:
- the numeric constant value.
- Throws:
java.lang.IllegalArgumentException
- ifname
is not a valid property type name.
-
-