public abstract class AbstractQuery
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.String,EmbeddedExpr> |
_embeddedAliases |
protected java.util.ArrayList<FromItem> |
_fromList |
Modifier and Type | Method and Description |
---|---|
void |
addEmbeddedAlias(java.lang.String alias,
EmbeddedExpr expr)
Adds an embedded alias.
|
void |
complete(UserQuery userQuery,
AmberConnection aConn)
Any post-sql completion
|
FromItem |
createDependentFromItem(FromItem parent,
LinkColumns link,
java.lang.String name)
Creates a dependent from item
|
FromItem |
createFromItem(AmberTable table,
java.lang.String name)
Sets the from list.
|
FromItem |
createFromItem(EntityType entityType,
AmberTable table,
java.lang.String name)
Sets the from list.
|
boolean |
exists(FromItem item)
Returns true if the item must have at least one entry in the database.
|
ArgExpr[] |
getArgList()
Returns the arg list.
|
long |
getCacheMaxAge()
Returns the expire time.
|
java.util.HashMap<java.lang.String,EmbeddedExpr> |
getEmbeddedAliases()
Gets the embedded aliases.
|
java.util.ArrayList<FromItem> |
getFromList()
Returns the from list.
|
AbstractQuery |
getParentQuery()
Gets the parent query.
|
java.util.ArrayList<java.lang.String> |
getPreparedMapping()
Returns the prepared mapping.
|
java.lang.String |
getQueryString()
Returns the query string.
|
abstract java.lang.String |
getSQL()
Returns the SQL.
|
boolean |
hasSubQuery()
Returns true if this query has a subquery.
|
void |
prepare(UserQuery userQuery,
AmberConnection aConn)
Prepares before any update.
|
void |
setHasSubQuery(boolean hasSubQuery)
Sets true if this query has a subquery.
|
boolean |
usesFrom(FromItem item,
int type)
Returns true if the from item is used by the query.
|
protected java.util.ArrayList<FromItem> _fromList
protected java.util.HashMap<java.lang.String,EmbeddedExpr> _embeddedAliases
public java.lang.String getQueryString()
public void addEmbeddedAlias(java.lang.String alias, EmbeddedExpr expr)
public java.util.HashMap<java.lang.String,EmbeddedExpr> getEmbeddedAliases()
public FromItem createFromItem(AmberTable table, java.lang.String name)
public FromItem createFromItem(EntityType entityType, AmberTable table, java.lang.String name)
public FromItem createDependentFromItem(FromItem parent, LinkColumns link, java.lang.String name)
public java.util.ArrayList<FromItem> getFromList()
public AbstractQuery getParentQuery()
public java.util.ArrayList<java.lang.String> getPreparedMapping()
public abstract java.lang.String getSQL()
public boolean hasSubQuery()
public void setHasSubQuery(boolean hasSubQuery)
public boolean exists(FromItem item)
public boolean usesFrom(FromItem item, int type)
public ArgExpr[] getArgList()
public long getCacheMaxAge()
public void prepare(UserQuery userQuery, AmberConnection aConn) throws java.sql.SQLException
java.sql.SQLException
public void complete(UserQuery userQuery, AmberConnection aConn) throws java.sql.SQLException
java.sql.SQLException