Menu

[r2712]: / trunk / ch.sahits.codegen.test / fragments / headless_test / Foo3.java  Maximize  Restore  History

Download this file

116 lines (100 with data), 2.9 kB

  1
  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
 28
 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
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
package ch.sahits;
import java.sql.Date;
import java.util.Hashtable;
/**
* This class represents the database table
* USER.
*/
public class Foo {
/** <code>name</code> holds the value of the field NAME */
private String name;
/** <code>surname</code> holds the value of the field SURNAME */
private String surname;
/** <code>email</code> holds the value of the field EMAIL */
private String email;
/** <code>birthDate</code> holds the value of the field BIRTH_DATE */
private Date birthDate;
/**
* Constructor initializes the bean with a list of values.
* @param values Hashtable<String,Object>. If the Object represents
* an unboxed primitive type, the Object must be of type String.
*/
public Foo(Hashtable<String,Object> values){
init(values);
}
/**
* Initialize the bean with a list of values.
* @param values Hashtable<String,Object>. If the Object represents
* an unboxed primitive type, the Object must be of type String.
*/
private void init(Hashtable<String,Object> values){
if (values.contains("NAME")){
setName((String)values.get("NAME"));
}
if (values.contains("SURNAME")){
setSurname((String)values.get("SURNAME"));
}
if (values.contains("EMAIL")){
setEmail((String)values.get("EMAIL"));
}
if (values.contains("BIRTH_DATE")){
setBirthDate((Date)values.get("BIRTH_DATE"));
}
}
/**
* Retrieve the value of the field NAME.
* @return the value of the field
*/
public String getName(){
return name;
}
/**
* Set the value of the field NAME.
* @param name value to be set for NAME
*/
public void setName(String name){
this.name = name;
}
/**
* Retrieve the value of the field SURNAME.
* @return the value of the field
*/
public String getSurname(){
return surname;
}
/**
* Set the value of the field SURNAME.
* @param surname value to be set for SURNAME
*/
public void setSurname(String surname){
this.surname = surname;
}
/**
* Retrieve the value of the field EMAIL.
* @return the value of the field
*/
public String getEmail(){
return email;
}
/**
* Set the value of the field EMAIL.
* @param email value to be set for EMAIL
*/
public void setEmail(String email){
this.email = email;
}
/**
* Retrieve the value of the field BIRTH_DATE.
* @return the value of the field
*/
public Date getBirthDate(){
return birthDate;
}
/**
* Set the value of the field BIRTH_DATE.
* @param birthDate value to be set for BIRTH_DATE
*/
public void setBirthDate(Date birthDate){
this.birthDate = birthDate;
}
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.