1 package fr.ifremer.tutti.persistence.entities.protocol;
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 AbstractSpeciesProtocols {
33
34 public static <BeanType extends SpeciesProtocol> Class<BeanType> typeOfSpeciesProtocol() {
35 return (Class<BeanType>) SpeciesProtocolBean.class;
36 }
37
38 public static SpeciesProtocol newSpeciesProtocol() {
39 return new SpeciesProtocolBean();
40 }
41
42 public static <BeanType extends SpeciesProtocol> BeanType newSpeciesProtocol(BeanType source) {
43 Class<BeanType> sourceType = typeOfSpeciesProtocol();
44 Binder<BeanType,BeanType> binder = BinderFactory.newBinder(sourceType);
45 BeanType result = newSpeciesProtocol(source, binder);
46 return result;
47 }
48
49 public static <BeanType extends SpeciesProtocol> BeanType newSpeciesProtocol(BeanType source, Binder<BeanType, BeanType> binder) {
50 BeanType result = (BeanType) newSpeciesProtocol();
51 binder.copy(source, result);
52 return result;
53 }
54
55 }