Skip to content

Instantly share code, notes, and snippets.

@dav-rob
Created May 24, 2011 17:28
Show Gist options
  • Save dav-rob/989192 to your computer and use it in GitHub Desktop.
Save dav-rob/989192 to your computer and use it in GitHub Desktop.
public class CustomColumnSorterFactory implements NativeScriptFactory{
private final static Log LOG = LogFactory.getLog(CustomColumnSorterFactory.class);
@Override
public ExecutableScript newScript(Map<String, Object> params) {
LOG.info("******** Creating new ColumnSortScript.");
return new ColumnSortScript(params);
}
static class ColumnSortScript extends AbstractFloatSearchScript {
private Map<String, Object> params;
public ColumnSortScript(Map<String, Object> params) {
LOG.info("******** ColumnSortScript constructor.");
this.params = params;
}
@Override
public float runAsFloat() {
LOG.info("******** runAsFloat start.");
DocLookup doc = doc();
String cusAttrIdValue = (String)doc.get("cusAttrIdValue");
LOG.info("******** cusAttrIdValue=" + cusAttrIdValue);
return 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment