ItEr44S16CUAsignacionRecursosEspecificosAPlanificacionItEr37S10: Adding persistent type field to streches function.
This commit is contained in:
parent
2348fa7d67
commit
0f3bda867b
2 changed files with 16 additions and 1 deletions
|
|
@ -39,6 +39,10 @@ import org.joda.time.LocalDate;
|
|||
*/
|
||||
public class StretchesFunction extends AssignmentFunction {
|
||||
|
||||
public enum Type {
|
||||
DEFAULT;
|
||||
}
|
||||
|
||||
public static class Interval {
|
||||
|
||||
private LocalDate start;
|
||||
|
|
@ -151,6 +155,9 @@ public class StretchesFunction extends AssignmentFunction {
|
|||
|
||||
private List<Stretch> stretches = new ArrayList<Stretch>();
|
||||
|
||||
private Type type;
|
||||
|
||||
|
||||
public void setStretches(List<Stretch> stretches) {
|
||||
this.stretches = stretches;
|
||||
}
|
||||
|
|
@ -170,6 +177,10 @@ public class StretchesFunction extends AssignmentFunction {
|
|||
return Collections.unmodifiableList(stretches);
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return type == null ? Type.DEFAULT : type;
|
||||
}
|
||||
|
||||
public void addStretch(Stretch stretch) {
|
||||
stretches.add(stretch);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,8 +111,12 @@
|
|||
<property name="amountWorkPercentage" not-null="true" />
|
||||
</composite-element>
|
||||
</list>
|
||||
<property name="type">
|
||||
<type name="org.hibernate.type.EnumType">
|
||||
<param name="enumClass">org.navalplanner.business.planner.entities.StretchesFunction$Type</param>
|
||||
</type>
|
||||
</property>
|
||||
</joined-subclass>
|
||||
|
||||
</class>
|
||||
|
||||
<class name="DerivedAllocation">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue