ItEr37S12CUAdministracionCategoriaCosteItEr36S14: added the field 'enabled' to the entity CostCategory in all layers

This commit is contained in:
Jacobo Aragunde Pérez 2009-12-02 20:58:43 +01:00 committed by Javier Moran Rua
parent e469b4a9ee
commit ca986edb17
3 changed files with 17 additions and 0 deletions

View file

@ -39,6 +39,8 @@ public class CostCategory extends BaseEntity {
@NotEmpty
private String name;
private boolean enabled = true;
@Valid
private Set<HourCost> hourCosts = new HashSet<HourCost>();
@ -67,6 +69,14 @@ public class CostCategory extends BaseEntity {
this.name = name;
}
public boolean getEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public Set<HourCost> getHourCosts() {
return hourCosts;
}

View file

@ -13,6 +13,8 @@
<property name="name" unique="true"/>
<property name="enabled"/>
<set name="hourCosts" inverse="true" cascade="all-delete-orphan">
<key column="COST_CATEGORY_ID"/>
<one-to-many class="HourCost"/>

View file

@ -41,6 +41,11 @@
value="@{controller.costCategory.name}" width="300px"
constraint="no empty:${i18n:_('cannot be null or empty')}"/>
</row>
<row>
<label value="${i18n:_('Enabled')}:" />
<checkbox id="enabled"
checked="@{controller.costCategory.enabled}" width="300px" />
</row>
</rows>
</grid>