|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.jcr2spi.state.ItemState
org.apache.jackrabbit.jcr2spi.state.PropertyState
public class PropertyState
PropertyState
represents the state of a Property
.
Constructor Summary | |
---|---|
protected |
PropertyState(PropertyEntry entry,
ItemStateFactory isf,
QPropertyDefinition definition,
ItemDefinitionProvider definitionProvider)
Create a NEW PropertyState |
protected |
PropertyState(PropertyEntry entry,
PropertyInfo pInfo,
ItemStateFactory isf,
ItemDefinitionProvider definitionProvider)
Create an EXISTING PropertyState |
Method Summary | |
---|---|
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. |
boolean |
merge(ItemState another,
boolean keepChanges)
If keepChanges is true, this method does nothing and returns
false. |
boolean |
revert()
Revert all transient modifications made to this ItemState. |
Methods inherited from class org.apache.jackrabbit.jcr2spi.state.ItemState |
---|
addListener, getHierarchyEntry, getListeners, getName, getParent, getQPath, getStatus, isValid, reload, removeListener, setStatus |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected PropertyState(PropertyEntry entry, ItemStateFactory isf, QPropertyDefinition definition, ItemDefinitionProvider definitionProvider)
entry
- isf
- definition
- definitionProvider
- protected PropertyState(PropertyEntry entry, PropertyInfo pInfo, ItemStateFactory isf, ItemDefinitionProvider definitionProvider)
entry
- pInfo
- isf
- definitionProvider
- Method Detail |
---|
public boolean isNode()
isNode
in class ItemState
ItemState.isNode()
public ItemId getId()
hierarchy entry
.
getId
in class ItemState
ItemState.getId()
public ItemId getWorkspaceId()
getWorkspaceId
in class ItemState
ItemState.getWorkspaceId()
public boolean merge(ItemState another, boolean keepChanges)
keepChanges
is true, this method does nothing and returns
false. Otherwise type and values of the other property state are compared
to this state. If they differ, they will be copied to this state and
this method returns true.
merge
in class ItemState
ItemState.merge(ItemState, boolean)
public boolean revert()
ItemState
revert
in class ItemState
ItemState.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 RepositoryException
definition
defined for this
property state. Note that the definition has been set upon creation of
this PropertyState
.
RepositoryException
public QValue[] getValues()
public QValue getValue() throws ValueFormatException
ValueFormatException
- if isMultiValued()
returns true.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |