|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.ItemImpl
org.apache.jackrabbit.core.PropertyImpl
public class PropertyImpl
PropertyImpl
implements the Property
interface.
Field Summary |
---|
Fields inherited from class org.apache.jackrabbit.core.ItemImpl |
---|
id, itemMgr, rep, session, stateMgr, STATUS_DESTROYED, STATUS_INVALIDATED, STATUS_MODIFIED, STATUS_NORMAL |
Method Summary | |
---|---|
void |
accept(javax.jcr.ItemVisitor visitor)
|
protected void |
checkSetValue(boolean multipleValues)
Checks various pre-conditions that are common to all setValue() methods. |
boolean |
getBoolean()
|
Calendar |
getDate()
|
javax.jcr.nodetype.PropertyDefinition |
getDefinition()
|
double |
getDouble()
|
long |
getLength()
|
protected long |
getLength(InternalValue value)
Determines the length of the given value. |
long[] |
getLengths()
|
long |
getLong()
|
String |
getName()
|
javax.jcr.Node |
getNode()
|
protected ItemState |
getOrCreateTransientItemState()
|
javax.jcr.Node |
getParent()
|
Name |
getQName()
Same as except that
this method returns a Name instead of a
String . |
InputStream |
getStream()
|
String |
getString()
|
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 |
isNode()
|
protected void |
makePersistent()
|
protected void |
onRedefine(PropDefId defId)
|
protected void |
restoreTransient(PropertyState transientState)
|
void |
setValue(boolean value)
|
void |
setValue(Calendar value)
|
void |
setValue(double value)
|
void |
setValue(InputStream value)
|
void |
setValue(long 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 target)
|
void |
setValue(String value)
|
void |
setValue(String[] strings)
|
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. |
Methods inherited from class org.apache.jackrabbit.core.ItemImpl |
---|
getAncestor, getDepth, getId, getPath, getPrimaryPath, getSession, internalRemove, isModified, isNew, isSame, isTransactionalNew, isTransient, refresh, remove, safeGetJCRPath, sanityCheck, save, setRemoved |
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, getPath, getSession, isModified, isNew, isSame, refresh, remove, save |
Method Detail |
---|
protected ItemState getOrCreateTransientItemState() throws javax.jcr.RepositoryException
getOrCreateTransientItemState
in class ItemImpl
javax.jcr.RepositoryException
protected void makePersistent() throws javax.jcr.InvalidItemStateException
makePersistent
in class ItemImpl
javax.jcr.InvalidItemStateException
protected void restoreTransient(PropertyState transientState) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected void onRedefine(PropDefId defId) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected long getLength(InternalValue value) throws javax.jcr.RepositoryException
value
- value whose length should be determined
javax.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 values
javax.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-out
javax.jcr.lock.LockException
- if the parent node is locked by somebody else
javax.jcr.nodetype.ConstraintViolationException
- if the property is protected
javax.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.ConstraintViolationException
javax.jcr.RepositoryException
public 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.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public 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.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public Name getQName()
Item.getName()
except that
this method returns a Name
instead of a
String
.
getQName
in class ItemImpl
Name
public InternalValue[] internalGetValues() throws javax.jcr.RepositoryException
javax.jcr.ValueFormatException
- if this property is not multi-valued
javax.jcr.RepositoryException
public InternalValue internalGetValue() throws javax.jcr.RepositoryException
javax.jcr.ValueFormatException
- if this property is not single-valued
javax.jcr.RepositoryException
public javax.jcr.Value[] getValues() throws javax.jcr.RepositoryException
getValues
in interface javax.jcr.Property
javax.jcr.RepositoryException
public javax.jcr.Value getValue() throws javax.jcr.RepositoryException
getValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
public String getString() throws javax.jcr.RepositoryException
getString
in interface javax.jcr.Property
javax.jcr.RepositoryException
public InputStream getStream() throws javax.jcr.RepositoryException
getStream
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
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
public javax.jcr.Node getNode() throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
getNode
in interface javax.jcr.Property
javax.jcr.ValueFormatException
javax.jcr.RepositoryException
public void setValue(Calendar 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(InputStream value) 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(boolean value) throws javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
public void setValue(javax.jcr.Node target) throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.ValueFormatException
javax.jcr.RepositoryException
public void setValue(long value) throws javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.RepositoryException
public 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.Property
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public void setValue(javax.jcr.Value[] values) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
setValue
in interface javax.jcr.Property
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public 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.UNDEFINED
javax.jcr.RepositoryException
- if the property values could not be setpublic long getLength() throws javax.jcr.RepositoryException
getLength
in interface javax.jcr.Property
javax.jcr.RepositoryException
public long[] getLengths() throws javax.jcr.RepositoryException
getLengths
in interface javax.jcr.Property
javax.jcr.RepositoryException
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 isNode()
isNode
in interface javax.jcr.Item
isNode
in class ItemImpl
public String getName() throws javax.jcr.RepositoryException
getName
in interface javax.jcr.Item
getName
in class ItemImpl
javax.jcr.RepositoryException
public void accept(javax.jcr.ItemVisitor visitor) throws javax.jcr.RepositoryException
accept
in interface javax.jcr.Item
accept
in class ItemImpl
javax.jcr.RepositoryException
public javax.jcr.Node getParent() throws javax.jcr.RepositoryException
getParent
in interface javax.jcr.Item
getParent
in class ItemImpl
javax.jcr.RepositoryException
public String toString()
toString
in class ItemImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |