package com.enioka.jqm.jdbc;
import java.util.List;
class QueryPreparation
{
/**
* SQL text to run, without final ; (the text given by the adapter)
*/
String sqlText;
/**
* Key of the query, as specified in the various runSql methods. Null if raw query (which should be avoided at all costs)
*/
String queryKey;
/**
* The different parameters given (the SQL parameters). Can be empty, not null.
*/
List<Object> parameters;
/**
* If you know in advance the key which will be used for an INSERTed object, put it here. Ignore for other queries and when keys are
* generated by the database.
*/
Integer preGeneratedKey = null;
/**
* It true, the query should lock the results.
*/
boolean forUpdate = false;
boolean isKey(String key)
{
return queryKey != null && this.queryKey.equals(key);
}
}