Package org.zkoss.bind.proxy
Class MapProxy<K,V>
- java.lang.Object
-
- org.zkoss.bind.proxy.MapProxy<K,V>
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.Map<K,V>
,javassist.util.proxy.Proxy
,FormProxyObject
public class MapProxy<K,V> extends java.lang.Object implements java.util.Map<K,V>, javassist.util.proxy.Proxy, FormProxyObject, java.io.Serializable
A proxy object to implement Map- Since:
- 8.0.0
- Author:
- jumperchen
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cacheSavePropertyBinding(java.lang.String property, SavePropertyBinding s)
Cache save property binding by property stringvoid
clear()
java.util.Set<Pair<java.lang.String,SavePropertyBinding>>
collectCachedSavePropertyBinding()
Collect all of collect cached save property bindingsboolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
V
get(java.lang.Object key)
java.lang.Object
getOriginObject()
Returns the origin object.boolean
isEmpty()
boolean
isFormDirty()
Returns whether the form proxy object is dirty or not, including all of its attributes.java.util.Set<K>
keySet()
void
onDataChange(java.lang.Object o)
void
onDirtyChange()
V
put(K key, V value)
void
putAll(java.util.Map<? extends K,? extends V> m)
V
remove(java.lang.Object key)
protected java.lang.Object
replaceOrigin(java.lang.Object origin)
void
resetFromOrigin()
Resets all of the changes of this form from the origin object.protected void
setDirty(boolean d)
void
setFormOwner(java.lang.Object owner, FormBinding binding)
Sets the owner of this form with its binding.void
setHandler(javassist.util.proxy.MethodHandler mi)
void
setPath(java.lang.String property, ProxyNode parent)
Set the property of current form proxy object and it's creatorint
size()
void
submitToOrigin(BindContext ctx)
Saves all of the changes of this form to the origin object.java.util.Collection<V>
values()
-
-
-
Method Detail
-
getOriginObject
public java.lang.Object getOriginObject()
Description copied from interface:FormProxyObject
Returns the origin object.- Specified by:
getOriginObject
in interfaceFormProxyObject
-
replaceOrigin
protected java.lang.Object replaceOrigin(java.lang.Object origin)
-
resetFromOrigin
public void resetFromOrigin()
Description copied from interface:FormProxyObject
Resets all of the changes of this form from the origin object.- Specified by:
resetFromOrigin
in interfaceFormProxyObject
-
submitToOrigin
public void submitToOrigin(BindContext ctx)
Description copied from interface:FormProxyObject
Saves all of the changes of this form to the origin object.- Specified by:
submitToOrigin
in interfaceFormProxyObject
-
onDirtyChange
public void onDirtyChange()
-
onDataChange
public void onDataChange(java.lang.Object o)
-
setDirty
protected void setDirty(boolean d)
-
isFormDirty
public boolean isFormDirty()
Description copied from interface:FormProxyObject
Returns whether the form proxy object is dirty or not, including all of its attributes.- Specified by:
isFormDirty
in interfaceFormProxyObject
-
setHandler
public void setHandler(javassist.util.proxy.MethodHandler mi)
- Specified by:
setHandler
in interfacejavassist.util.proxy.Proxy
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
values
public java.util.Collection<V> values()
-
setFormOwner
public void setFormOwner(java.lang.Object owner, FormBinding binding)
Description copied from interface:FormProxyObject
Sets the owner of this form with its binding.- Specified by:
setFormOwner
in interfaceFormProxyObject
- Parameters:
owner
- the object associated with this form.
-
cacheSavePropertyBinding
public void cacheSavePropertyBinding(java.lang.String property, SavePropertyBinding s)
Description copied from interface:FormProxyObject
Cache save property binding by property string- Specified by:
cacheSavePropertyBinding
in interfaceFormProxyObject
- Parameters:
property
- the property of save property bindings
- the save property binding
-
collectCachedSavePropertyBinding
public java.util.Set<Pair<java.lang.String,SavePropertyBinding>> collectCachedSavePropertyBinding()
Description copied from interface:FormProxyObject
Collect all of collect cached save property bindings- Specified by:
collectCachedSavePropertyBinding
in interfaceFormProxyObject
-
setPath
public void setPath(java.lang.String property, ProxyNode parent)
Description copied from interface:FormProxyObject
Set the property of current form proxy object and it's creator- Specified by:
setPath
in interfaceFormProxyObject
- Parameters:
property
- p the propertyparent
- parent the parent proxy node
-
-