19 package org.turro.ranking;
21 import org.turro.string.Strings;
22 import org.turro.action.IProcess;
23 import org.turro.elephant.db.WhereClause;
24 import org.turro.reflection.Instances;
41 process.startProcessFor(entity);
46 public static void addJoin(
WhereClause wc, String table, String entityRoot, String entityId, String sortOrder) {
47 String entityPath =
"concat('/" + entityRoot +
"/', " + entityRoot +
"." + entityId +
")";
48 wc.
addClause(
"left outer join " + table +
" ranking on ranking.entityPath = " + entityPath +
" and ranking.concept = :rankconcept");
49 wc.
addNamedValue(
"rankconcept", Strings.isBlank(sortOrder) ?
"*" : sortOrder);
53 return "ranking.ranking desc";
void addClause(String clause)
void addNamedValue(String name, Object value)
static String getOrdering()
static void addJoin(WhereClause wc, String table, String entityRoot, String entityId, String sortOrder)
static void processFor(Object entity)