public class PropertyImpl extends ItemImpl implements javax.jcr.Property
PropertyImpl implements the Property interface.id, itemMgr, sessionContext, stateMgr, STATUS_DESTROYED, STATUS_INVALIDATED, STATUS_MODIFIED, STATUS_NORMALJCR_ACTIVITY, JCR_AUTOCREATED, JCR_BASE_VERSION, JCR_CHILD_VERSION_HISTORY, JCR_CONFIGURATION, JCR_CONTENT, JCR_COPIED_FROM, JCR_CREATED, JCR_CREATED_BY, JCR_CURRENT_LIFECYCLE_STATE, JCR_DATA, JCR_DEFAULT_PRIMARY_TYPE, JCR_DEFAULT_VALUES, JCR_DESCRIPTION, JCR_ENCODING, JCR_FROZEN_MIXIN_TYPES, JCR_FROZEN_PRIMARY_TYPE, JCR_FROZEN_UUID, JCR_HAS_ORDERABLE_CHILD_NODES, JCR_HOST, JCR_ID, JCR_IS_ABSTRACT, JCR_IS_CHECKED_OUT, JCR_IS_MIXIN, JCR_LANGUAGE, JCR_LAST_MODIFIED, JCR_LAST_MODIFIED_BY, JCR_LIFECYCLE_POLICY, JCR_LOCK_IS_DEEP, JCR_LOCK_OWNER, JCR_MANDATORY, JCR_MERGE_FAILED, JCR_MIMETYPE, JCR_MIXIN_TYPES, JCR_MULTIPLE, JCR_NAME, JCR_NODE_TYPE_NAME, JCR_ON_PARENT_VERSION, JCR_PATH, JCR_PORT, JCR_PREDECESSORS, JCR_PRIMARY_ITEM_NAME, JCR_PRIMARY_TYPE, JCR_PROTECTED, JCR_PROTOCOL, JCR_REPOSITORY, JCR_REQUIRED_PRIMARY_TYPES, JCR_REQUIRED_TYPE, JCR_ROOT, JCR_SAME_NAME_SIBLINGS, JCR_STATEMENT, JCR_SUCCESSORS, JCR_SUPERTYPES, JCR_TITLE, JCR_UUID, JCR_VALUE_CONSTRAINTS, JCR_VERSION_HISTORY, JCR_VERSIONABLE_UUID, JCR_WORKSPACE| Modifier and Type | Method and Description |
|---|---|
void |
accept(javax.jcr.ItemVisitor visitor) |
protected void |
checkSetValue(boolean multipleValues)
Checks various pre-conditions that are common to all
setValue() methods. |
javax.jcr.Binary |
getBinary()
Wrapper around
getValue() |
boolean |
getBoolean()
Wrapper around
getValue() |
Calendar |
getDate()
Wrapper around
getValue() |
BigDecimal |
getDecimal()
Wrapper around
getValue() |
javax.jcr.nodetype.PropertyDefinition |
getDefinition() |
double |
getDouble()
Wrapper around
getValue() |
long |
getLength() |
protected long |
getLength(InternalValue value)
Determines the length of the given value.
|
long[] |
getLengths() |
long |
getLong()
Wrapper around
getValue() |
String |
getName() |
javax.jcr.Node |
getNode() |
protected ItemState |
getOrCreateTransientItemState() |
javax.jcr.Node |
getParent() |
protected javax.jcr.Node |
getParent(boolean checkPermission) |
javax.jcr.Property |
getProperty() |
Name |
getQName()
Same as
except that
this method returns a Name instead of a
String. |
InputStream |
getStream()
Wrapper around
getValue() |
String |
getString()
Wrapper around
getValue() |
int |
getType() |
javax.jcr.Value |
getValue() |
javax.jcr.Value[] |
getValues() |
InternalValue |
internalGetValue()
Returns the internal value of a single-valued property.
|
InternalValue[] |
internalGetValues()
Returns the internal values of a multi-valued property.
|
protected void |
internalSetValue(InternalValue[] values,
int type) |
boolean |
isMultiple() |
boolean |
isNode() |
protected void |
makePersistent() |
protected void |
onRedefine(QPropertyDefinition def) |
protected void |
restoreTransient(PropertyState transientState) |
void |
setValue(BigDecimal value)
Wrapper around
setValue(Value) |
void |
setValue(javax.jcr.Binary value)
Wrapper around
setValue(Value) |
void |
setValue(boolean value)
Wrapper around
setValue(Value) |
void |
setValue(Calendar value)
Wrapper around
setValue(Value) |
void |
setValue(double value)
Wrapper around
setValue(Value) |
void |
setValue(InputStream value)
Wrapper around
setValue(Value) |
void |
setValue(long value)
Wrapper around
setValue(Value) |
void |
setValue(Name name)
Same as
except that
this method takes a Name instead of a String
value. |
void |
setValue(Name[] names)
Same as
except that
this method takes an array of Name instead of
String values. |
void |
setValue(javax.jcr.Node value)
Wrapper around
setValue(Value) |
void |
setValue(String value)
Wrapper around
setValue(Value) |
void |
setValue(String[] strings)
Wrapper around
setValue(Value[]) |
void |
setValue(javax.jcr.Value value) |
void |
setValue(javax.jcr.Value[] values) |
void |
setValue(javax.jcr.Value[] values,
int valueType)
Sets the values of this property.
|
String |
toString()
Return a string representation of this property for diagnostic purposes.
|
getAncestor, getDepth, getId, getPath, getPrimaryPath, getQName, getSession, getType, getValueFactory, getValues, isModified, isNew, isSame, isTransactionalNew, isTransient, itemSanityCheck, perform, refresh, remove, safeGetJCRPath, sanityCheck, save, setRemovedprotected ItemState getOrCreateTransientItemState() throws javax.jcr.RepositoryException
getOrCreateTransientItemState in class ItemImpljavax.jcr.RepositoryExceptionprotected void makePersistent()
throws javax.jcr.InvalidItemStateException
makePersistent in class ItemImpljavax.jcr.InvalidItemStateExceptionprotected void restoreTransient(PropertyState transientState) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionprotected void onRedefine(QPropertyDefinition def) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionprotected long getLength(InternalValue value) throws javax.jcr.RepositoryException
value - value whose length should be determinedjavax.jcr.RepositoryException - if an error occursProperty.getLength(),
Property.getLengths()protected void checkSetValue(boolean multipleValues)
throws javax.jcr.ValueFormatException,
javax.jcr.version.VersionException,
javax.jcr.lock.LockException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.RepositoryException
setValue() methods. The checks performed are:
multipleValues - flag indicating whether the property is about to
be set to an array of valuesjavax.jcr.ValueFormatException - if a single-valued property is set to an
array of values (and vice versa)javax.jcr.version.VersionException - if the parent node is not checked-outjavax.jcr.lock.LockException - if the parent node is locked by somebody elsejavax.jcr.nodetype.ConstraintViolationException - if the property is protectedjavax.jcr.RepositoryException - if another error occursProperty.setValue(javax.jcr.Value)protected void internalSetValue(InternalValue[] values, int type) throws javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
values - type - javax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionprotected javax.jcr.Node getParent(boolean checkPermission)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void setValue(Name name) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
Property.setValue(String) except that
this method takes a Name instead of a String
value.name - javax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic void setValue(Name[] names) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
Property.setValue(String[]) except that
this method takes an array of Name instead of
String values.names - javax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic Name getQName()
Item.getName() except that
this method returns a Name instead of a
String.public InternalValue[] internalGetValues() throws javax.jcr.RepositoryException
javax.jcr.ValueFormatException - if this property is not multi-valuedjavax.jcr.RepositoryExceptionpublic InternalValue internalGetValue() throws javax.jcr.RepositoryException
javax.jcr.ValueFormatException - if this property is not single-valuedjavax.jcr.RepositoryExceptionpublic javax.jcr.Value[] getValues()
throws javax.jcr.RepositoryException
getValues in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic javax.jcr.Value getValue()
throws javax.jcr.RepositoryException
getValue in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic String getString() throws javax.jcr.RepositoryException
getValue()getString in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic InputStream getStream() throws javax.jcr.RepositoryException
getValue()getStream in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic long getLong()
throws javax.jcr.RepositoryException
getValue()getLong in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic double getDouble()
throws javax.jcr.RepositoryException
getValue()getDouble in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic Calendar getDate() throws javax.jcr.RepositoryException
getValue()getDate in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic boolean getBoolean()
throws javax.jcr.RepositoryException
getValue()getBoolean in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic javax.jcr.Node getNode()
throws javax.jcr.ValueFormatException,
javax.jcr.RepositoryException
getNode in interface javax.jcr.Propertyjavax.jcr.ValueFormatExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Property getProperty()
throws javax.jcr.RepositoryException
getProperty in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic BigDecimal getDecimal() throws javax.jcr.RepositoryException
getValue()getDecimal in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic void setValue(BigDecimal value) throws javax.jcr.RepositoryException
setValue(Value)setValue in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic javax.jcr.Binary getBinary()
throws javax.jcr.RepositoryException
getValue()getBinary in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic void setValue(javax.jcr.Binary value)
throws javax.jcr.RepositoryException
setValue(Value)setValue in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic void setValue(Calendar value) throws javax.jcr.RepositoryException
setValue(Value)setValue in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic void setValue(double value)
throws javax.jcr.RepositoryException
setValue(Value)setValue in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic void setValue(InputStream value) throws javax.jcr.RepositoryException
setValue(Value)setValue in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic void setValue(String value) throws javax.jcr.RepositoryException
setValue(Value)setValue in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic void setValue(String[] strings) throws javax.jcr.RepositoryException
setValue(Value[])setValue in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic void setValue(boolean value)
throws javax.jcr.RepositoryException
setValue(Value)setValue in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic void setValue(javax.jcr.Node value)
throws javax.jcr.RepositoryException
setValue(Value)setValue in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic void setValue(long value)
throws javax.jcr.RepositoryException
setValue(Value)setValue in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic 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
setValue in interface javax.jcr.Propertyjavax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic void setValue(javax.jcr.Value[] values)
throws javax.jcr.RepositoryException
setValue in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic void setValue(javax.jcr.Value[] values,
int valueType)
throws javax.jcr.RepositoryException
values - property values (possibly null)valueType - default value type if not set in the node type,
may be PropertyType.UNDEFINEDjavax.jcr.RepositoryException - if the property values could not be setpublic long getLength()
throws javax.jcr.RepositoryException
getLength in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic long[] getLengths()
throws javax.jcr.RepositoryException
getLengths in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic javax.jcr.nodetype.PropertyDefinition getDefinition()
throws javax.jcr.RepositoryException
getDefinition in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic int getType()
throws javax.jcr.RepositoryException
getType in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic boolean isMultiple()
throws javax.jcr.RepositoryException
isMultiple in interface javax.jcr.Propertyjavax.jcr.RepositoryExceptionpublic boolean isNode()
public String getName() throws javax.jcr.RepositoryException
public void accept(javax.jcr.ItemVisitor visitor)
throws javax.jcr.RepositoryException
public javax.jcr.Node getParent()
throws javax.jcr.RepositoryException
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.