Package com.oopsclick.silk.storage
Class SqlCommand
- java.lang.Object
-
- com.oopsclick.silk.storage.SqlCommand
-
public class SqlCommand extends java.lang.Object
The SqlCommand object stores information related to an SQL command defined on the ORM file.This object provides data use by the SqlOperation Class to execute SQL commands.
SQL modifiers:
$P{} : Parameters.
$V{} : Code command changes
$T{} : Translation out
$R{} : Translation in
$A{} : Authorization
$G{} : Global Variables- Author:
- Italo Osorio
-
-
Constructor Summary
Constructors Constructor Description SqlCommand()
SqlCommand constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAuhorization()
Gets authorizationjava.lang.String[]
getFieldList()
java.lang.String[]
getOrderList()
int
getOrigin()
Gets the Origin.java.lang.String
getPath()
java.lang.String
getPkColumn()
Returns the alternative pkColumn.java.lang.String
getSqlName()
Gets the SQL name.java.lang.String
getSqlStatement()
Gets the SQL Statement.java.lang.String
getTriggerAction()
Returns the name of the trigger action.java.lang.String
getTriggerWhen()
Returns the trigger when event.java.lang.String[]
getWhereList()
int
parseSQLCommand()
java.lang.Boolean
reportZeroResult()
Return if the command will notify if a zero result exception occurs.void
setAuthorization(java.lang.String authorization)
Sets the authorizationvoid
setOrigin(int origin)
Sets the SQL name.void
setPkColumn(java.lang.String pkColumn)
Returns the alternative pkColumn.void
setReportZeroResult(java.lang.Boolean reportZeroResult)
Sets if a zero result exceptions will be reported.void
setSqlName(java.lang.String sqlName)
Sets the SQL name.void
setSqlStatement(java.lang.String sqlStatement)
Receives the SQL Command and parses it for parameters.void
setTriggerAction(java.lang.String triggerAction)
Sets the trigger action value.void
setTriggerWhen(java.lang.String triggerWhen)
Sets the trigger when event.java.lang.String
toString()
-
-
-
Method Detail
-
getSqlName
public java.lang.String getSqlName()
Gets the SQL name.- Returns:
- SQL Command's name.
-
setSqlName
public void setSqlName(java.lang.String sqlName)
Sets the SQL name.- Parameters:
sqlName
- the new SQL name
-
getOrigin
public int getOrigin()
Gets the Origin.- Returns:
- Origin value.
-
setOrigin
public void setOrigin(int origin)
Sets the SQL name.- Parameters:
origin
- the origin
-
getSqlStatement
public java.lang.String getSqlStatement()
Gets the SQL Statement.- Returns:
- SQL Statement
-
setSqlStatement
public void setSqlStatement(java.lang.String sqlStatement) throws SilkException
Receives the SQL Command and parses it for parameters. The parameters are load in the parameters list.- Parameters:
sqlStatement
- string- Throws:
SilkException
- the exception
-
getTriggerAction
public java.lang.String getTriggerAction()
Returns the name of the trigger action.- Returns:
- Trigger action
-
setTriggerAction
public void setTriggerAction(java.lang.String triggerAction) throws SilkException
Sets the trigger action value.- Parameters:
triggerAction
- the new trigger action- Throws:
SilkException
- the exception
-
getTriggerWhen
public java.lang.String getTriggerWhen()
Returns the trigger when event.- Returns:
- Trigger When
-
setTriggerWhen
public void setTriggerWhen(java.lang.String triggerWhen) throws SilkException
Sets the trigger when event.- Parameters:
triggerWhen
- the new trigger when- Throws:
SilkException
- the exception
-
getPkColumn
public java.lang.String getPkColumn()
Returns the alternative pkColumn.- Returns:
- Alternative primary key
-
setPkColumn
public void setPkColumn(java.lang.String pkColumn)
Returns the alternative pkColumn.- Parameters:
pkColumn
- the column name
-
reportZeroResult
public java.lang.Boolean reportZeroResult()
Return if the command will notify if a zero result exception occurs.- Returns:
- true or false.
-
setReportZeroResult
public void setReportZeroResult(java.lang.Boolean reportZeroResult)
Sets if a zero result exceptions will be reported.- Parameters:
reportZeroResult
- the new report zero result
-
getAuhorization
public java.lang.String getAuhorization()
Gets authorization- Returns:
- authorization
-
setAuthorization
public void setAuthorization(java.lang.String authorization) throws SilkException
Sets the authorization- Parameters:
authorization
- string- Throws:
SilkException
- the exception
-
getPath
public java.lang.String getPath()
-
getFieldList
public java.lang.String[] getFieldList()
-
getWhereList
public java.lang.String[] getWhereList()
-
getOrderList
public java.lang.String[] getOrderList()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
parseSQLCommand
public int parseSQLCommand()
-
-