Newer
Older
package lry.dip.tcp;
import java.io.Serializable;
import java.util.Date;
public class Echantillon implements Serializable {
/***** Attributs *****/
private int id;
private String nom;
private String espece;
private int age;
private String date_entree;
private String date_sortie;
public Echantillon(int pId, String pNom, String pEspece, int pAge, String pEntree, String pSortie) {
this.setId(pId);
this.setNom(pNom);
this.setEspece(pEspece);
this.setAge(pAge);
this.setDate_entree(pEntree);
this.setDate_sortie(pSortie);
}
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNom() {
return nom;
}
public void setNom(String nom) {
this.nom = nom;
}
public String getEspece() {
return espece;
}
public void setEspece(String espece) {
this.espece = espece;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getDate_entree() {
return date_entree;
}
public void setDate_entree(String date_entree) {
this.date_entree = date_entree;
}
public String getDate_sortie() {
return date_sortie;
}
public void setDate_sortie(String date_sortie) {
this.date_sortie = date_sortie;
}
public String getValueColumn(String ColumnName) {
switch (ColumnName) {
case "Nom": {
return getNom();
}
case "Espèce": {
return getEspece();
}
case "Âge": {
return Integer.toString(getAge());
}
case "Date entrée": {
return (getDate_entree().toString()).substring(0, 10) + " "
+ (getDate_entree().toString()).substring(24, 29);
}
case "Date sortie": {
return getDate_sortie().toString();
}