View Javadoc
1   /*
2    * Copyright (c) 2002-2022, City of Paris
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions
7    * are met:
8    *
9    *  1. Redistributions of source code must retain the above copyright notice
10   *     and the following disclaimer.
11   *
12   *  2. Redistributions in binary form must reproduce the above copyright notice
13   *     and the following disclaimer in the documentation and/or other materials
14   *     provided with the distribution.
15   *
16   *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
17   *     contributors may be used to endorse or promote products derived from
18   *     this software without specific prior written permission.
19   *
20   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30   * POSSIBILITY OF SUCH DAMAGE.
31   *
32   * License 1.0
33   */
34  package fr.paris.lutece.util.jpa;
35  
36  import java.util.List;
37  import java.util.Map;
38  import javax.persistence.EntityGraph;
39  
40  import javax.persistence.EntityManager;
41  import javax.persistence.EntityManagerFactory;
42  import javax.persistence.EntityTransaction;
43  import javax.persistence.FlushModeType;
44  import javax.persistence.LockModeType;
45  import javax.persistence.Query;
46  import javax.persistence.StoredProcedureQuery;
47  import javax.persistence.TypedQuery;
48  import javax.persistence.criteria.CriteriaBuilder;
49  import javax.persistence.criteria.CriteriaDelete;
50  import javax.persistence.criteria.CriteriaQuery;
51  import javax.persistence.criteria.CriteriaUpdate;
52  import javax.persistence.metamodel.Metamodel;
53  
54  final class TestEntityManager implements EntityManager
55  {
56      @Override
57      public <T> T unwrap( Class<T> cls )
58      {
59          // TODO Auto-generated method stub
60          return null;
61      }
62  
63      @Override
64      public void setProperty( String propertyName, Object value )
65      {
66          // TODO Auto-generated method stub
67  
68      }
69  
70      @Override
71      public void setFlushMode( FlushModeType flushMode )
72      {
73          // TODO Auto-generated method stub
74  
75      }
76  
77      @Override
78      public void remove( Object entity )
79      {
80          // TODO Auto-generated method stub
81  
82      }
83  
84      @Override
85      public void refresh( Object entity, LockModeType lockMode, Map<String, Object> properties )
86      {
87          // TODO Auto-generated method stub
88  
89      }
90  
91      @Override
92      public void refresh( Object entity, LockModeType lockMode )
93      {
94          // TODO Auto-generated method stub
95  
96      }
97  
98      @Override
99      public void refresh( Object entity, Map<String, Object> properties )
100     {
101         // TODO Auto-generated method stub
102 
103     }
104 
105     @Override
106     public void refresh( Object entity )
107     {
108         // TODO Auto-generated method stub
109 
110     }
111 
112     @Override
113     public void persist( Object entity )
114     {
115         // TODO Auto-generated method stub
116 
117     }
118 
119     @Override
120     public <T> T merge( T entity )
121     {
122         // TODO Auto-generated method stub
123         return null;
124     }
125 
126     @Override
127     public void lock( Object entity, LockModeType lockMode, Map<String, Object> properties )
128     {
129         // TODO Auto-generated method stub
130 
131     }
132 
133     @Override
134     public void lock( Object entity, LockModeType lockMode )
135     {
136         // TODO Auto-generated method stub
137 
138     }
139 
140     @Override
141     public void joinTransaction( )
142     {
143         // TODO Auto-generated method stub
144 
145     }
146 
147     @Override
148     public boolean isOpen( )
149     {
150         // TODO Auto-generated method stub
151         return false;
152     }
153 
154     @Override
155     public EntityTransaction getTransaction( )
156     {
157         // TODO Auto-generated method stub
158         return null;
159     }
160 
161     @Override
162     public <T> T getReference( Class<T> entityClass, Object primaryKey )
163     {
164         // TODO Auto-generated method stub
165         return null;
166     }
167 
168     @Override
169     public Map<String, Object> getProperties( )
170     {
171         // TODO Auto-generated method stub
172         return null;
173     }
174 
175     @Override
176     public Metamodel getMetamodel( )
177     {
178         // TODO Auto-generated method stub
179         return null;
180     }
181 
182     @Override
183     public LockModeType getLockMode( Object entity )
184     {
185         // TODO Auto-generated method stub
186         return null;
187     }
188 
189     @Override
190     public FlushModeType getFlushMode( )
191     {
192         // TODO Auto-generated method stub
193         return null;
194     }
195 
196     @Override
197     public EntityManagerFactory getEntityManagerFactory( )
198     {
199         // TODO Auto-generated method stub
200         return null;
201     }
202 
203     @Override
204     public Object getDelegate( )
205     {
206         // TODO Auto-generated method stub
207         return null;
208     }
209 
210     @Override
211     public CriteriaBuilder getCriteriaBuilder( )
212     {
213         // TODO Auto-generated method stub
214         return null;
215     }
216 
217     @Override
218     public void flush( )
219     {
220         // TODO Auto-generated method stub
221 
222     }
223 
224     @Override
225     public <T> T find( Class<T> entityClass, Object primaryKey, LockModeType lockMode, Map<String, Object> properties )
226     {
227         // TODO Auto-generated method stub
228         return null;
229     }
230 
231     @Override
232     public <T> T find( Class<T> entityClass, Object primaryKey, LockModeType lockMode )
233     {
234         // TODO Auto-generated method stub
235         return null;
236     }
237 
238     @Override
239     public <T> T find( Class<T> entityClass, Object primaryKey, Map<String, Object> properties )
240     {
241         // TODO Auto-generated method stub
242         return null;
243     }
244 
245     @Override
246     public <T> T find( Class<T> entityClass, Object primaryKey )
247     {
248         // TODO Auto-generated method stub
249         return null;
250     }
251 
252     @Override
253     public void detach( Object entity )
254     {
255         // TODO Auto-generated method stub
256 
257     }
258 
259     @Override
260     public <T> TypedQuery<T> createQuery( String qlString, Class<T> resultClass )
261     {
262         // TODO Auto-generated method stub
263         return null;
264     }
265 
266     @Override
267     public <T> TypedQuery<T> createQuery( CriteriaQuery<T> criteriaQuery )
268     {
269         // TODO Auto-generated method stub
270         return null;
271     }
272 
273     @Override
274     public Query createQuery( String qlString )
275     {
276         // TODO Auto-generated method stub
277         return null;
278     }
279 
280     @Override
281     public Query createNativeQuery( String sqlString, String resultSetMapping )
282     {
283         // TODO Auto-generated method stub
284         return null;
285     }
286 
287     @Override
288     public Query createNativeQuery( String sqlString, Class resultClass )
289     {
290         // TODO Auto-generated method stub
291         return null;
292     }
293 
294     @Override
295     public Query createNativeQuery( String sqlString )
296     {
297         // TODO Auto-generated method stub
298         return null;
299     }
300 
301     @Override
302     public <T> TypedQuery<T> createNamedQuery( String name, Class<T> resultClass )
303     {
304         // TODO Auto-generated method stub
305         return null;
306     }
307 
308     @Override
309     public Query createNamedQuery( String name )
310     {
311         // TODO Auto-generated method stub
312         return null;
313     }
314 
315     @Override
316     public boolean contains( Object entity )
317     {
318         // TODO Auto-generated method stub
319         return false;
320     }
321 
322     @Override
323     public void close( )
324     {
325         // TODO Auto-generated method stub
326 
327     }
328 
329     @Override
330     public void clear( )
331     {
332         // TODO Auto-generated method stub
333 
334     }
335 
336     @Override
337     public Query createQuery( CriteriaUpdate cu )
338     {
339         // TODO Auto-generated method stub
340         return null;
341     }
342 
343     @Override
344     public Query createQuery( CriteriaDelete cd )
345     {
346         // TODO Auto-generated method stub
347         return null;
348     }
349 
350     @Override
351     public StoredProcedureQuery createNamedStoredProcedureQuery( String string )
352     {
353         // TODO Auto-generated method stub
354         return null;
355     }
356 
357     @Override
358     public StoredProcedureQuery createStoredProcedureQuery( String string )
359     {
360         // TODO Auto-generated method stub
361         return null;
362     }
363 
364     @Override
365     public StoredProcedureQuery createStoredProcedureQuery( String string, Class... types )
366     {
367         // TODO Auto-generated method stub
368         return null;
369     }
370 
371     @Override
372     public StoredProcedureQuery createStoredProcedureQuery( String string, String... strings )
373     {
374         // TODO Auto-generated method stub
375         return null;
376     }
377 
378     @Override
379     public boolean isJoinedToTransaction( )
380     {
381         // TODO Auto-generated method stub
382         return false;
383     }
384 
385     @Override
386     public <T> EntityGraph<T> createEntityGraph( Class<T> type )
387     {
388         // TODO Auto-generated method stub
389         return null;
390     }
391 
392     @Override
393     public EntityGraph<?> createEntityGraph( String string )
394     {
395         throw new UnsupportedOperationException( "Not supported yet." ); // To change body of generated methods, choose Tools | Templates.
396     }
397 
398     @Override
399     public EntityGraph<?> getEntityGraph( String string )
400     {
401         throw new UnsupportedOperationException( "Not supported yet." ); // To change body of generated methods, choose Tools | Templates.
402     }
403 
404     @Override
405     public <T> List<EntityGraph<? super T>> getEntityGraphs( Class<T> type )
406     {
407         throw new UnsupportedOperationException( "Not supported yet." ); // To change body of generated methods, choose Tools | Templates.
408     }
409 }