Last active
August 29, 2015 14:09
-
-
Save gitbricho/b84ab07a81b77ee44b52 to your computer and use it in GitHub Desktop.
healthcare : com.itrane.healthcare.model.Vod.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
@Table(name = "vod") | |
public class Vod implements Serializable { | |
private static final long serialVersionUID = 1L; | |
@Id | |
@GeneratedValue | |
private Long id = null; | |
@Version | |
protected Integer version = 0; | |
@NotNull | |
@Size(max=10) | |
private String sokuteiBi; | |
private List<Vital> vitals = new ArrayList<Vital>(); | |
private String memo; | |
/** コンストラクタ. */ | |
public Vod() { | |
this.sokuteiBi = DateTime.now().toString("yyyy/MM/dd"); | |
} | |
/** 測定日の取得 */ | |
public String getSokuteiBi() { | |
return sokuteiBi; | |
} | |
/** | |
* 測定日の設定 | |
* @param sokuteiBi | |
*/ | |
public void setSokuteiBi(String sokuteiBi) { | |
this.sokuteiBi = sokuteiBi; | |
} | |
/** 測定するバイタルリストの取得. | |
* デフォルトでは fetch=FetchType.LAZY | |
*/ | |
@OneToMany(cascade=CascadeType.ALL, mappedBy="vital") | |
public List<Vital> getVitals() { | |
return vitals; | |
} | |
/** | |
* 測定するバイタルリストの設定. | |
* @param vitals | |
*/ | |
public void setVitals(List<Vital> vitals) { | |
this.vitals = vitals; | |
} | |
.... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment