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, maybeAppendTo
collectSchemaObjects, doValidate, toString
toString, toString
public final ThisType validate() throws ValidationException
Verifiable
validate
in interface Verifiable<ThisType extends Query<ThisType>>
ValidationException
public void validate(ValidationContext vContext) throws ValidationException
Verifiable
In 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 contextValidationException
protected void validateTables(ValidationContext vContext) throws ValidationException
vContext
- handle to the current validation contextValidationException
protected void collectSchemaObjects(ValidationContext vContext)
SqlObject
collectSchemaObjects
in class CustomizableSqlObject
vContext
- handle to the current validation contextpublic final void appendTo(AppendableExt app) throws IOException
Appendee
appendTo
in interface Appendee
appendTo
in class AppendeeObject
app
- 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.IOException
protected 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 AppendeesIOException
Copyright © 2006–2021 OpenHMS. All rights reserved.