1 package org.hibernate.proxy; 3 4 import java.io.Serializable ; 5 import java.util.Collection ; 6 import java.util.Map ; 7 import java.util.Set ; 8 9 14 public class MapProxy implements HibernateProxy, Map , Serializable { 15 16 private MapLazyInitializer li; 17 18 MapProxy(MapLazyInitializer li) { 19 this.li = li; 20 } 21 22 public Object writeReplace() { 23 return this; 24 } 25 26 public LazyInitializer getHibernateLazyInitializer() { 27 return li; 28 } 29 30 public int size() { 31 return li.getMap().size(); 32 } 33 34 public void clear() { 35 li.getMap().clear(); 36 } 37 38 public boolean isEmpty() { 39 return li.getMap().isEmpty(); 40 } 41 42 public boolean containsKey(Object key) { 43 return li.getMap().containsKey(key); 44 } 45 46 public boolean containsValue(Object value) { 47 return li.getMap().containsValue(value); 48 } 49 50 public Collection values() { 51 return li.getMap().values(); 52 } 53 54 public void putAll(Map t) { 55 li.getMap().putAll(t); 56 } 57 58 public Set entrySet() { 59 return li.getMap().entrySet(); 60 } 61 62 public Set keySet() { 63 return li.getMap().keySet(); 64 } 65 66 public Object get(Object key) { 67 return li.getMap().get(key); 68 } 69 70 public Object remove(Object key) { 71 return li.getMap().remove(key); 72 } 73 74 public Object put(Object key, Object value) { 75 return li.getMap().put(key, value); 76 } 77 78 } 79 | Popular Tags |