mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
60 lines
841 B
Java
60 lines
841 B
Java
package org.example.domain;
|
|
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Table;
|
|
|
|
/**
|
|
* Country entity bean.
|
|
*/
|
|
@Entity
|
|
@Table(name="o_country")
|
|
public class Country {
|
|
|
|
@Id
|
|
//@Size(max=2)
|
|
String code;
|
|
|
|
//@Size(max=60)
|
|
String name;
|
|
|
|
public Country(String code, String name) {
|
|
this.code = code;
|
|
this.name = name;
|
|
}
|
|
|
|
public String toString() {
|
|
return code;
|
|
}
|
|
|
|
/**
|
|
* Return code.
|
|
*/
|
|
public String getCode() {
|
|
return code;
|
|
}
|
|
|
|
/**
|
|
* Set code.
|
|
*/
|
|
public void setCode(String code) {
|
|
this.code = code;
|
|
}
|
|
|
|
/**
|
|
* Return name.
|
|
*/
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
/**
|
|
* Set name.
|
|
*/
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
|
|
}
|