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

io.baltoro.client.CustomQuery Maven / Gradle / Ivy

There is a newer version: 4.0.12
Show newest version
package io.baltoro.client;

import java.util.HashMap;
import java.util.Map;

public class CustomQuery
{
	
	private Class c;
	private String q;
	private Map map = new HashMap<>(50);
	private LocalDB db;
	
	CustomQuery(Class c, String q, LocalDB db)
	{
		this.c = c;
		this.q = q;
		this.db = db;
	}
	
	
	public CustomQuery map(String colName, String propertyName)
	{
		map.put(colName.toLowerCase(), propertyName);
		return this;
	}
	
	
	public RecordList execute()
	{
		RecordList rl = db.executeQuery(c, this);
		return rl;
	}
	
	String getQuery()
	{
		return q;
	}
	
	Class getClassT()
	{
		return c;
	}
	
	String getPropertyName(String colName)
	{
		return map.get(colName.toLowerCase());
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy