All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jpattern.orm.query.SelectClause Maven / Gradle / Ivy

There is a newer version: 3.5.1
Show newest version
package com.jpattern.orm.query;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import com.jpattern.orm.query.select.ISelectRegexPattern;

/**
 * 
 * @author Francesco Cina
 *
 * 07/lug/2011
 */
public class SelectClause implements ISelectClause {

/**
	 * 
	 */
	
	//	private static Pattern patternSelectClause = Pattern.compile(ISelectRegexPattern.SQL_SELECT_SPLIT_PATTERN);
	private static Pattern patternProperty = Pattern.compile(ISelectRegexPattern.SQL_SELECT_PROPERTY_PATTERN);
	private final String selectClause;
	private INameSolver nameSolver = new NullNameSolver();

	public SelectClause(String selectClause) {
		this.selectClause = selectClause;
	}

	@Override
	public String renderSql() {
		StringBuilder query = new StringBuilder();
		renderSql(query);
		return query.toString();
	}

	@Override
	public void renderSql(StringBuilder StringBuilder) {
//		List tokens = splitSelect(selectClause);
//		if (tokens.size()>0) {
//			StringBuilder.append("SELECT ");
//			for ( int i=0; i splitSelect(String select) {
//
//        List result = new ArrayList();
//        Matcher m = patternSelectClause.matcher(select);
//	    while (m.find()) {
//	    	result.add(m.group());
//		}
//	    return result;
//	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy