|
@@ -9,9 +9,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
9
|
9
|
import org.springframework.web.bind.annotation.RequestParam;
|
10
|
10
|
import org.springframework.web.bind.annotation.RestController;
|
11
|
11
|
|
12
|
|
-
|
|
12
|
+import dao.connection.LuceneConnector;
|
13
|
13
|
import dao.entity.DOProcess;
|
14
|
14
|
import dao.entity.Entity;
|
|
15
|
+import dao.lucene.search.DAOSearch;
|
15
|
16
|
import dao.lucene.tables.DAOProcess;
|
16
|
17
|
|
17
|
18
|
@RestController
|
|
@@ -32,9 +33,9 @@ public class ProcessController {
|
32
|
33
|
/**returns lawyer by id*/
|
33
|
34
|
|
34
|
35
|
@RequestMapping("/process/{id}")
|
35
|
|
- public DOProcess getById(@PathVariable Integer id ) {
|
|
36
|
+ public DOProcess getById(@PathVariable Long id ) {
|
36
|
37
|
|
37
|
|
- DOProcess process = this.daoProcess.get(id);
|
|
38
|
+ DOProcess process = this.daoProcess.get(id, LuceneConnector.getSearcherDisk());
|
38
|
39
|
return process;
|
39
|
40
|
|
40
|
41
|
}
|
|
@@ -46,7 +47,7 @@ public class ProcessController {
|
46
|
47
|
daoProcess = Database.get().getDaoProcess();
|
47
|
48
|
|
48
|
49
|
System.out.println("DAOPROCESS " +daoProcess);
|
49
|
|
- DOProcess process = this.daoProcess.getAllInfo(id);
|
|
50
|
+ DOProcess process = this.daoProcess.getAllInfo(id, LuceneConnector.getSearcherDisk());
|
50
|
51
|
|
51
|
52
|
return process;
|
52
|
53
|
|
|
@@ -60,7 +61,7 @@ public class ProcessController {
|
60
|
61
|
Entity entity = new Entity();
|
61
|
62
|
entity.setId(entityId);
|
62
|
63
|
entity.setType(type);
|
63
|
|
- return daoSearch.search(entity, false, processId);
|
|
64
|
+ return daoSearch.search(entity);
|
64
|
65
|
|
65
|
66
|
}
|
66
|
67
|
|
|
@@ -70,7 +71,7 @@ public class ProcessController {
|
70
|
71
|
@RequestParam (required = false, defaultValue= "0") Integer processId )
|
71
|
72
|
{
|
72
|
73
|
|
73
|
|
- List<DOProcess> searchResults = daoSearch.search(processNumber, true, processId);
|
|
74
|
+ List<DOProcess> searchResults = daoSearch.search(processNumber);
|
74
|
75
|
|
75
|
76
|
searchResults.sort(new Comparator<DOProcess>() {
|
76
|
77
|
|