ItEr21S09CUIntroducionAvanceUnidadeTraballoItEr20S07 : Move the maxValue attribute from AdvanceAssigment entity to AdvanceMeasurement entity.
Signed-off-by: Óscar González Fernández <ogonzalez@igalia.com>. Little change to commit message.
This commit is contained in:
parent
cf65db0230
commit
a2c2cd0d17
3 changed files with 15 additions and 16 deletions
|
|
@ -11,8 +11,6 @@ public class AdvanceAssigment extends BaseEntity {
|
|||
|
||||
private boolean reportGlobalAdvance;
|
||||
|
||||
private BigDecimal maxValue;
|
||||
|
||||
private OrderElement orderElement;
|
||||
|
||||
private AdvanceType advanceType;
|
||||
|
|
@ -21,17 +19,6 @@ public class AdvanceAssigment extends BaseEntity {
|
|||
|
||||
public AdvanceAssigment(boolean reportGlobalAdvance, BigDecimal maxValue) {
|
||||
this.reportGlobalAdvance = reportGlobalAdvance;
|
||||
this.maxValue = maxValue;
|
||||
this.maxValue.setScale(2);
|
||||
}
|
||||
|
||||
public void setMaxValue(BigDecimal maxValue) {
|
||||
this.maxValue = maxValue;
|
||||
this.maxValue.setScale(2);
|
||||
}
|
||||
|
||||
public BigDecimal getMaxValue() {
|
||||
return this.maxValue;
|
||||
}
|
||||
|
||||
public void setReportGlobalAdvance(boolean reportGlobalAdvance) {
|
||||
|
|
|
|||
|
|
@ -11,12 +11,16 @@ public class AdvanceMeasurement extends BaseEntity {
|
|||
|
||||
private BigDecimal value;
|
||||
|
||||
private BigDecimal maxValue;
|
||||
|
||||
private AdvanceAssigment advanceAssigment;
|
||||
|
||||
public AdvanceMeasurement(Date date, BigDecimal value) {
|
||||
public AdvanceMeasurement(Date date, BigDecimal value, BigDecimal maxValue) {
|
||||
this.date = date;
|
||||
this.value = value;
|
||||
this.value.setScale(2);
|
||||
this.maxValue = maxValue;
|
||||
this.maxValue.setScale(2);
|
||||
}
|
||||
|
||||
public void setDate(Date date) {
|
||||
|
|
@ -36,6 +40,15 @@ public class AdvanceMeasurement extends BaseEntity {
|
|||
return this.value;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxValue() {
|
||||
return this.maxValue;
|
||||
}
|
||||
|
||||
public void setMaxValue(BigDecimal maxValue) {
|
||||
this.maxValue = maxValue;
|
||||
this.maxValue.setScale(2);
|
||||
}
|
||||
|
||||
public void setAdvanceAssigment(AdvanceAssigment advanceAssigment) {
|
||||
this.advanceAssigment = advanceAssigment;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
</id>
|
||||
<version name="version" access="property" type="long" />
|
||||
|
||||
<property name="maxValue" />
|
||||
<property name="reportGlobalAdvance"/>
|
||||
|
||||
<many-to-one name="advanceType" class="AdvanceType" column="ADVANCE_TYPE_ID"/>
|
||||
|
|
@ -51,7 +50,7 @@
|
|||
|
||||
<property name="date"/>
|
||||
<property name="value" scale="2"/>
|
||||
|
||||
<property name="maxValue" scale="2"/>
|
||||
<many-to-one name="advanceAssigment" class="AdvanceAssigment" column="ADVANCE_ASSIGMENT_ID" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue