AxisProperty.java

Go to the documentation of this file.
00001 package cedar.hepdata.model;
00002 
00003 import cedar.hepdata.util.Unit;
00004 
00005 import javax.persistence.*;
00006 
00012 @Entity
00013 @Table(name="AxisProperties")
00014 public class AxisProperty extends Property {
00016     @ManyToOne
00017     private YAxis _yAxis;
00018 
00019 
00021 
00022 
00024     public AxisProperty() {}
00025 
00027     public AxisProperty(String name) {
00028         super(name);
00029     }
00030 
00032     public AxisProperty(YAxis yAxis, String name) {
00033         this(name);
00034         setYAxis(yAxis);
00035     }
00036 
00038     public AxisProperty(String name, Unit unit, Double lowValue, Double highValue) {
00039         super(name, unit, lowValue, highValue);
00040     }
00041 
00043     public AxisProperty(YAxis yAxis, String name, Unit unit, Double lowValue, Double highValue) {
00044         this(name, unit, lowValue, highValue);
00045         setYAxis(yAxis);
00046     }
00047 
00048 
00050 
00051 
00053     public YAxis getYAxis() {
00054         return _yAxis;
00055     }
00056 
00058     public AxisProperty setYAxis(YAxis yAxis) {
00059         if (getYAxis() != null) getYAxis().getProperties().add(this);
00060         _yAxis = yAxis;
00061         return this;
00062     }
00063 
00064 }

Generated on Tue Apr 21 15:54:38 2009 for HepData object model by  doxygen 1.5.5