View Javadoc

1   /*
2    * joey and its relative products are published under the terms
3    * of the Apache Software License.
4    * 
5    * Created on 2004/06/09 11:26:14
6    */
7   package org.asyrinx.joey.om;
8   
9   import java.io.Serializable;
10  import java.util.List;
11  
12  /***
13   * @author akima
14   */
15  public class EntityServiceManagerWrapper implements EntityServiceManager {
16  
17  	/***
18  	 * 
19  	 */
20  	public EntityServiceManagerWrapper(EntityServiceManager wrapped) {
21  		super();
22  		this.wrapped = wrapped;
23  	}
24  
25  	protected final EntityServiceManager wrapped;
26  
27  	/* (non-Javadoc)
28  	 * @see org.asyrinx.joey.om.EntityServiceManager#newEntity(java.lang.Class)
29  	 */
30  	public Entity newEntity(Class entityClass) {
31  		return wrapped.newEntity(entityClass);
32  	}
33  
34  	/* (non-Javadoc)
35  	 * @see org.asyrinx.joey.om.EntityServiceManager#restoreBeforeSave(org.asyrinx.joey.om.Entity)
36  	 */
37  	public void restoreBeforeSave(Entity entity) {
38  		wrapped.restoreBeforeSave(entity);
39  	}
40  
41  	/***
42  	 * @param entityClass
43  	 * @param key
44  	 */
45  	public void deleteEntity(Class entityClass, Serializable key) {
46  		wrapped.deleteEntity(entityClass, key);
47  	}
48  
49  	/***
50  	 * @param entityClass
51  	 * @return
52  	 */
53  	public EntityService getEntityService(Class entityClass) {
54  		return wrapped.getEntityService(entityClass);
55  	}
56  
57  	/***
58  	 * @param entityClass
59  	 * @param key
60  	 * @return
61  	 */
62  	public Entity loadEntity(Class entityClass, Serializable key) {
63  		return wrapped.loadEntity(entityClass, key);
64  	}
65  
66  	/***
67  	 * @param entityClass
68  	 * @param entity
69  	 */
70  	public void saveEntity(Class entityClass, Object entity) {
71  		wrapped.saveEntity(entityClass, entity);
72  	}
73  
74  	/***
75  	 * @param entityClass
76  	 * @param condition
77  	 * @return
78  	 */
79  	public List select(Class entityClass, SearchCondition condition) {
80  		return wrapped.select(entityClass, condition);
81  	}
82  
83  }