Unverified Commit efdb7d1e authored by Mathieu Gicquel's avatar Mathieu Gicquel
Browse files

Refactor - Send association to Interface

Association : Project -- Task
parent 0565310e
......@@ -141,4 +141,6 @@ public interface IProject extends IServerObject {
* @param archived indicates whether the project should be placed in the archives or not.
*/
void setArchived(final boolean archived);
MultipleReference<ITask> getTaskReference();
}
......@@ -196,4 +196,8 @@ public interface ITask extends IServerObject {
void setContactsList(final List<IContact> contacts);
SingleReference<IContext> getContextReference();
MultipleReference<ITag> getTagReference();
SingleReference<IProject> getProjectReference();
}
......@@ -173,4 +173,9 @@ public class Project implements IProject {
public void setArchived(boolean archived) {
}
@Override
public MultipleReference<ITask> getTaskReference() {
return null;
}
}
......@@ -240,4 +240,14 @@ public class Task implements ITask {
public void setContactsList(List<IContact> contacts) {
}
@Override
public MultipleReference<ITag> getTagReference() {
return this.tags;
}
@Override
public SingleReference<IProject> getProjectReference() {
return null;
}
}
......@@ -228,4 +228,8 @@ public final class Project extends AbstractProject {
}
}
@Override
public MultipleReference<ITask> getTaskReference() {
throw new UnsupportedOperationException();
}
}
......@@ -19,7 +19,6 @@ import java.util.Set;
@Entity
@Table(name = "TACHE")
public final class Task extends AbstractTask {
/**
* Identifiant de serialisation.
*/
......@@ -231,5 +230,13 @@ public final class Task extends AbstractTask {
}
}
@Override
public MultipleReference<ITag> getTagReference() {
throw new UnsupportedOperationException();
}
@Override
public SingleReference<IProject> getProjectReference() {
throw new UnsupportedOperationException();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment