public class SQLStatement extends Object
Constructor and Description |
---|
SQLStatement(String stepname,
DatabaseMeta dbinfo,
String sql)
Creates a new SQLStatement
|
Modifier and Type | Method and Description |
---|---|
DatabaseMeta |
getDatabase()
Get the database connection for this SQL Statement
|
String |
getError()
Get the error that occurred when obtaining the SQL.
|
String |
getSQL()
Get the SQL for this SQL Statement
|
String |
getStepname()
Return the name of the step for which the SQL is intended
|
boolean |
hasError()
Checks whether or not an error occurred obtaining the SQL.
|
boolean |
hasSQL()
Checks whether or not SQL statements are present
|
void |
setDatabase(DatabaseMeta dbinfo)
Sets the database connection for this SQL Statement
|
void |
setError(String error)
Sets the error that occurred when obtaining the SQL.
|
void |
setSQL(String sql)
Sets the SQL to execute for this SQL Statement.
|
void |
setStepname(String stepname)
Set the name of the step for which the SQL is intended
|
public SQLStatement(String stepname, DatabaseMeta dbinfo, String sql)
dbinfo
- The database connectionsql
- The sql to execute on the connectionpublic void setStepname(String stepname)
stepname
- the name of the step for which the SQL is intendedpublic String getStepname()
public void setDatabase(DatabaseMeta dbinfo)
dbinfo
- The databaseconnectionpublic void setSQL(String sql)
sql
- The sql to execute, without trailing ";" or anything else.public DatabaseMeta getDatabase()
public String getSQL()
public void setError(String error)
error
- The error that occurred when obtaining the SQL.public String getError()
public boolean hasError()
public boolean hasSQL()