public abstract class SqlObject extends AppendeeObject
AppendeeObject.appendTo(com.healthmarketscience.common.util.AppendableExt)
calls. Additionally, there is a
collectSchemaObjects(com.healthmarketscience.sqlbuilder.SqlObject, com.healthmarketscience.sqlbuilder.ValidationContext)
method which is used for validation (more
details in the method comment).Modifier and Type | Field and Description |
---|---|
static SqlObject |
ALL_SYMBOL
SqlObject which represents a
* string for generating
"SELECT *" statements. |
static SqlObject |
NULL_VALUE
SqlObject which represents a
NULL value string |
static SqlObject |
QUESTION_MARK
SqlObject which represents a
? string for generating
prepared statements. |
Modifier | Constructor and Description |
---|---|
protected |
SqlObject() |
Modifier and Type | Method and Description |
---|---|
static void |
collectSchemaObjects(SqlObject obj,
ValidationContext vContext)
Utility method for classes which may not be in this package to invoke
collectSchemaObjects(ValidationContext) on a SqlObject. |
protected abstract void |
collectSchemaObjects(ValidationContext vContext)
Used during Query.validate() calls to collect the dbschema objects
referenced in a query.
|
protected void |
doValidate()
Utility method for implementing the
Verifiable.validate() method. |
String |
toString(int size,
SqlContext context)
Creates a SQL string from this object using the given initial size for
the AppendableExt buffer and the given SqlContext.
|
appendTo, toString, toString
public static final SqlObject QUESTION_MARK
?
string for generating
prepared statements.public static final SqlObject ALL_SYMBOL
*
string for generating
"SELECT *" statements.public static final SqlObject NULL_VALUE
NULL
value stringpublic String toString(int size, SqlContext context)
size
- initial size of the output buffercontext
- optional custom SqlContext for the SQL generationprotected void doValidate() throws ValidationException
Verifiable.validate()
method.ValidationException
public static void collectSchemaObjects(SqlObject obj, ValidationContext vContext)
collectSchemaObjects(ValidationContext)
on a SqlObject.obj
- relevant sql object, may be null
vContext
- current ValidationContextprotected abstract void collectSchemaObjects(ValidationContext vContext)
vContext
- handle to the current validation contextCopyright © 2006–2021 OpenHMS. All rights reserved.