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 voidcacheSavePropertyBinding(java.lang.String property, SavePropertyBinding s)Cache save property binding by property stringvoidclear()java.util.Set<org.zkoss.util.Pair<java.lang.String,SavePropertyBinding>>collectCachedSavePropertyBinding()Collect all of collect cached save property bindingsbooleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)java.util.Set<java.util.Map.Entry<K,V>>entrySet()Vget(java.lang.Object key)java.lang.ObjectgetOriginObject()Returns the origin object.booleanisEmpty()booleanisFormDirty()Returns whether the form proxy object is dirty or not, including all of its attributes.java.util.Set<K>keySet()voidonDataChange(java.lang.Object o)voidonDirtyChange()Vput(K key, V value)voidputAll(java.util.Map<? extends K,? extends V> m)Vremove(java.lang.Object key)protected java.lang.ObjectreplaceOrigin(java.lang.Object origin)voidresetFromOrigin()Resets all of the changes of this form from the origin object.protected voidsetDirty(boolean d)voidsetFormOwner(java.lang.Object owner, FormBinding binding)Sets the owner of this form with its binding.voidsetHandler(javassist.util.proxy.MethodHandler mi)voidsetPath(java.lang.String property, ProxyNode parent)Set the property of current form proxy object and it's creatorintsize()voidsubmitToOrigin(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:FormProxyObjectReturns the origin object.- Specified by:
getOriginObjectin interfaceFormProxyObject
-
replaceOrigin
protected java.lang.Object replaceOrigin(java.lang.Object origin)
-
resetFromOrigin
public void resetFromOrigin()
Description copied from interface:FormProxyObjectResets all of the changes of this form from the origin object.- Specified by:
resetFromOriginin interfaceFormProxyObject
-
submitToOrigin
public void submitToOrigin(BindContext ctx)
Description copied from interface:FormProxyObjectSaves all of the changes of this form to the origin object.- Specified by:
submitToOriginin 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:FormProxyObjectReturns whether the form proxy object is dirty or not, including all of its attributes.- Specified by:
isFormDirtyin interfaceFormProxyObject
-
setHandler
public void setHandler(javassist.util.proxy.MethodHandler mi)
- Specified by:
setHandlerin 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:FormProxyObjectSets the owner of this form with its binding.- Specified by:
setFormOwnerin interfaceFormProxyObject- Parameters:
owner- the object associated with this form.
-
cacheSavePropertyBinding
public void cacheSavePropertyBinding(java.lang.String property, SavePropertyBinding s)Description copied from interface:FormProxyObjectCache save property binding by property string- Specified by:
cacheSavePropertyBindingin interfaceFormProxyObject- Parameters:
property- the property of save property bindings- the save property binding
-
collectCachedSavePropertyBinding
public java.util.Set<org.zkoss.util.Pair<java.lang.String,SavePropertyBinding>> collectCachedSavePropertyBinding()
Description copied from interface:FormProxyObjectCollect all of collect cached save property bindings- Specified by:
collectCachedSavePropertyBindingin interfaceFormProxyObject
-
setPath
public void setPath(java.lang.String property, ProxyNode parent)Description copied from interface:FormProxyObjectSet the property of current form proxy object and it's creator- Specified by:
setPathin interfaceFormProxyObject- Parameters:
property- p the propertyparent- parent the parent proxy node
-
-