public abstract class Query<ThisType extends Query<ThisType>> extends CustomizableSqlObject implements Verifiable<ThisType>
ALL_SYMBOL, NULL_VALUE, QUESTION_MARK| Modifier | Constructor and Description |
|---|---|
protected |
Query() |
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(AppendableExt app)
Appends this object to the given AppendableExt.
|
protected abstract void |
appendTo(AppendableExt app,
SqlContext newContext)
Appends the sql query to the given AppendableExt within the given,
modifiable SqlContext.
|
protected void |
collectSchemaObjects(ValidationContext vContext)
Used during Query.validate() calls to collect the dbschema objects
referenced in a query.
|
protected ThisType |
getThisType() |
protected void |
prependTo(AppendableExt app)
Called by
appendTo(AppendableExt) before
appendTo(AppendableExt,SqlContext) within the original
SqlContext. |
ThisType |
validate()
Runs validation on this verifiable object.
|
void |
validate(ValidationContext vContext)
Runs validation on this verifiable object using a previously collected
ValidationContext.
|
protected void |
validateTables(ValidationContext vContext)
Verifies that any columns referenced in the query have their respective
tables also referenced in the query.
|
addCustomization, customAppendTo, customAppendTo, maybeAppendTo, maybeAppendTocollectSchemaObjects, doValidate, toStringtoString, toStringpublic final ThisType validate() throws ValidationException
Verifiablevalidate in interface Verifiable<ThisType extends Query<ThisType>>ValidationExceptionpublic void validate(ValidationContext vContext) throws ValidationException
VerifiableIn general, this method will only be called internally, not by users.
validate in interface Verifiable<ThisType extends Query<ThisType>>vContext - handle to the current, filled-in validation contextValidationExceptionprotected void validateTables(ValidationContext vContext) throws ValidationException
vContext - handle to the current validation contextValidationExceptionprotected void collectSchemaObjects(ValidationContext vContext)
SqlObjectcollectSchemaObjects in class CustomizableSqlObjectvContext - handle to the current validation contextpublic final void appendTo(AppendableExt app) throws IOException
AppendeeappendTo in interface AppendeeappendTo in class AppendeeObjectapp - the AppendableExt to which this class should append itselfIOException - if the append failsprotected final ThisType getThisType()
protected void prependTo(AppendableExt app) throws IOException
appendTo(AppendableExt) before
appendTo(AppendableExt,SqlContext) within the original
SqlContext.IOExceptionprotected abstract void appendTo(AppendableExt app, SqlContext newContext) throws IOException
appendTo(AppendableExt) method within the context of calls to
SqlContext.pushContext(com.healthmarketscience.common.util.AppendableExt) and SqlContext.popContext(com.healthmarketscience.common.util.AppendableExt, com.healthmarketscience.sqlbuilder.SqlContext), so
the implementation is free to modify the given SqlContext.app - the target for the sql query generationnewContext - modifiable SqlContext for nested AppendeesIOExceptionCopyright © 2006–2021 OpenHMS. All rights reserved.