Project

General

Profile

Download (22.7 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2010 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.remote.dto.assembler.lsid;
10

    
11
import static org.junit.Assert.assertEquals;
12
import static org.junit.Assert.assertNotNull;
13
import static org.junit.Assert.assertNull;
14

    
15
import java.io.Serializable;
16
import java.lang.reflect.Field;
17
import java.lang.reflect.Method;
18
import java.util.ArrayList;
19
import java.util.Arrays;
20
import java.util.Collection;
21
import java.util.HashSet;
22
import java.util.List;
23
import java.util.Set;
24
import java.util.UUID;
25

    
26
import org.apache.logging.log4j.LogManager;
27
import org.apache.logging.log4j.Logger;
28
import org.hibernate.Hibernate;
29
import org.hibernate.HibernateException;
30
import org.hibernate.LazyInitializationException;
31
import org.hibernate.collection.spi.PersistentCollection;
32
import org.hibernate.engine.spi.SessionImplementor;
33
import org.hibernate.engine.spi.SharedSessionContractImplementor;
34
import org.hibernate.proxy.HibernateProxy;
35
import org.hibernate.proxy.LazyInitializer;
36
import org.joda.time.DateTime;
37
import org.joda.time.DateTimeFieldType;
38
import org.joda.time.Partial;
39
import org.junit.Assert;
40
import org.junit.Before;
41
import org.junit.BeforeClass;
42
import org.junit.Test;
43
import org.unitils.UnitilsJUnit4;
44
import org.unitils.spring.annotation.SpringApplicationContext;
45
import org.unitils.spring.annotation.SpringBeanByType;
46

    
47
import com.github.dozermapper.core.Mapper;
48
import com.ibm.lsid.MalformedLSIDException;
49

    
50
import eu.etaxonomy.cdm.common.URI;
51
import eu.etaxonomy.cdm.model.agent.Person;
52
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
53
import eu.etaxonomy.cdm.model.common.Credit;
54
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
55
import eu.etaxonomy.cdm.model.common.LSID;
56
import eu.etaxonomy.cdm.model.common.Language;
57
import eu.etaxonomy.cdm.model.common.LanguageString;
58
import eu.etaxonomy.cdm.model.common.VerbatimTimePeriod;
59
import eu.etaxonomy.cdm.model.description.Distribution;
60
import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
61
import eu.etaxonomy.cdm.model.description.TaxonDescription;
62
import eu.etaxonomy.cdm.model.description.TextData;
63
import eu.etaxonomy.cdm.model.location.NamedArea;
64
import eu.etaxonomy.cdm.model.name.INonViralName;
65
import eu.etaxonomy.cdm.model.name.Rank;
66
import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
67
import eu.etaxonomy.cdm.model.reference.IBook;
68
import eu.etaxonomy.cdm.model.reference.INomenclaturalReference;
69
import eu.etaxonomy.cdm.model.reference.OriginalSourceBase;
70
import eu.etaxonomy.cdm.model.reference.Reference;
71
import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
72
import eu.etaxonomy.cdm.model.taxon.Classification;
73
import eu.etaxonomy.cdm.model.taxon.SecundumSource;
74
import eu.etaxonomy.cdm.model.taxon.Synonym;
75
import eu.etaxonomy.cdm.model.taxon.SynonymType;
76
import eu.etaxonomy.cdm.model.taxon.Taxon;
77
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
78
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
79
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
80
import eu.etaxonomy.cdm.model.term.DefaultTermInitializer;
81
import eu.etaxonomy.cdm.remote.dto.dwc.SimpleDarwinRecord;
82
import eu.etaxonomy.cdm.remote.dto.oaipmh.OaiDc;
83
import eu.etaxonomy.cdm.remote.dto.tdwg.voc.Relationship;
84
import eu.etaxonomy.cdm.remote.dto.tdwg.voc.SpeciesProfileModel;
85
import eu.etaxonomy.cdm.remote.dto.tdwg.voc.TaxonConcept;
86
import eu.etaxonomy.cdm.remote.dto.tdwg.voc.TaxonRelationshipTerm;
87
import eu.etaxonomy.cdm.remote.view.OaiPmhViewTest;
88
import net.sf.cglib.proxy.Enhancer;
89
import net.sf.cglib.proxy.MethodInterceptor;
90
import net.sf.cglib.proxy.MethodProxy;
91

    
92
@SpringApplicationContext("file:./target/test-classes/eu/etaxonomy/cdm/applicationContext-test.xml")
93
public class AssemblerTest extends UnitilsJUnit4 {
94

    
95
    public static final Logger logger = LogManager.getLogger(AssemblerTest.class);
96

    
97
    @SpringBeanByType
98
    private Mapper mapper;
99

    
100
    private Taxon taxon;
101
    private IBook sec;
102
    private IBook book;
103
    private Reference bookSection;
104
    private TeamOrPersonBase<?> authorship;
105
    private INonViralName name;
106
    private LSID lsid;
107
    private TaxonDescription taxonDescription;
108

    
109
    @BeforeClass
110
    public static void onSetUp() {
111
        DefaultTermInitializer defaultTermInitializer = new DefaultTermInitializer();
112
        defaultTermInitializer.initialize();
113
    }
114

    
115
    @Before
116
    public void setUp() throws Exception {
117
        lsid = new LSID("urn:lsid:example.org:taxonconcepts:1");
118

    
119
        authorship = Person.NewInstance();
120
        authorship.setTitleCache("authorship.titleCache", true);
121
        authorship.setLsid(new LSID("urn:lsid:dagg.org:agents:2"));
122

    
123
        name = TaxonNameFactory.NewBotanicalInstance(null);
124
        name.setNameCache("nameCache");
125
        INomenclaturalReference nomenclaturalReference = ReferenceFactory.newArticle();
126
        nomenclaturalReference.setTitleCache("nomenclaturalReference", true);
127
        name.setNomenclaturalReference(nomenclaturalReference);
128
        name.setNomenclaturalMicroReference("1");
129
        name.setAuthorshipCache("authorshipCache");
130
        name.setRank(Rank.SPECIES());
131

    
132
        sec = ReferenceFactory.newBook();
133
        sec.setAuthorship(authorship);
134
        sec.setTitleCache("sec.titleCache", true);
135
        sec.setLsid(new LSID("urn:lsid:example.org:references:1"));
136

    
137
        taxon = Taxon.NewInstance(name, (Reference)sec);
138
        taxon.setCreated(new DateTime(2004, 12, 25, 12, 0, 0, 0));
139
        taxon.setUpdated(new DateTime(2005, 12, 25, 12, 0, 0, 0));
140
        taxon.setTitleCache("titleCache", true);
141
        taxon.setLsid(lsid);
142

    
143
        for(int i = 2; i < 2+1; i++) {
144
            Taxon child = Taxon.NewInstance(name, (Reference)sec);
145
            child.setLsid(new LSID("urn:lsid:example.org:taxonconcepts:r0" + i ));
146
            child.addTaxonRelation(taxon, TaxonRelationshipType.TAXONOMICALLY_INCLUDED_IN(), null, null);
147
        }
148

    
149
        taxonDescription = TaxonDescription.NewInstance();
150
        taxon.addDescription(taxonDescription);
151

    
152
        TextData textData = TextData.NewInstance();
153
        Language english = Language.NewInstance();
154
        english.setIso639_1("en");
155
        Language french = Language.NewInstance();
156
        french.setIso639_1("fr");
157
        textData.getMultilanguageText().put(english, LanguageString.NewInstance("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce justo leo, tempus ultricies bibendum eu, interdum sit amet ipsum. Suspendisse eu odio in sem iaculis euismod. Suspendisse sed metus ante, in sodales risus. In sit amet magna sit amet risus elementum dapibus. Nullam in magna at mauris placerat sagittis. Proin urna nisl, porta at venenatis in, tristique tempus nisl. Proin vel arcu blandit velit vestibulum blandit. In at diam libero, vel malesuada mauris. Duis a enim diam. Donec urna dui, dictum at suscipit vel, consectetur quis est. In venenatis bibendum diam nec laoreet. ", english));
158
        textData.getMultilanguageText().put(french, LanguageString.NewInstance("Mauris elementum malesuada orci, non eleifend metus placerat ut. Aenean ornare felis sed lectus cursus id cursus nulla consectetur. Mauris magna justo, placerat id pretium posuere, ultrices et libero. Aliquam erat volutpat. Ut libero diam, interdum commodo fringilla sollicitudin, faucibus vel nisl. Fusce mattis justo interdum enim rhoncus eget sollicitudin dolor lobortis. Morbi mauris odio, tempus eget egestas eu, ornare vel ante. In quis placerat mi. Aliquam blandit tristique dictum. Donec pretium dui lacinia magna ornare eu venenatis ante dignissim. Integer ullamcorper tempus nisl et tincidunt. Curabitur vel nulla eu dolor faucibus porta. Mauris pulvinar est at est porta molestie. Nam varius nunc nec ipsum lacinia non egestas turpis congue. In at ipsum augue. Nulla mollis lobortis mauris ac sagittis. Nullam et facilisis lacus. Nam euismod sapien pellentesque lacus hendrerit dapibus. Aenean blandit rhoncus feugiat.", french));
159
        taxonDescription.addElement(textData);
160

    
161
        Distribution distribution = Distribution.NewInstance();
162
        NamedArea namedArea = NamedArea.NewInstance("Africa", "Africa", "Africa");
163
        namedArea.setTitleCache("Africa", true);
164
        distribution.setArea(namedArea);
165
        distribution.setStatus(PresenceAbsenceTerm.NATIVE());
166

    
167
        taxonDescription.addElement(distribution);
168

    
169
        // ------------------------------------------------------
170

    
171
        book = ReferenceFactory.newBook();
172
        book.setTitle("Book.title");
173
        book.setAuthorship(authorship);
174
        book.setCreated(new DateTime(2004, 12, 25, 12, 0, 0, 0));
175
        book.setDatePublished(VerbatimTimePeriod.NewVerbatimInstance(new Partial(DateTimeFieldType.year(), 1800)));
176
        book.setEdition("1st Edition");
177
        book.setEditor("Editor");
178
        book.setIsbn("isbn");
179
        book.setPlacePublished("placePublished");
180
        book.setPublisher("publisher");
181
        book.setReferenceAbstract("referenceAbstract");
182
        book.setUri(new URI("http://persitent.books.foo/myBook"));
183
        book.setUuid(UUID.randomUUID());
184
        book.setVolume("Volume 1");
185
        book.addSource(IdentifiableSource.NewDataImportInstance("http://persitent.IdentifiableSources.foo/1"));
186

    
187
        bookSection = ReferenceFactory.newBookSection();
188
        bookSection.setInReference((Reference)book);
189
        bookSection.setPages("999 ff.");
190
        bookSection.setTitle("BookSection.title");
191
        bookSection.setAuthorship(authorship);
192
        bookSection.setCreated(new DateTime(2004, 12, 25, 12, 0, 0, 0));
193
        bookSection.setDatePublished(VerbatimTimePeriod.NewVerbatimInstance(new Partial(DateTimeFieldType.year(), 1800)));
194
        bookSection.setReferenceAbstract("referenceAbstract");
195
        bookSection.setUri(new URI("http://persitent.books.foo/myBookSection"));
196
        bookSection.setUuid(UUID.randomUUID());
197
        bookSection.addCredit(Credit.NewInstance(authorship, null, "Credits to the authorship"));
198
        bookSection.addSource(IdentifiableSource.NewDataImportInstance("http://persitent.IdentifiableSources.foo/2"));
199
    }
200

    
201
    @Test
202
    public void testDeepMapping() throws MalformedLSIDException {
203

    
204
        if(!OaiPmhViewTest.dozerXsdIsAvailable()){
205
            return;
206
        }
207

    
208
        //synonyms
209
        for(int i = 1; i < 1+3; i++) {
210
            Synonym synonym = Synonym.NewInstance(name,(Reference)sec);
211
            synonym.setLsid(new LSID("urn:lsid:example.org:synyonms:" + i ));
212
            taxon.addSynonym(synonym, SynonymType.SYNONYM_OF());
213
        }
214

    
215
        //taxon nodes
216
        TaxonNode rootNode = Classification.NewInstance("Classification").getRootNode();
217
        TaxonNode parentNode = rootNode.addChildTaxon(taxon, null);
218
        for(int i = 11; i < 11+2; i++) {
219
            Taxon child = Taxon.NewInstance(name, (Reference)sec);
220
            child.setLsid(new LSID("urn:lsid:example.org:taxonconcepts:p" + i ));
221
            parentNode.addChildTaxon(child, null);
222
        }
223

    
224
        TaxonConcept taxonConcept = mapper.map(taxon, TaxonConcept.class);
225

    
226
        assertNotNull("map() should return an object", taxonConcept);
227

    
228
        assertEquals("IdentifiableEntity.titleCache should be copied into BaseThing.title",taxon.getTitleCache(),taxonConcept.getTitle());
229
        assertEquals("IdentifiableEntity.lsid should be copied into BaseThing.identifier",taxon.getLsid().toString(),taxonConcept.getIdentifier().toString());
230
        assertEquals("BaseThing.sameAs should refer to the proxy version of the lsid","http://lsid.example.org/" + taxon.getLsid().toString(),taxonConcept.getSameAs());
231
        assertEquals("CdmBase.created should be copied into BaseThing.created",new DateTime(2004, 12, 25, 12, 0, 0, 0),taxonConcept.getCreated());
232
        assertNotNull("TaxonBase.sec should be mapped into BaseThing.publishedInCitation",taxonConcept.getPublishedInCitation());
233
        assertEquals("TaxonBase.sec.titleCache should be mapped into BaseThing.publishedInCitation.title",sec.getTitleCache(),taxonConcept.getPublishedInCitation().getTitle());
234
        assertNotNull("TaxonBase.sec.authorship should be mapped into TaxonConcept.accordingTo",taxonConcept.getAccordingTo());
235
        assertEquals("TaxonBase.sec.authorship.titleCache should be mapped into TaxonConcept.accordingTo.title",authorship.getTitleCache(),taxonConcept.getAccordingTo().getTitle());
236
        assertNotNull("TaxonBase.name should be mapped to TaxonConcept.hasName",taxonConcept.getHasName());
237
        assertEquals("NonViralName.nameCache should be mapped to TaxonName.nameComplete",name.getNameCache(),taxonConcept.getHasName().getNameComplete());
238
        assertNotNull("Taxon.relationsToThisTaxon should be copied into TaxonConcept.hasRelationship",taxonConcept.getHasRelationship());
239
        assertEquals("There should be 6 relations in TaxonConcept.hasRelationship",
240
                6, taxonConcept.getHasRelationship().size());
241
        int nSynonyms = 0;
242
        int nIncludedInTaxa = 0;
243
        int pnParentTaxa = 0;
244
        for (Relationship rel : taxonConcept.getHasRelationship()){
245
            Assert.assertNotNull(rel.getFromTaxon());
246
//            System.out.println(rel.getFromTaxon().getIdentifier().toString());
247
            if (rel.getFromTaxon().getIdentifier().toString().startsWith("urn:lsid:example.org:synyonms:")){
248
                nSynonyms++;
249
            }else if (rel.getFromTaxon().getIdentifier().toString().startsWith("urn:lsid:example.org:taxonconcepts:r")){
250
                nIncludedInTaxa++;
251
            }else if (rel.getFromTaxon().getIdentifier().toString().startsWith("urn:lsid:example.org:taxonconcepts:p")){
252
                TaxonRelationshipTerm category = rel.getRelationshipCategory();
253
                Assert.assertEquals("is taxonomically included in", category.getTitle());
254
                pnParentTaxa++;
255
            }
256
//            System.out.println(rel);
257
        }
258
        Assert.assertEquals(3, nSynonyms);
259
        Assert.assertEquals(1, nIncludedInTaxa);
260
        Assert.assertEquals(2, pnParentTaxa);
261
    }
262

    
263
    @Test
264
    public void testLazyInitializationExceptionWithProxy() throws Exception {
265

    
266
        if(!OaiPmhViewTest.dozerXsdIsAvailable()){
267
            return;
268
        }
269

    
270
        IBook proxy = getUninitializedDetachedProxy(Reference.class,(Reference)sec);
271
        assert !Hibernate.isInitialized(proxy);
272
        SecundumSource source = taxon.getSecSource();
273
        Field secField = OriginalSourceBase.class.getDeclaredField("citation");
274
        secField.setAccessible(true);
275
        secField.set(source, proxy);
276

    
277
        TaxonConcept taxonConcept = mapper.map(taxon, TaxonConcept.class);
278
        assertNull("TaxonBase.sec was uninitialized, so TaxonConcept.publishedInCitation should be null",taxonConcept.getPublishedInCitation());
279
        assertNull("TaxonBase.sec was uninitialized, so TaxonConcept.accordingTo should be null",taxonConcept.getAccordingTo());
280
    }
281

    
282
    @Test
283
    public void testLazyInitializationExceptionWithPersistentCollection() throws Exception {
284

    
285
        if(!OaiPmhViewTest.dozerXsdIsAvailable()){
286
            return;
287
        }
288

    
289
        @SuppressWarnings("unchecked")
290
        Set<TaxonRelationship> proxy = getUninitializedPersistentCollection(
291
                HashSet.class,(HashSet<TaxonRelationship>)taxon.getRelationsToThisTaxon());
292
        assert !Hibernate.isInitialized(proxy);
293
        Field relationsToThisTaxonField = Taxon.class.getDeclaredField("relationsToThisTaxon");
294
        relationsToThisTaxonField.setAccessible(true);
295
        relationsToThisTaxonField.set(taxon, proxy);
296

    
297
        TaxonConcept taxonConcept = mapper.map(taxon, TaxonConcept.class);
298
        Assert.assertTrue("TaxonBase.relationsToThisTaxon was uninitialized, so TaxonConcept.hasRelationship should be null",
299
                taxonConcept.getHasRelationship() == null || taxonConcept.getHasRelationship().isEmpty()); //with taxonNode mapping included this results in null, otherwise empty, not yet checked why
300
    }
301

    
302
    @Test
303
    public void testSpeciesProfileModelMapping() {
304

    
305
        if(!OaiPmhViewTest.dozerXsdIsAvailable()){
306
            return;
307
        }
308

    
309
        SpeciesProfileModel speciesProfileModel = mapper.map(taxonDescription, SpeciesProfileModel.class);
310
        assertEquals(speciesProfileModel.getHasInformation().size(),2);
311
    }
312

    
313
    @Test
314
    public void testSimpleDarwinCoreMapping() {
315

    
316
        if(!OaiPmhViewTest.dozerXsdIsAvailable()){
317
            return;
318
        }
319

    
320
        SimpleDarwinRecord simpleDarwinRecord = mapper.map(taxon, SimpleDarwinRecord.class);
321
        mapper.map(taxon.getName(), simpleDarwinRecord);
322

    
323
        assertNotNull(simpleDarwinRecord.getModified());
324
        assertEquals(taxon.getName().getTitleCache(), simpleDarwinRecord.getScientificName());
325
        assertEquals(taxon.getName().getAuthorshipCache(), simpleDarwinRecord.getScientificNameAuthorship());
326
        assertEquals(taxon.getName().getCitationString(), simpleDarwinRecord.getNamePublishedIn());
327
        assertEquals(Rank.SPECIES().getLabel(), simpleDarwinRecord.getTaxonRank());
328
    }
329

    
330
    @Test
331
    public void testOAIDublinCoreMapping() {
332

    
333
        if(!OaiPmhViewTest.dozerXsdIsAvailable()){
334
            return;
335
        }
336

    
337
        OaiDc oaiDcRecordBook = mapper.map(book, OaiDc.class);
338

    
339
        assertEquals(book.getTitle(), oaiDcRecordBook.getTitle());
340

    
341
        OaiDc oaiDcRecordBookSection = mapper.map(bookSection, OaiDc.class);
342
        assertNotNull(oaiDcRecordBookSection.getRelation());
343
    }
344

    
345
    private <T extends Collection> T getUninitializedPersistentCollection(final Class<T> clazz, final T wrappedCollection) {
346
        final Enhancer enhancer = new Enhancer();
347
        List<Class> interfaces = new ArrayList<>();
348
        interfaces.addAll(Arrays.asList(clazz.getInterfaces()));
349
        interfaces.add(PersistentCollection.class);
350
        enhancer.setSuperclass(clazz);
351
        enhancer.setInterfaces(interfaces.toArray(new Class[interfaces.size()]));
352
        enhancer.setCallback( new MethodInterceptor() {
353
            @Override
354
            public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
355
                if("wasInitialized".equals(method.getName())) {
356
                  return false;
357
                } else if(clazz.getDeclaredConstructor().equals(method)){
358
                     return proxy.invoke(obj, args);
359
                } else if("finalize".equals(method.getName())){
360
                     return proxy.invoke(obj, args);
361
                } else if("toString".equals(method.getName())) {
362
                    return wrappedCollection.toString();
363
                } else if("getClass".equals(method.getName())) {
364
                    return proxy.invoke(obj, args);
365
                } else if("hashCode".equals(method.getName())) {
366
                    return wrappedCollection.hashCode();
367
                }else if("initListener".equals(method.getName())) {
368
                    return null;
369
                } else {
370
                    throw new LazyInitializationException(null);
371
                }
372
            }
373
        });
374

    
375
        @SuppressWarnings("unchecked")
376
        T proxy = (T)enhancer.create();
377
        return proxy;
378
    }
379

    
380
    private <T> T getUninitializedDetachedProxy(final Class<T> clazz,final T wrappedClass) {
381
        final Enhancer enhancer = new Enhancer();
382
        List<Class> interfaces = new ArrayList<>();
383
        interfaces.addAll(Arrays.asList(clazz.getInterfaces()));
384
        interfaces.add(HibernateProxy.class);
385
        enhancer.setSuperclass(clazz);
386
        enhancer.setInterfaces(interfaces.toArray(new Class[interfaces.size()]));
387
        enhancer.setCallback( new MethodInterceptor() {
388
            @Override
389
            public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
390
                if("getHibernateLazyInitializer".equals(method.getName())) {
391
                  return new UninitializedLazyInitializer();
392
                } else if(clazz.getDeclaredConstructor().equals(method)){
393
                     return proxy.invoke(obj, args);
394
                } else if("finalize".equals(method.getName())){
395
                     return proxy.invoke(obj, args);
396
                } else if("toString".equals(method.getName())) {
397
                    return wrappedClass.toString();
398
                } else if("getClass".equals(method.getName())) {
399
                    return proxy.invoke(obj, args);
400
                } else if("hashCode".equals(method.getName())) {
401
                    return wrappedClass.hashCode();
402
                } else if("initListener".equals(method.getName())) {
403
                    return null;
404
                } else {
405
                    throw new LazyInitializationException(null);
406
                }
407

    
408
            }
409
        });
410

    
411
        @SuppressWarnings("unchecked")
412
        T proxy = (T)enhancer.create();
413
        return proxy;
414
    }
415

    
416
    class UninitializedLazyInitializer implements LazyInitializer {
417

    
418
        @Override
419
        public  boolean isUninitialized() {
420
            return true;
421
        }
422

    
423
        @Override
424
        public String getEntityName() {
425
            // TODO Auto-generated method stub
426
            return null;
427
        }
428

    
429
        @Override
430
        public Serializable getIdentifier() {
431
            // TODO Auto-generated method stub
432
            return null;
433
        }
434

    
435
        @Override
436
        public Object getImplementation() {
437
            // TODO Auto-generated method stub
438
            return null;
439
        }
440

    
441
        @Override
442
        public Class<?> getPersistentClass() {
443
            // TODO Auto-generated method stub
444
            return null;
445
        }
446

    
447
        @Override
448
        public SessionImplementor getSession() {
449
            // TODO Auto-generated method stub
450
            return null;
451
        }
452

    
453
        @Override
454
        public void initialize() throws HibernateException {
455
            // TODO Auto-generated method stub
456
        }
457

    
458
        @Override
459
        public boolean isUnwrap() {
460
            // TODO Auto-generated method stub
461
            return false;
462
        }
463

    
464
        @Override
465
        public void setIdentifier(Serializable arg0) {
466
            // TODO Auto-generated method stub
467
        }
468

    
469
        @Override
470
        public void setImplementation(Object arg0) {
471
            // TODO Auto-generated method stub
472
        }
473

    
474
        @Override
475
        public void setUnwrap(boolean arg0) {
476
            // TODO Auto-generated method stub
477
        }
478

    
479
		@Override
480
		public Object getImplementation(
481
		        SharedSessionContractImplementor session)
482
				throws HibernateException {
483
			// TODO Auto-generated method stub
484
			return null;
485
		}
486

    
487
		@Override
488
		public boolean isReadOnlySettingAvailable() {
489
			// TODO Auto-generated method stub
490
			return false;
491
		}
492

    
493
		@Override
494
		public boolean isReadOnly() {
495
			// TODO Auto-generated method stub
496
			return false;
497
		}
498

    
499
		@Override
500
		public void setReadOnly(boolean readOnly) {
501
			// TODO Auto-generated method stub
502
		}
503

    
504
		@Override
505
		public void setSession(
506
		        SharedSessionContractImplementor session)
507
				throws HibernateException {
508
			// TODO Auto-generated method stub
509
		}
510

    
511
		@Override
512
		public void unsetSession() {
513
			// TODO Auto-generated method stub
514
		}
515
    }
516
}
    (1-1/1)