public class PropertyState extends ItemState
PropertyState represents the state of a Property.ItemState.MergeResult, ItemState.SimpleMergeResult| Modifier | Constructor and Description |
|---|---|
protected |
PropertyState(PropertyEntry entry,
ItemStateFactory isf,
QPropertyDefinition definition,
ItemDefinitionProvider definitionProvider,
QValue[] values,
int propertyType)
Create a NEW PropertyState
|
protected |
PropertyState(PropertyEntry entry,
PropertyInfo pInfo,
ItemStateFactory isf,
ItemDefinitionProvider definitionProvider)
Create an EXISTING PropertyState
|
| Modifier and Type | Method and Description |
|---|---|
QPropertyDefinition |
getDefinition()
Returns the
definition defined for this
property state. |
ItemId |
getId()
Utility method:
Returns the identifier of this item state.
|
int |
getType()
Returns the type of the property value(s).
|
QValue |
getValue()
Convenience method for single valued property states.
|
QValue[] |
getValues()
Returns the value(s) of this property.
|
ItemId |
getWorkspaceId()
Utility method:
Returns the identifier of this item state.
|
boolean |
isMultiValued()
Returns true if this property is multi-valued, otherwise false.
|
boolean |
isNode()
Always returns false.
|
ItemState.MergeResult |
merge(ItemState another,
boolean keepChanges)
If
keepChanges is true, this method only compares the existing
values with the values from 'another' and returns true, if the underlying
persistent state is different to the stored persistent values. |
boolean |
revert()
Revert all transient modifications made to this ItemState.
|
addListener, getHierarchyEntry, getListeners, getName, getParent, getPath, getStatus, invalidate, isValid, removeListener, setStatusprotected PropertyState(PropertyEntry entry, ItemStateFactory isf, QPropertyDefinition definition, ItemDefinitionProvider definitionProvider, QValue[] values, int propertyType) throws javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
entry - isf - definition - definitionProvider - javax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionprotected PropertyState(PropertyEntry entry, PropertyInfo pInfo, ItemStateFactory isf, ItemDefinitionProvider definitionProvider)
entry - pInfo - isf - definitionProvider - public boolean isNode()
isNode in class ItemStateItemState.isNode()public ItemId getId() throws javax.jcr.RepositoryException
hierarchy entry.getId in class ItemStatejavax.jcr.RepositoryExceptionItemState.getId()public ItemId getWorkspaceId() throws javax.jcr.RepositoryException
getWorkspaceId in class ItemStatejavax.jcr.RepositoryExceptionItemState.getWorkspaceId()public ItemState.MergeResult merge(ItemState another, boolean keepChanges)
keepChanges is true, this method only compares the existing
values with the values from 'another' and returns true, if the underlying
persistent state is different to the stored persistent values. Otherwise
the transient changes will be discarded.merge in class ItemStateItemState.merge(ItemState, boolean)public boolean revert()
ItemStaterevert in class ItemStateItemState.revert()public int getType()
PropertyType,
for the type required by the
property definition. The effective type may differ from the required
type if the latter is {@link PropertyType#UNDEFINED}.public boolean isMultiValued()
public QPropertyDefinition getDefinition() throws javax.jcr.RepositoryException
definition defined for this
property state. Note that the definition has been set upon creation of
this PropertyState.javax.jcr.RepositoryException - If an error occurs.public QValue[] getValues()
public QValue getValue() throws javax.jcr.ValueFormatException
javax.jcr.ValueFormatException - if isMultiValued() returns true.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.