import org.splat.dal.dao.som.FileDAO;
import org.splat.dal.dao.som.ProjectElementDAO;
import org.splat.dal.dao.som.SimulationContextDAO;
+import org.splat.dal.dao.som.VersionsRelationDAO;
import org.splat.kernel.InvalidPropertyException;
import org.splat.kernel.MismatchException;
import org.splat.kernel.MissedPropertyException;
* Injected project element DAO.
*/
private ProjectElementDAO _projectElementDAO;
+ /**
+ * Injected versions relation DAO.
+ */
+ private VersionsRelationDAO _versionsRelationDAO;
/**
* {@inheritDoc}
getDocumentDAO().create(newdoc);
// Versioning
- if (summary == null)
- newdoc.addRelation(new VersionsRelation(newdoc, previous));
- else
- newdoc.addRelation(new VersionsRelation(newdoc, previous, summary));
-
+ VersionsRelation aRel;
+ aRel = new VersionsRelation(newdoc, previous, summary);
+// getVersionsRelationDAO().create(aRel);
+ newdoc.addRelation(aRel);
+
// Update of usedby relations, if exist
List<Relation> relist = previous.getRelations(UsedByRelation.class);
Study scope = aStep.getOwnerStudy();
public void setDocumentTypeService(DocumentTypeService documentTypeService) {
_documentTypeService = documentTypeService;
}
+
+ /**
+ * Get the versionsRelationDAO.
+ * @return the versionsRelationDAO
+ */
+ public VersionsRelationDAO getVersionsRelationDAO() {
+ return _versionsRelationDAO;
+ }
+
+ /**
+ * Set the versionsRelationDAO.
+ * @param versionsRelationDAO the versionsRelationDAO to set
+ */
+ public void setVersionsRelationDAO(VersionsRelationDAO versionsRelationDAO) {
+ _versionsRelationDAO = versionsRelationDAO;
+ }
}