Class PropertyImpl
java.lang.Object
org.apache.jackrabbit.oak.jcr.session.PropertyImpl
TODO document
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final PropertyDelegate
static final String
static final int
static final boolean
The value of this flag determines the behaviour ofItem.save()
.protected final SessionContext
protected final SessionDelegate
Fields inherited from interface javax.jcr.Property
JCR_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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(ItemVisitor visitor) protected @NotNull PropertyState
createMultiState
(String oakName, List<Value> values, Type<?> type) protected @NotNull PropertyState
createSingleState
(String oakName, Value value, Type<?> type) getAncestor
(int depth) @NotNull Binary
boolean
@NotNull Calendar
getDate()
@NotNull BigDecimal
@NotNull PropertyDefinition
int
getDepth()
double
long
@org.jetbrains.annotations.NotNull long[]
long
getLong()
@NotNull String
getName()
@NotNull Node
getNode()
@NotNull Node
@NotNull String
getPath()
@NotNull Property
@NotNull Session
@NotNull InputStream
@NotNull String
int
getType()
@NotNull Value
getValue()
@NotNull Value[]
boolean
boolean
boolean
isNew()
boolean
isNode()
boolean
protected final <U> U
perform
(@NotNull SessionOperation<U> op) Perform the passedSessionOperation
.void
refresh
(boolean keepChanges) void
remove()
void
save()
void
setValue
(boolean value) void
setValue
(double value) void
setValue
(long value) void
setValue
(InputStream value) void
void
void
setValue
(BigDecimal value) void
void
void
void
void
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.jcr.Item
getAncestor, getDepth, getName, getPath, getSession, isSame, refresh, save
-
Field Details
-
ITEM_SAVE_DOES_SESSION_SAVE
- See Also:
-
MV_PROPERTY_WARN_THRESHOLD
public static final int MV_PROPERTY_WARN_THRESHOLD- See Also:
-
SAVE_SESSION
public static final boolean SAVE_SESSIONThe value of this flag determines the behaviour ofItem.save()
. Iffalse
, save will throw aUnsupportedRepositoryOperationException
if the sub tree rooted at this item does not contain all transient changes. Iftrue
, save will delegate toSession.save()
. -
sessionContext
-
dlg
-
sessionDelegate
-
-
Method Details
-
isNode
public boolean isNode() -
getParent
- Specified by:
getParent
in interfaceItem
- Throws:
RepositoryException
-
isNew
public boolean isNew() -
isModified
public boolean isModified()- Specified by:
isModified
in interfaceItem
-
remove
- Specified by:
remove
in interfaceItem
- Throws:
RepositoryException
-
accept
- Specified by:
accept
in interfaceItem
- Throws:
RepositoryException
-
setValue
- Specified by:
setValue
in interfaceProperty
- Throws:
RepositoryException
-
setValue
- Specified by:
setValue
in interfaceProperty
- Throws:
RepositoryException
-
setValue
- Specified by:
setValue
in interfaceProperty
- Throws:
RepositoryException
-
setValue
- Specified by:
setValue
in interfaceProperty
- Throws:
RepositoryException
-
setValue
- Specified by:
setValue
in interfaceProperty
- Throws:
RepositoryException
-
setValue
- Specified by:
setValue
in interfaceProperty
- Throws:
RepositoryException
-
setValue
- Specified by:
setValue
in interfaceProperty
- Throws:
RepositoryException
-
setValue
- Specified by:
setValue
in interfaceProperty
- Throws:
RepositoryException
-
setValue
- Specified by:
setValue
in interfaceProperty
- Throws:
RepositoryException
-
setValue
- Specified by:
setValue
in interfaceProperty
- Throws:
RepositoryException
-
setValue
- Specified by:
setValue
in interfaceProperty
- Throws:
RepositoryException
-
setValue
- Specified by:
setValue
in interfaceProperty
- Throws:
RepositoryException
-
getValue
- Specified by:
getValue
in interfaceProperty
- Throws:
RepositoryException
-
getValues
- Specified by:
getValues
in interfaceProperty
- Throws:
RepositoryException
-
getString
- Specified by:
getString
in interfaceProperty
- Throws:
RepositoryException
-
getStream
- Specified by:
getStream
in interfaceProperty
- Throws:
RepositoryException
-
getBinary
- Specified by:
getBinary
in interfaceProperty
- Throws:
RepositoryException
-
getLong
- Specified by:
getLong
in interfaceProperty
- Throws:
RepositoryException
-
getDouble
- Specified by:
getDouble
in interfaceProperty
- Throws:
RepositoryException
-
getDecimal
- Specified by:
getDecimal
in interfaceProperty
- Throws:
RepositoryException
-
getDate
- Specified by:
getDate
in interfaceProperty
- Throws:
RepositoryException
-
getBoolean
- Specified by:
getBoolean
in interfaceProperty
- Throws:
RepositoryException
-
getNode
- Specified by:
getNode
in interfaceProperty
- Throws:
RepositoryException
-
getProperty
- Specified by:
getProperty
in interfaceProperty
- Throws:
RepositoryException
-
getLength
- Specified by:
getLength
in interfaceProperty
- Throws:
RepositoryException
-
getLengths
- Specified by:
getLengths
in interfaceProperty
- Throws:
RepositoryException
-
getDefinition
- Specified by:
getDefinition
in interfaceProperty
- Throws:
RepositoryException
-
getType
- Specified by:
getType
in interfaceProperty
- Throws:
RepositoryException
-
isMultiple
- Specified by:
isMultiple
in interfaceProperty
- Throws:
RepositoryException
-
perform
@NotNull protected final <U> U perform(@NotNull @NotNull SessionOperation<U> op) throws RepositoryException Perform the passedSessionOperation
.- Type Parameters:
U
- return type of the operation- Parameters:
op
- operation to perform- Returns:
- the result of
op.perform()
- Throws:
RepositoryException
- as thrown byop.perform()
.
-
getName
- Specified by:
getName
in interfaceItem
- Throws:
RepositoryException
- See Also:
-
getPath
- Specified by:
getPath
in interfaceItem
- Throws:
RepositoryException
- See Also:
-
getSession
- Specified by:
getSession
in interfaceItem
-
getAncestor
- Specified by:
getAncestor
in interfaceItem
- Throws:
RepositoryException
-
getDepth
- Specified by:
getDepth
in interfaceItem
- Throws:
RepositoryException
-
isSame
- Specified by:
isSame
in interfaceItem
- Throws:
RepositoryException
- See Also:
-
save
This implementation delegates toSession.save()
ifSAVE_SESSION
istrue
. Otherwise it only performs the save if the subtree rooted at this item contains all transient changes. That is, if callingSession.save()
would have the same effect as calling this method. In all other cases this method will throw anUnsupportedRepositoryOperationException
- Specified by:
save
in interfaceItem
- Throws:
RepositoryException
- See Also:
-
refresh
- Specified by:
refresh
in interfaceItem
- Throws:
RepositoryException
- See Also:
-
toString
-
createSingleState
@NotNull protected @NotNull PropertyState createSingleState(String oakName, Value value, Type<?> type) throws RepositoryException - Throws:
RepositoryException
-
createMultiState
@NotNull protected @NotNull PropertyState createMultiState(String oakName, List<Value> values, Type<?> type) throws RepositoryException - Throws:
RepositoryException
-