public abstract class AbstractSql<P extends SqlParameter> extends java.lang.Object implements Sql<P>
Sql interface.| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
formattedSql |
protected SqlKind |
kind |
protected java.util.List<P> |
parameters |
protected java.lang.String |
rawSql |
protected java.lang.String |
sqlFilePath |
protected SqlLogType |
sqlLogType |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSql(SqlKind kind,
java.lang.CharSequence rawSql,
java.lang.CharSequence formattedSql,
java.lang.String sqlFilePath,
java.util.List<? extends P> parameters,
SqlLogType sqlLogType,
java.util.function.Function<java.lang.String,java.lang.String> commenter) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getFormattedSql()
Returns the formatted SQL string.
|
SqlKind |
getKind()
Returns the kind of the SQL.
|
java.util.List<P> |
getParameters()
Returns the parameter list.
|
java.lang.String |
getRawSql()
Returns the raw SQL string.
|
java.lang.String |
getSqlFilePath()
Returns the file path that contains this SQL.
|
SqlLogType |
getSqlLogType()
Returns the type of the SQL log.
|
java.lang.String |
toString() |
protected final SqlKind kind
protected final java.lang.String rawSql
protected final java.lang.String formattedSql
protected final java.lang.String sqlFilePath
protected final java.util.List<P extends SqlParameter> parameters
protected final SqlLogType sqlLogType
protected AbstractSql(SqlKind kind, java.lang.CharSequence rawSql, java.lang.CharSequence formattedSql, java.lang.String sqlFilePath, java.util.List<? extends P> parameters, SqlLogType sqlLogType, java.util.function.Function<java.lang.String,java.lang.String> commenter)
public SqlKind getKind()
SqlgetKind in interface Sql<P extends SqlParameter>public java.lang.String getRawSql()
SqlThe bind variables are displayed as ?.
getRawSql in interface Sql<P extends SqlParameter>public java.lang.String getFormattedSql()
SqlThe bind variables are replaced with the string representations of the parameters.
getFormattedSql in interface Sql<P extends SqlParameter>public java.lang.String getSqlFilePath()
SqlgetSqlFilePath in interface Sql<P extends SqlParameter>null if this SQL is auto-generatedpublic java.util.List<P> getParameters()
SqlgetParameters in interface Sql<P extends SqlParameter>public SqlLogType getSqlLogType()
SqlgetSqlLogType in interface Sql<P extends SqlParameter>public java.lang.String toString()
toString in class java.lang.Object