Java tutorial
package edu.uiowa.icts.bluebutton.domain; /* * #%L * blue-button Spring MVC Web App * %% * Copyright (C) 2014 - 2015 University of Iowa Institute for Clinical and Translational Science (ICTS) * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import java.util.Set; import java.util.*; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.text.ParseException; import java.util.Date; import javax.persistence.*; import javax.persistence.Entity; import javax.persistence.Table; import javax.persistence.Table; import javax.persistence.Table; import javax.persistence.Column; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import org.springframework.format.annotation.DateTimeFormat; import org.hibernate.annotations.*; import javax.persistence.CascadeType; import edu.uiowa.icts.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * Generated by Protogen - www.icts.uiowa.edu/protogen * @since 10/29/2014 09:18:02 AM CDT */ @Entity(name = "edu_uiowa_icts_bluebutton_domain_labTestRange") @Table(name = "lab_test_range", schema = "bluebutton") public class LabTestRange { private static final Log log = LogFactory.getLog(LabTestRange.class); private Integer labTestRangeId; private String sex; private Double minAgeYears; private Double maxAgeYears; private Double minNormal; private Double maxNormal; private LabTest labTest; public LabTestRange() { this.labTestRangeId = null; this.sex = ""; this.minAgeYears = null; this.maxAgeYears = null; this.minNormal = null; this.maxNormal = null; this.labTest = null; } /*****labTestRangeId*****/ // @javax.persistence.SequenceGenerator( name="gen", sequenceName="bluebutton.seqnum",allocationSize=1) @Id // @GeneratedValue( strategy=GenerationType.AUTO,generator="gen") @Column(name = "lab_test_range_id", unique = true, nullable = false) public Integer getLabTestRangeId() { return labTestRangeId; } public void setLabTestRangeId(Integer labTestRangeId) { this.labTestRangeId = labTestRangeId; } /*****sex*****/ @Column(name = "sex") public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } /*****minAgeYears*****/ @Column(name = "min_age_years") public Double getMinAgeYears() { return minAgeYears; } public void setMinAgeYears(Double minAgeYears) { this.minAgeYears = minAgeYears; } /*****maxAgeYears*****/ @Column(name = "max_age_years") public Double getMaxAgeYears() { return maxAgeYears; } public void setMaxAgeYears(Double maxAgeYears) { this.maxAgeYears = maxAgeYears; } /*****minNormal*****/ @Column(name = "min_normal") public Double getMinNormal() { return minNormal; } public void setMinNormal(Double minNormal) { this.minNormal = minNormal; } /*****maxNormal*****/ @Column(name = "max_normal") public Double getMaxNormal() { return maxNormal; } public void setMaxNormal(Double maxNormal) { this.maxNormal = maxNormal; } /*****labTest*****/ @ManyToOne(fetch = FetchType.LAZY, targetEntity = LabTest.class) @JoinColumn(name = "lab_test_id", nullable = true) public LabTest getLabTest() { return labTest; } public void setLabTest(LabTest labTest) { this.labTest = labTest; } }