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 new file mode 100644 index 000000000..6744a66bb --- /dev/null +++ b/navalplanner-business/src/main/java/org/navalplanner/business/costcategories/entities/CostCategory.java @@ -0,0 +1,54 @@ +/* + * This file is part of ###PROJECT_NAME### + * + * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e + * Desenvolvemento Tecnolóxico de Galicia + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package org.navalplanner.business.costcategories.entities; + +import org.hibernate.validator.NotEmpty; +import org.navalplanner.business.common.BaseEntity; + +/** + * @author Jacobo Aragunde Perez + */ +public class CostCategory extends BaseEntity { + + @NotEmpty + private String name; + + // Default constructor, needed by Hibernate + protected CostCategory() { + + } + + public static CostCategory create(String name) { + return (CostCategory) create(new CostCategory(name)); + } + + protected CostCategory(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/costcategories/entities/HourCost.java b/navalplanner-business/src/main/java/org/navalplanner/business/costcategories/entities/HourCost.java new file mode 100644 index 000000000..40ca6c2f8 --- /dev/null +++ b/navalplanner-business/src/main/java/org/navalplanner/business/costcategories/entities/HourCost.java @@ -0,0 +1,79 @@ +/* + * This file is part of ###PROJECT_NAME### + * + * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e + * Desenvolvemento Tecnolóxico de Galicia + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package org.navalplanner.business.costcategories.entities; + +import java.math.BigDecimal; +import java.util.Date; + +import org.hibernate.validator.NotEmpty; +import org.navalplanner.business.common.BaseEntity; + +/** + * @author Jacobo Aragunde Perez + */ +public class HourCost extends BaseEntity { + + @NotEmpty + private BigDecimal priceCost; + + @NotEmpty + private Date initDate; + + private Date endDate; + + // Default constructor, needed by Hibernate + protected HourCost() { + + } + + public static HourCost create(BigDecimal priceCost, Date initDate) { + return (HourCost) create(new HourCost(priceCost, initDate)); + } + + protected HourCost(BigDecimal priceCost, Date initDate) { + this.priceCost = priceCost; + this.initDate = initDate; + } + + public BigDecimal getPriceCost() { + return priceCost; + } + + public void setPriceCost(BigDecimal priceCost) { + this.priceCost = priceCost; + } + + public Date getInitDate() { + return initDate; + } + + public void setInitDate(Date initDate) { + this.initDate = initDate; + } + + public Date getEndDate() { + return endDate; + } + + public void setEndDate(Date endDate) { + this.endDate = endDate; + } +} diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/costcategories/entities/TypeOfWorkHours.java b/navalplanner-business/src/main/java/org/navalplanner/business/costcategories/entities/TypeOfWorkHours.java new file mode 100644 index 000000000..450bb63ec --- /dev/null +++ b/navalplanner-business/src/main/java/org/navalplanner/business/costcategories/entities/TypeOfWorkHours.java @@ -0,0 +1,88 @@ +/* + * This file is part of ###PROJECT_NAME### + * + * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e + * Desenvolvemento Tecnolóxico de Galicia + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package org.navalplanner.business.costcategories.entities; + +import java.math.BigDecimal; + +import org.hibernate.validator.NotEmpty; +import org.navalplanner.business.common.BaseEntity; + +/** + * @author Jacobo Aragunde Perez + */ +public class TypeOfWorkHours extends BaseEntity { + + @NotEmpty + private String code; + + @NotEmpty + private String name; + + private BigDecimal defaultPrice; + + boolean enabled = true; + + // Default constructor, needed by Hibernate + protected TypeOfWorkHours() { + + } + + public static TypeOfWorkHours create(String code, String name) { + return (TypeOfWorkHours) create(new TypeOfWorkHours(code, name)); + } + + protected TypeOfWorkHours(String code, String name) { + this.code = code; + this.name = name; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public BigDecimal getDefaultPrice() { + return defaultPrice; + } + + public void setDefaultPrice(BigDecimal price) { + this.defaultPrice = price; + } + + public boolean getEnabled() { + return enabled; + } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } +}