org.zkoss.bind.proxy
Class MapProxy<K,V>

java.lang.Object
  extended by org.zkoss.bind.proxy.MapProxy<K,V>
All Implemented Interfaces:
java.io.Serializable, java.util.Map<K,V>, javassist.util.proxy.Proxy, FormProxyObject, FormProxyObjectListener

public class MapProxy<K,V>
extends java.lang.Object
implements java.util.Map<K,V>, javassist.util.proxy.Proxy, FormProxyObject, java.io.Serializable, FormProxyObjectListener

A proxy object to implement Map

Since:
8.0.0
Author:
jumperchen
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
MapProxy(java.util.Map<K,V> origin, java.lang.annotation.Annotation[] callerAnnots)
           
 
Method Summary
 void addFormProxyObjectListener(FormProxyObjectListener l)
          Add listener
 void clear()
           
 boolean 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)
          Call when the data in FormProxyObject change
 void onDirtyChange()
          Call when setting form.dirty true
 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)
           
 int size()
           
 void submitToOrigin(BindContext ctx)
          Saves all of the changes of this form to the origin object.
 java.util.Collection<V> values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

MapProxy

public MapProxy(java.util.Map<K,V> origin,
                java.lang.annotation.Annotation[] callerAnnots)
Method Detail

getOriginObject

public java.lang.Object getOriginObject()
Description copied from interface: FormProxyObject
Returns the origin object.

Specified by:
getOriginObject in interface FormProxyObject

replaceOrigin

protected java.lang.Object replaceOrigin(java.lang.Object origin)

entrySet

public java.util.Set<java.util.Map.Entry<K,V>> entrySet()
Specified by:
entrySet in interface java.util.Map<K,V>

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 interface FormProxyObject

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 interface FormProxyObject

addFormProxyObjectListener

public void addFormProxyObjectListener(FormProxyObjectListener l)
Description copied from interface: FormProxyObject
Add listener

Specified by:
addFormProxyObjectListener in interface FormProxyObject

onDirtyChange

public void onDirtyChange()
Description copied from interface: FormProxyObjectListener
Call when setting form.dirty true

Specified by:
onDirtyChange in interface FormProxyObjectListener

onDataChange

public void onDataChange(java.lang.Object o)
Description copied from interface: FormProxyObjectListener
Call when the data in FormProxyObject change

Specified by:
onDataChange in interface FormProxyObjectListener

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 interface FormProxyObject

setHandler

public void setHandler(javassist.util.proxy.MethodHandler mi)
Specified by:
setHandler in interface javassist.util.proxy.Proxy

size

public int size()
Specified by:
size in interface java.util.Map<K,V>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map<K,V>

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map<K,V>

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map<K,V>

get

public V get(java.lang.Object key)
Specified by:
get in interface java.util.Map<K,V>

put

public V put(K key,
             V value)
Specified by:
put in interface java.util.Map<K,V>

remove

public V remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map<K,V>

putAll

public void putAll(java.util.Map<? extends K,? extends V> m)
Specified by:
putAll in interface java.util.Map<K,V>

clear

public void clear()
Specified by:
clear in interface java.util.Map<K,V>

keySet

public java.util.Set<K> keySet()
Specified by:
keySet in interface java.util.Map<K,V>

values

public java.util.Collection<V> values()
Specified by:
values in interface java.util.Map<K,V>

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 interface FormProxyObject
Parameters:
owner - the object associated with this form.


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo