httpInvokerServices : remoting services spring config file
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / conversation / ConversationHolderMock.java
1 package eu.etaxonomy.cdm.api.conversation;
2
3 import javax.sql.DataSource;
4
5 import org.hibernate.Session;
6 import org.hibernate.SessionFactory;
7 import org.springframework.transaction.PlatformTransactionManager;
8 import org.springframework.transaction.TransactionStatus;
9
10 public class ConversationHolderMock extends ConversationHolder {
11
12
13 public ConversationHolderMock() {
14
15 }
16 /**
17 * This method has to be called when starting a new unit-of-work. All required resources are
18 * bound so that SessionFactory.getCurrentSession() returns the right session for this conversation
19 */
20 public void bind() {
21
22 }
23 //
24 // public SessionHolder getSessionHolder(){
25 // return null;
26 // }
27 //
28 // /**
29 // * @return
30 // */
31 // private DataSource getDataSource() {
32 // return null;
33 // }
34 //
35 // /**
36 // * @return true if this longSession is bound to the session factory.
37 // */
38 // public boolean isBound(){
39 // return false;
40 // }
41 //
42 /**
43 * Creates an instance of TransactionStatus and binds it to this conversation manager.
44 * At the moment we allow only on transaction per conversation holder.
45 *
46 * @return the transaction status bound to this conversation holder
47 */
48 public TransactionStatus startTransaction(){
49 return null;
50 }
51 //
52 // /**
53 // * @return if there is a running transaction
54 // */
55 // public boolean isTransactionActive(){
56 // return false;
57 // }
58 //
59 // /* (non-Javadoc)
60 // * @see org.hibernate.Session#evict(java.lang.Object object)
61 // */
62 // public void evict(Object object){
63 //
64 // }
65 //
66 // /* (non-Javadoc)
67 // * @see org.hibernate.Session#refresh(java.lang.Object object)
68 // */
69 // public void refresh(Object object){
70 //
71 // }
72 //
73 // /* (non-Javadoc)
74 // * @see org.hibernate.Session#clear()
75 // */
76 // public void clear(){
77 //
78 // }
79 //
80 /**
81 * Commit the running transaction.
82 */
83 public void commit(){
84
85 }
86
87 /**
88 * Commit the running transaction but optionally start a
89 * new one right away.
90 *
91 * @param restartTransaction whether to start a new transaction
92 */
93 public TransactionStatus commit(boolean restartTransaction){
94 return null;
95 }
96
97 /**
98 * @return the session associated with this conversation manager
99 */
100 public Session getSession() {
101 return null;
102 }
103 //
104 // /**
105 // * @return the session factory that is bound to this conversation manager
106 // */
107 // private SessionFactory getSessionFactory() {
108 // return null;
109 // }
110 //
111 // public void delete(Object object){
112 //
113 // }
114 //
115 // /**
116 // * Facades Session.lock()
117 // */
118 // public void lock(Object persistentObject, LockMode lockMode) {
119 //
120 // }
121 //
122 // public void lock(String entityName, Object persistentObject, LockMode lockMode){
123 // getSession().lock(entityName, persistentObject, lockMode);
124 // }
125 //
126 // /**
127 // * @return the definition
128 // */
129 // public TransactionDefinition getDefinition() {
130 // return null;
131 // }
132 //
133 // /**
134 // * @param definition the definition to set
135 // */
136 // public void setDefinition(TransactionDefinition definition) {
137 //
138 // }
139 //
140 // /**
141 // * Register to get updated after any interaction with the datastore
142 // */
143 // public void registerForDataStoreChanges(IConversationEnabled observer) {
144 //
145 // }
146 //
147 // /**
148 // * Register to get updated after any interaction with the datastore
149 // */
150 // public void unregisterForDataStoreChanges(IConversationEnabled observer) {
151 //
152 // }
153 //
154 /**
155 * Free resources bound to this conversationHolder
156 */
157 public void close(){
158
159 }
160 //
161 // public boolean isClosed(){
162 // return false;
163 // }
164
165 }