net.turnbig.qb.segment.SqlSegment Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of query-builder Show documentation
Show all versions of query-builder Show documentation
Criterion for jdbc, but not only Criterion
The newest version!
package net.turnbig.qb.segment;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
*
* @author Woo Cupid
* @date 2014年11月14日
* @version $Revision$
*/
public abstract class SqlSegment {
/**
* generate sql for the edu.woo.qb.segment
*
* @return
*/
public abstract String asSql();
/**
* whether required named query parameter for this edu.woo.qb.segment
*
* @return
*/
public abstract boolean isParamRequired();
/**
* named query parameter map
*/
protected Map params = new LinkedHashMap();
protected Settings settings = Settings.namedQuery();
public Map getParams() {
return params;
}
public Map getKeyedParams() {
Map map = new HashMap();
map.putAll(params);
return map;
}
public List