|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.oak.jcr.session.PropertyImpl
public class PropertyImpl
TODO document
Field Summary | |
---|---|
protected T |
dlg
|
static String |
ITEM_SAVE_DOES_SESSION_SAVE
|
static int |
MV_PROPERTY_WARN_THRESHOLD
|
static boolean |
SAVE_SESSION
The value of this flag determines the behaviour of save() . |
protected SessionContext |
sessionContext
|
protected SessionDelegate |
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 | ||
---|---|---|
void |
accept(javax.jcr.ItemVisitor visitor)
|
|
protected org.apache.jackrabbit.oak.api.PropertyState |
createMultiState(String oakName,
List<javax.jcr.Value> values,
org.apache.jackrabbit.oak.api.Type<?> type)
|
|
protected org.apache.jackrabbit.oak.api.PropertyState |
createSingleState(String oakName,
javax.jcr.Value value,
org.apache.jackrabbit.oak.api.Type<?> type)
|
|
javax.jcr.Item |
getAncestor(int depth)
|
|
javax.jcr.Binary |
getBinary()
|
|
boolean |
getBoolean()
|
|
Calendar |
getDate()
|
|
BigDecimal |
getDecimal()
|
|
javax.jcr.nodetype.PropertyDefinition |
getDefinition()
|
|
int |
getDepth()
|
|
double |
getDouble()
|
|
long |
getLength()
|
|
long[] |
getLengths()
|
|
long |
getLong()
|
|
String |
getName()
|
|
javax.jcr.Node |
getNode()
|
|
javax.jcr.Node |
getParent()
|
|
String |
getPath()
|
|
javax.jcr.Property |
getProperty()
|
|
javax.jcr.Session |
getSession()
|
|
InputStream |
getStream()
|
|
String |
getString()
|
|
int |
getType()
|
|
javax.jcr.Value |
getValue()
|
|
javax.jcr.Value[] |
getValues()
|
|
boolean |
isModified()
|
|
boolean |
isMultiple()
|
|
boolean |
isNew()
|
|
boolean |
isNode()
|
|
boolean |
isSame(javax.jcr.Item otherItem)
|
|
protected
|
perform(SessionOperation<U> op)
Perform the passed SessionOperation . |
|
void |
refresh(boolean keepChanges)
|
|
void |
remove()
|
|
protected
|
safePerform(SessionOperation<U> op)
Perform the passed SessionOperation assuming it does not throw an
RepositoryException . |
|
void |
save()
This implementation delegates to Session.save() if SAVE_SESSION is
true . |
|
void |
setValue(BigDecimal value)
|
|
void |
setValue(javax.jcr.Binary value)
|
|
void |
setValue(boolean value)
|
|
void |
setValue(Calendar value)
|
|
void |
setValue(double value)
|
|
void |
setValue(InputStream value)
|
|
void |
setValue(long value)
|
|
void |
setValue(javax.jcr.Node value)
|
|
void |
setValue(String value)
|
|
void |
setValue(String[] strings)
|
|
void |
setValue(javax.jcr.Value value)
|
|
void |
setValue(javax.jcr.Value[] values)
|
|
String |
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 Detail |
---|
public static final String ITEM_SAVE_DOES_SESSION_SAVE
public static final int MV_PROPERTY_WARN_THRESHOLD
public static final boolean SAVE_SESSION
save()
. If false
,
save will throw a UnsupportedRepositoryOperationException
if the
sub tree rooted at this item does not contain all transient changes. If
true
, save will delegate to Session.save()
.
protected final SessionContext sessionContext
protected final T extends ItemDelegate dlg
protected final SessionDelegate sessionDelegate
Method Detail |
---|
public boolean isNode()
isNode
in interface javax.jcr.Item
@Nonnull public javax.jcr.Node getParent() throws javax.jcr.RepositoryException
getParent
in interface javax.jcr.Item
javax.jcr.RepositoryException
public boolean isNew()
isNew
in interface javax.jcr.Item
public boolean isModified()
isModified
in interface javax.jcr.Item
public void remove() throws javax.jcr.RepositoryException
remove
in interface javax.jcr.Item
javax.jcr.RepositoryException
public void accept(javax.jcr.ItemVisitor visitor) throws javax.jcr.RepositoryException
accept
in interface javax.jcr.Item
javax.jcr.RepositoryException
public void setValue(javax.jcr.Value value) throws javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
public void setValue(javax.jcr.Value[] values) throws javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
public void setValue(String value) throws javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
public void setValue(String[] strings) throws javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
public void setValue(InputStream value) throws javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
public void setValue(javax.jcr.Binary value) throws javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
public void setValue(long value) throws javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
public void setValue(double value) throws javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
public void setValue(BigDecimal value) throws javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
public void setValue(Calendar value) throws javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
public void setValue(boolean value) throws javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
public void setValue(javax.jcr.Node value) throws javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
@Nonnull public javax.jcr.Value getValue() throws javax.jcr.RepositoryException
getValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
@Nonnull public javax.jcr.Value[] getValues() throws javax.jcr.RepositoryException
getValues
in interface javax.jcr.Property
javax.jcr.RepositoryException
@Nonnull public String getString() throws javax.jcr.RepositoryException
getString
in interface javax.jcr.Property
javax.jcr.RepositoryException
@Nonnull public InputStream getStream() throws javax.jcr.RepositoryException
getStream
in interface javax.jcr.Property
javax.jcr.RepositoryException
@Nonnull public javax.jcr.Binary getBinary() throws javax.jcr.RepositoryException
getBinary
in interface javax.jcr.Property
javax.jcr.RepositoryException
public long getLong() throws javax.jcr.RepositoryException
getLong
in interface javax.jcr.Property
javax.jcr.RepositoryException
public double getDouble() throws javax.jcr.RepositoryException
getDouble
in interface javax.jcr.Property
javax.jcr.RepositoryException
@Nonnull public BigDecimal getDecimal() throws javax.jcr.RepositoryException
getDecimal
in interface javax.jcr.Property
javax.jcr.RepositoryException
@Nonnull public Calendar getDate() throws javax.jcr.RepositoryException
getDate
in interface javax.jcr.Property
javax.jcr.RepositoryException
public boolean getBoolean() throws javax.jcr.RepositoryException
getBoolean
in interface javax.jcr.Property
javax.jcr.RepositoryException
@Nonnull public javax.jcr.Node getNode() throws javax.jcr.RepositoryException
getNode
in interface javax.jcr.Property
javax.jcr.RepositoryException
@Nonnull public javax.jcr.Property getProperty() throws javax.jcr.RepositoryException
getProperty
in interface javax.jcr.Property
javax.jcr.RepositoryException
public long getLength() throws javax.jcr.RepositoryException
getLength
in interface javax.jcr.Property
javax.jcr.RepositoryException
@Nonnull public long[] getLengths() throws javax.jcr.RepositoryException
getLengths
in interface javax.jcr.Property
javax.jcr.RepositoryException
@Nonnull public javax.jcr.nodetype.PropertyDefinition getDefinition() throws javax.jcr.RepositoryException
getDefinition
in interface javax.jcr.Property
javax.jcr.RepositoryException
public int getType() throws javax.jcr.RepositoryException
getType
in interface javax.jcr.Property
javax.jcr.RepositoryException
public boolean isMultiple() throws javax.jcr.RepositoryException
isMultiple
in interface javax.jcr.Property
javax.jcr.RepositoryException
@CheckForNull protected final <U> U perform(@Nonnull SessionOperation<U> op) throws javax.jcr.RepositoryException
SessionOperation
.
U
- return type of the operationop
- operation to perform
op.perform()
javax.jcr.RepositoryException
- as thrown by op.perform()
.@CheckForNull protected final <U> U safePerform(@Nonnull SessionOperation<U> op)
SessionOperation
assuming it does not throw an
RepositoryException
. If it does, wrap it into and throw it as a
RuntimeException
.
U
- return type of the operationop
- operation to perform
op.perform()
@Nonnull public String getName() throws javax.jcr.RepositoryException
getName
in interface javax.jcr.Item
javax.jcr.RepositoryException
Item.getName()
@Nonnull public String getPath() throws javax.jcr.RepositoryException
getPath
in interface javax.jcr.Item
javax.jcr.RepositoryException
Item.getPath()
@Nonnull public javax.jcr.Session getSession()
getSession
in interface javax.jcr.Item
public javax.jcr.Item getAncestor(int depth) throws javax.jcr.RepositoryException
getAncestor
in interface javax.jcr.Item
javax.jcr.RepositoryException
public int getDepth() throws javax.jcr.RepositoryException
getDepth
in interface javax.jcr.Item
javax.jcr.RepositoryException
public boolean isSame(javax.jcr.Item otherItem) throws javax.jcr.RepositoryException
isSame
in interface javax.jcr.Item
javax.jcr.RepositoryException
Item.isSame(javax.jcr.Item)
public void save() throws javax.jcr.RepositoryException
Session.save()
if SAVE_SESSION
is
true
. Otherwise it only performs the save if the subtree rooted at this item contains
all transient changes. That is, if calling Session.save()
would have the same effect
as calling this method. In all other cases this method will throw an
UnsupportedRepositoryOperationException
save
in interface javax.jcr.Item
javax.jcr.RepositoryException
Item.save()
public void refresh(boolean keepChanges) throws javax.jcr.RepositoryException
refresh
in interface javax.jcr.Item
javax.jcr.RepositoryException
Item.refresh(boolean)
public String toString()
toString
in class Object
protected org.apache.jackrabbit.oak.api.PropertyState createSingleState(String oakName, javax.jcr.Value value, org.apache.jackrabbit.oak.api.Type<?> type) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected org.apache.jackrabbit.oak.api.PropertyState createMultiState(String oakName, List<javax.jcr.Value> values, org.apache.jackrabbit.oak.api.Type<?> type) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |