P
- the generic typepublic class PojoWrapper<P> extends ModelImpl implements Model, javassist.util.proxy.MethodHandler
Model.Attribute
_attributes
Constructor and Description |
---|
PojoWrapper(Class<P> pojoClass)
Instantiates a new PojoWrapper.
|
Modifier and Type | Method and Description |
---|---|
Object |
access(String attributeName)
Returns the value of the attribute.
|
P |
getPojo()
Gets the pojo.
|
Object |
invoke(Object obj,
Method m,
Method method,
Object[] args) |
void |
populate(String attributeName,
Object newValue)
Sets the value for the attribute.
|
void |
setPojo(P value)
Sets the pojo.
|
addAttribute, addAttribute, addAttribute, addPropertyChangeListener, addSubModel, attributeChanged, attributeExists, baseline, clone, copyFrom, getAllAttributes, getAttribute, getAttributes, getAttributeValue, getAttrParams, getModelByAttributeName, getOwner, getRealName, isCDataMethod, isDirty, isGetterMethod, isReaderMethod, isSetterMethod, isSilentUpdate, isUpdateDirtyOnChange, isWriterMethod, propertyChange, read, removePropertyChangeListener, removeSubModel, replaceAttrNames, replaceAttrNames, setAttributeValue, setDirty, setOwner, setSilentUpdate, setUpdateDirtyOnChange, write
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addSubModel, attributeExists, clone, copyFrom, getAllAttributes, getAttributes, getModelByAttributeName, getOwner, propertyChange, read, removePropertyChangeListener, removeSubModel, setOwner, write
public PojoWrapper(Class<P> pojoClass)
pojoClass
- the pojo classpublic Object access(String attributeName)
Model
public P getPojo()
public Object invoke(Object obj, Method m, Method method, Object[] args) throws Throwable
invoke
in interface javassist.util.proxy.MethodHandler
Throwable
public void populate(String attributeName, Object newValue)
Model
public void setPojo(P value) throws Exception
value
- the new pojoException
- in case of any errorCopyright © 2010-2020 Toolsverse. All Rights Reserved.