1 package fr.ifremer.tutti.persistence.entities.referential;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 import javax.annotation.Generated;
28 import org.nuiton.util.beans.Binder;
29 import org.nuiton.util.beans.BinderFactory;
30
31 @Generated(value = "org.nuiton.eugene.java.SimpleJavaBeanTransformer", date = "Fri Jan 06 18:31:47 CET 2017")
32 public abstract class AbstractVessels {
33
34 public static <BeanType extends Vessel> Class<BeanType> typeOfVessel() {
35 return (Class<BeanType>) VesselBean.class;
36 }
37
38 public static Vessel newVessel() {
39 return new VesselBean();
40 }
41
42 public static <BeanType extends Vessel> BeanType newVessel(BeanType source) {
43 Class<BeanType> sourceType = typeOfVessel();
44 Binder<BeanType,BeanType> binder = BinderFactory.newBinder(sourceType);
45 BeanType result = newVessel(source, binder);
46 return result;
47 }
48
49 public static <BeanType extends Vessel> BeanType newVessel(BeanType source, Binder<BeanType, BeanType> binder) {
50 BeanType result = (BeanType) newVessel();
51 binder.copy(source, result);
52 return result;
53 }
54
55 }