import java.util.List;
import java.util.Vector;
+import org.splat.service.SearchServiceImpl;
+import org.splat.service.dto.Proxy;
+import org.splat.service.technical.ProjectSettingsServiceImpl;
import org.splat.som.*;
+import org.splat.dal.bo.kernel.Role;
+import org.splat.dal.bo.kernel.User;
+import org.splat.dal.bo.som.ConvertsRelation;
+import org.splat.dal.bo.som.Document;
+import org.splat.dal.bo.som.DocumentType;
+import org.splat.dal.bo.som.KnowledgeElement;
+import org.splat.dal.bo.som.KnowledgeElementType;
+import org.splat.dal.bo.som.ProgressState;
+import org.splat.dal.bo.som.Publication;
+import org.splat.dal.bo.som.Scenario;
+import org.splat.dal.bo.som.SimulationContext;
+import org.splat.dal.bo.som.SimulationContextType;
+import org.splat.dal.bo.som.Study;
+import org.splat.dal.bo.som.ValidationCycle;
+import org.splat.dal.dao.som.Database;
import org.splat.kernel.Do;
import org.splat.kernel.UserDirectory;
-import org.splat.kernel.User;
-import org.splat.kernel.Role;
import org.splat.manox.Reader;
import org.splat.manox.Toolbox;
import org.splat.manox.Writer;
// Main
// ==============================================================================================================================
- public static void main(String[] args) {
+ public static void main(String[] args) {/* TODO: Create unit tests
// --------------------------------------
Session session = Database.getSession(); // Single session for multiple operations
Transaction transax = session.beginTransaction();
- ProjectSettings project = ProjectSettings.getMe();
+ ProjectSettingsServiceImpl project = ProjectSettingsServiceImpl.getMe();
String path = System.getProperty("user.dir");
try {
project.configure(path + "/src/som.xml");
try {
Study.Properties criter1 = new Study.Properties().setState(ProgressState.inPROGRESS);
Study.Properties criter2 = new Study.Properties().setState(ProgressState.inWORK).setManager(user);
- List<Proxy> result = Database.selectStudiesWhere(criter1, criter2);
+ List<Proxy> result = SearchServiceImpl.selectStudiesWhere(criter1, criter2);
if (result.size() == 0) {
logger.info("No study found.");
} else {
String words = "sercoter";
try {
Study.Properties criteria = new Study.Properties();
- List<Proxy> result = Database.selectStudiesWhere(criteria.setTitle(words));
+ List<Proxy> result = SearchServiceImpl.selectStudiesWhere(criteria.setTitle(words));
if (result.size() == 0) {
logger.info("No study found with a title including \"" + words + "\".");
} else {
context.add(reactor);
Study.Properties sprop = new Study.Properties();
- List<Proxy> result = Database.selectStudiesWhere(sprop.setSimulationContexts(context)
+ List<Proxy> result = SearchServiceImpl.selectStudiesWhere(sprop.setSimulationContexts(context)
.setState(ProgressState.inPROGRESS));
if (result.size() == 0) {
logger.info("Study on Réacteur RAPSODIE not found.");
KnowledgeElementType ktype = KnowledgeElement.selectType("Bonne pratique");
KnowledgeElement.Properties sprop = new KnowledgeElement.Properties();
- List<Proxy> result = Database.selectKnowledgeElementsWhere(sprop.setSimulationContexts(context)
+ List<Proxy> result = SearchServiceImpl.selectKnowledgeElementsWhere(sprop.setSimulationContexts(context)
.setType(ktype));
if (result.size() == 0) {
logger.info("Study on Réacteur RAPSODIE not found.");
}
catch (Exception e) {
return false;
- }
+ }*/
}
}
\ No newline at end of file