diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/StartConstraintType.java b/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/StartConstraintType.java
new file mode 100644
index 000000000..cbcacd667
--- /dev/null
+++ b/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/StartConstraintType.java
@@ -0,0 +1,29 @@
+/*
+ * 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.planner.entities;
+
+/**
+ * Enum with all possible ways of calculating the start of a task
+ * @author Óscar González Fernández
+ */
+public enum StartConstraintType {
+ AS_SOON_AS_POSSIBLE, START_NOT_EARLIER_THAN, START_IN_FIXED_DATE;
+
+}
diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/Task.java b/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/Task.java
index c9ad49e98..13ef540de 100644
--- a/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/Task.java
+++ b/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/Task.java
@@ -58,6 +58,13 @@ public class Task extends TaskElement {
private Set> resourceAllocations = new HashSet>();
+ private StartConstraintType startConstraintType = StartConstraintType.AS_SOON_AS_POSSIBLE;
+
+ public StartConstraintType getStartConstraintType() {
+ return startConstraintType != null ? startConstraintType
+ : StartConstraintType.AS_SOON_AS_POSSIBLE;
+ }
+
/**
* Constructor for hibernate. Do not use!
*/
diff --git a/navalplanner-business/src/main/resources/org/navalplanner/business/planner/entities/Tasks.hbm.xml b/navalplanner-business/src/main/resources/org/navalplanner/business/planner/entities/Tasks.hbm.xml
index 6a645c036..d9952dafd 100644
--- a/navalplanner-business/src/main/resources/org/navalplanner/business/planner/entities/Tasks.hbm.xml
+++ b/navalplanner-business/src/main/resources/org/navalplanner/business/planner/entities/Tasks.hbm.xml
@@ -40,6 +40,11 @@
org.navalplanner.business.planner.entities.CalculatedValue
+
+
+ org.navalplanner.business.planner.entities.StartConstraintType
+
+