From ca986edb1742b8278931aaa985d9be1f42c86334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= Date: Wed, 2 Dec 2009 20:58:43 +0100 Subject: [PATCH] ItEr37S12CUAdministracionCategoriaCosteItEr36S14: added the field 'enabled' to the entity CostCategory in all layers --- .../business/costcategories/entities/CostCategory.java | 10 ++++++++++ .../costcategories/entities/CostCategories.hbm.xml | 2 ++ .../main/webapp/costcategories/_editCostCategory.zul | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/costcategories/entities/CostCategory.java b/navalplanner-business/src/main/java/org/navalplanner/business/costcategories/entities/CostCategory.java index 0b75ede76..12b41e50a 100644 --- a/navalplanner-business/src/main/java/org/navalplanner/business/costcategories/entities/CostCategory.java +++ b/navalplanner-business/src/main/java/org/navalplanner/business/costcategories/entities/CostCategory.java @@ -39,6 +39,8 @@ public class CostCategory extends BaseEntity { @NotEmpty private String name; + private boolean enabled = true; + @Valid private Set hourCosts = new HashSet(); @@ -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 getHourCosts() { return hourCosts; } diff --git a/navalplanner-business/src/main/resources/org/navalplanner/business/costcategories/entities/CostCategories.hbm.xml b/navalplanner-business/src/main/resources/org/navalplanner/business/costcategories/entities/CostCategories.hbm.xml index 952e17422..24bcf3826 100644 --- a/navalplanner-business/src/main/resources/org/navalplanner/business/costcategories/entities/CostCategories.hbm.xml +++ b/navalplanner-business/src/main/resources/org/navalplanner/business/costcategories/entities/CostCategories.hbm.xml @@ -13,6 +13,8 @@ + + diff --git a/navalplanner-webapp/src/main/webapp/costcategories/_editCostCategory.zul b/navalplanner-webapp/src/main/webapp/costcategories/_editCostCategory.zul index 0bc2e4e9b..5836f4f8d 100644 --- a/navalplanner-webapp/src/main/webapp/costcategories/_editCostCategory.zul +++ b/navalplanner-webapp/src/main/webapp/costcategories/_editCostCategory.zul @@ -41,6 +41,11 @@ value="@{controller.costCategory.name}" width="300px" constraint="no empty:${i18n:_('cannot be null or empty')}"/> + +