Skip to content

Commit

Permalink
issue #168
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoika committed Jul 8, 2016
1 parent 39e4a8d commit 90040ee
Showing 1 changed file with 11 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,13 @@ public List<ItemCollection> getWorkList(int startpos, int count,

String sQuery = null;
sQuery = "SELECT";
sQuery += " wi FROM Entity as wi " + " JOIN wi.textItems as s "
sQuery += " wi FROM Entity as wi "
+ "WHERE ";

if (type != null && !"".equals(type))
sQuery += " wi.type='" + type + "' AND ";
sQuery += " wi.type='" + type + "' ";

sQuery += " s.itemName = '$workitemid' "
+ createSortOrderClause(sortorder);
;
sQuery += createSortOrderClause(sortorder);
return entityService.findAllEntities(sQuery, startpos, count);
}

Expand Down Expand Up @@ -222,13 +220,12 @@ public List<ItemCollection> getWorkListByAuthor(String name, int startpos,
String sQuery = null;
sQuery = "SELECT";
sQuery += " wi FROM Entity as wi " + " JOIN wi.writeAccessList as wa"
+ " JOIN wi.textItems as s " + "WHERE ";
+ " WHERE ";

if (type != null && !"".equals(type))
sQuery += " wi.type='" + type + "' AND ";

sQuery += " wa.value = '" + name + "'"
+ " AND s.itemName = '$workitemid' "
+ createSortOrderClause(sortorder);
return entityService.findAllEntities(sQuery, startpos, count);
}
Expand Down Expand Up @@ -274,12 +271,11 @@ public List<ItemCollection> getWorkListByCreator(String name, int startpos,
String sQuery = null;
sQuery = "SELECT";
sQuery += " wi FROM Entity as wi"
+ " JOIN wi.textItems as t JOIN wi.textItems as s " + "WHERE ";
+ " JOIN wi.textItems as t " + "WHERE ";
if (type != null && !"".equals(type))
sQuery += " wi.type='" + type + "' AND ";

sQuery += " t.itemName = 'namcreator' and t.itemValue = '" + name + "'"
+ " AND s.itemName = '$workitemid' "
+ createSortOrderClause(sortorder);

return entityService.findAllEntities(sQuery, startpos, count);
Expand Down Expand Up @@ -316,12 +312,11 @@ public List<ItemCollection> getWorkListByOwner(String name, int startpos,
String sQuery = null;
sQuery = "SELECT";
sQuery += " wi FROM Entity as wi"
+ " JOIN wi.textItems as t JOIN wi.textItems as s " + "WHERE ";
+ " JOIN wi.textItems as t " + "WHERE ";
if (type != null && !"".equals(type))
sQuery += " wi.type='" + type + "' AND ";

sQuery += " t.itemName = 'namowner' and t.itemValue = '" + name + "'"
+ " AND s.itemName = '$workitemid' "
+ createSortOrderClause(sortorder);

return entityService.findAllEntities(sQuery, startpos, count);
Expand Down Expand Up @@ -386,13 +381,13 @@ public List<ItemCollection> getWorkListByGroup(String name, int startpos,
String sQuery = null;
sQuery = "SELECT";
sQuery += " wi FROM Entity as wi " + " JOIN wi.textItems as t "
+ " JOIN wi.textItems as s " + "WHERE ";
+ " WHERE ";

if (type != null && !"".equals(type))
sQuery += " wi.type='" + type + "' AND ";

sQuery += " t.itemName = 'txtworkflowgroup' and t.itemValue = '" + name
+ "'" + " AND s.itemName = '$workitemid' "
+ "'"
+ createSortOrderClause(sortorder);
return entityService.findAllEntities(sQuery, startpos, count);
}
Expand Down Expand Up @@ -424,14 +419,13 @@ public List<ItemCollection> getWorkListByProcessID(int aid, int startpos,
String sQuery = null;
sQuery = "SELECT";
sQuery += " wi FROM Entity as wi "
+ " JOIN wi.integerItems as t JOIN wi.textItems as s "
+ " JOIN wi.integerItems as t "
+ "WHERE ";

if (type != null && !"".equals(type))
sQuery += " wi.type='" + type + "' AND ";

sQuery += " t.itemName = '$processid' and t.itemValue = '" + aid + "'"
+ " AND s.itemName = '$workitemid' "
+ createSortOrderClause(sortorder);

return entityService.findAllEntities(sQuery, startpos, count);
Expand Down Expand Up @@ -478,12 +472,12 @@ public List<ItemCollection> getWorkListByRef(String aref, int startpos,
String sQuery = null;
sQuery = "SELECT";
sQuery += " wi FROM Entity as wi "
+ " JOIN wi.textItems as t JOIN wi.textItems as s " + "WHERE ";
+ " JOIN wi.textItems as t " + "WHERE ";
if (type != null && !"".equals(type))
sQuery += " wi.type='" + type + "' AND ";

sQuery += " t.itemName = '$uniqueidref' and t.itemValue = '" + aref
+ "'" + " and s.itemName = '$workitemid' "
+ "'"
+ createSortOrderClause(sortorder);

return entityService.findAllEntities(sQuery, startpos, count);
Expand Down

0 comments on commit 90040ee

Please sign in to comment.