19 package org.turro.matching;
21 import org.turro.string.Strings;
22 import org.turro.action.IProcess;
23 import org.turro.elephant.db.WhereClause;
24 import org.turro.plugin.contacts.IContact;
25 import org.turro.reflection.Instances;
42 process.startProcessFor(entity);
48 String entityPath =
"concat('/" + entityRoot +
"/', " + entityRoot +
"." + entityId +
")";
49 String relatedPath =
"/contact/" + contact.
getId();
50 wc.
addClause(
"left outer join " + table +
" matching");
51 wc.
addClause(
"on matching.entityPath = " + entityPath +
" and matching.concept = :matchconcept");
52 wc.
addClause(
"and matching.relatedPath = '" + relatedPath +
"'");
53 wc.
addNamedValue(
"matchconcept", Strings.isBlank(sortOrder) ?
"*" : sortOrder);
57 return "matching.matching 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, IContact contact, String sortOrder)
static void processFor(Object entity)