|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ibatis.ognl.ObjectPropertyAccessor
public class ObjectPropertyAccessor
Implementation of PropertyAccessor that uses reflection on the target object's class to find a field or a pair of set/get methods with the given property name.
Constructor Summary | |
---|---|
ObjectPropertyAccessor()
|
Method Summary | |
---|---|
java.lang.Object |
getPossibleProperty(java.util.Map context,
java.lang.Object target,
java.lang.String name)
Returns OgnlRuntime.NotFound if the property does not exist. |
java.lang.Object |
getProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object oname)
Extracts and returns the property of the given name from the given target object. |
boolean |
hasGetProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object oname)
|
boolean |
hasGetProperty(OgnlContext context,
java.lang.Object target,
java.lang.Object oname)
|
boolean |
hasSetProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object oname)
|
boolean |
hasSetProperty(OgnlContext context,
java.lang.Object target,
java.lang.Object oname)
|
java.lang.Object |
setPossibleProperty(java.util.Map context,
java.lang.Object target,
java.lang.String name,
java.lang.Object value)
Returns OgnlRuntime.NotFound if the property does not exist. |
void |
setProperty(java.util.Map context,
java.lang.Object target,
java.lang.Object oname,
java.lang.Object value)
Sets the value of the property of the given name in the given target object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectPropertyAccessor()
Method Detail |
---|
public java.lang.Object getPossibleProperty(java.util.Map context, java.lang.Object target, java.lang.String name) throws OgnlException
OgnlException
public java.lang.Object setPossibleProperty(java.util.Map context, java.lang.Object target, java.lang.String name, java.lang.Object value) throws OgnlException
OgnlException
public boolean hasGetProperty(OgnlContext context, java.lang.Object target, java.lang.Object oname) throws OgnlException
OgnlException
public boolean hasGetProperty(java.util.Map context, java.lang.Object target, java.lang.Object oname) throws OgnlException
OgnlException
public boolean hasSetProperty(OgnlContext context, java.lang.Object target, java.lang.Object oname) throws OgnlException
OgnlException
public boolean hasSetProperty(java.util.Map context, java.lang.Object target, java.lang.Object oname) throws OgnlException
OgnlException
public java.lang.Object getProperty(java.util.Map context, java.lang.Object target, java.lang.Object oname) throws OgnlException
PropertyAccessor
getProperty
in interface PropertyAccessor
target
- the object to get the property fromoname
- the name of the property to get
OgnlException
- if there is an error locating the property in the given objectpublic void setProperty(java.util.Map context, java.lang.Object target, java.lang.Object oname, java.lang.Object value) throws OgnlException
PropertyAccessor
setProperty
in interface PropertyAccessor
target
- the object to set the property inoname
- the name of the property to setvalue
- the new value for the property
OgnlException
- if there is an error setting the property in the given object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |