|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--planetj.database.Row | +--planetj.dataengine.PropertyRow | +--planetj.dataengine.operation.Operation | +--planetj.dataengine.sqloperation.SQLOperation
Represents an operation that can be run against a databse. A SQLOperation may be contained in an Application, or may run independent of any Application. Note that a single SQLOperation object is often shared by multiple users of an Application, so user specific data should not be stored in a SQLOperation.
Nested Class Summary |
Nested classes inherited from class planetj.database.Row |
Row.SpacingRow |
Field Summary |
Fields inherited from class planetj.dataengine.operation.Operation |
className |
Fields inherited from class planetj.database.Row |
COPY, DELETE, INSERT, MODE_COPY, MODE_DELETE, MODE_INSERT, MODE_READ, MODE_SEARCH, MODE_UNKNOWN, MODE_UPDATE, READ, UPDATE |
Fields inherited from interface planetj.dataengine.security.IGuarded |
TYPE_ID_UNKNOWN, TYPE_NAME_FIELD, TYPE_NAME_SQLOPERATION, TYPE_SECURED_BY_LEVEL, TYPE_SECURED_BY_OPERATION, TYPE_UNSECURED |
Constructor Summary | |
SQLOperation()
|
Method Summary | |
Row |
createRow(Row row)
Initializes this SQLOperation as it is retrieved from the DB |
int |
delete(Connection pConn,
ExecutingContext ec)
Delete this operation and reset any FieldDescriptors or other operations that reference this operation. |
Object |
execute(ExecutingContext pEc,
Row pRow)
Returns a result set that results from the SQL query Creation date: (4/23/2003 7:40:14 AM) |
Object |
execute(ExecutingContext ec,
Row pRow,
boolean checkConnectionPool)
Returns a result set that results from the SQL query Creation date: (4/23/2003 7:40:14 AM) |
int |
getCachingLevel()
Gets the caching level to use when retrieving a row collection for this SQLOperation |
long |
getCachingTimeMillis()
Gets the amount of time this operation should be cached for. |
String |
getConnectionAlias()
Get the alias of the system where this SQLOperation's data is located. |
ConnectionRow |
getConnectionRow()
Gets the ConnectionRow assoicated with this Application |
String |
getDefaultOperationCode()
Return a default string to use on the operation field. |
String |
getDescription()
Gets the description for this SQLOperation |
int |
getEncryptionId()
Gets the encryption ID of this SQLOperation |
String |
getHeaderText(ExecutingContext ec)
Returns instruction header text |
ApplicationSQLContext |
getNewSQLOperationContext()
Creates and returns a new SQLContext to perform this SQLOperation's query. |
String |
getOperationSQL()
Gets this SQLOperation's SQL |
String |
getParametersJspFile()
Gets the JSP used to query the user for this SQLOperation's parameters |
int |
getPerformanceStatisticsId()
Gets the perfomrance statistics ID of this SQLOperation |
ReportBreakCollection |
getReportBreakCollection()
Gets the ReportBreakCollection associated with this SQLOperation (may be null) |
int |
getSecuredTypeId()
Gets the id of the secured type. |
String |
getSecuredTypeName()
Gets the secured type name of the secured object. |
String |
getSetName()
Gets the name of the set to which this SQLOperation belongs |
int |
getThemeId()
Gets the theme ID of this SQLOperation |
String |
getTitle()
Gets the title for this SQLOperation. |
String |
getTranslatedLabel(UserProperties up)
Gets the label for this SQLOperation after translation |
String |
getTranslatedTitle(UserProperties up)
Gets the title for this SQLOperation after translation. |
boolean |
isDeleteStatement()
Tests if this operation is a delete statement. |
boolean |
isFieldApplicable(Field fld,
ExecutingContext ec)
Tests if a field is applicable in the current scenario |
boolean |
isInsertStatement()
Tests whether or not rows can be inserted into the results of this SQLOperation |
boolean |
isSelectStatement()
Tests whether or not rows can be inserted into the results of this SQLOperation |
boolean |
isSQLParameterized()
Tests if this SQLOperation's SQL is parameterized and thus requires user input before it can be run |
boolean |
isUpdateStatement()
Tests if this operation is an update statement. |
boolean |
isUserPromptingRequired()
Does the user need to be prompted for input. |
void |
setAllowDeletes(boolean value)
Sets if rows in the results of this SQLOperation can be deleted (if this SQLOperation is a query) |
void |
setAllowDetails(boolean value)
Sets whether or not the details of the results of this SQLOperation can be viewed (if this SQLOperation is a query) |
void |
setAllowInserts(boolean value)
Sets if rows can be inserted into the results of this SQLOperation if this SQLOperation represents a query |
void |
setAllowUpdates(boolean value)
Sets if the results of this SQLOperation can be updated (if this SQLOperation is a query) |
void |
setApplicationId(int id)
Set the ID of this SQLOperation's Application |
void |
setAutoRunId(int value)
Sets this SQLOperation's auto run id |
void |
setCacheLevel(int value)
Sets the caching level to use when retrieving this SQLOperation's row collection |
void |
setConnectionAlias(String connAlias)
Sets the alias of the system where this SQLOperation's data is located. |
void |
setDescription(String value)
Sets this SQLOperation's description |
void |
setDisplayOrder(int value)
Sets this SQLOperation's display order. |
void |
setEncryptionId(int value)
Sets this SQLOperation's encryption id |
void |
setInstructions(String value)
Gets this SQLOperation's instructions |
void |
setIsSQLParameterized(boolean pUserPromptNeeded)
Sets if this SQLOperation's SQL is parameterized and thus requires user input before it can be run |
void |
setJspFile(String newJspFile)
Sets this SQLOperation's JSP file |
void |
setLabel(String value)
Sets this SQLOperation's label. |
void |
setOperationSetName(String name)
Sets this SQLOperation's operation set name. |
void |
setOperationSQL(String value)
Sets this SQLOperation's SQL |
void |
setOwnerId(int value)
Sets this SQLOperation's owner id |
void |
setParametersJspFile(String newJspFile)
Sets the JSP used to query the user for this SQLOperation's parameters |
void |
setPerformanceStatisticsId(int value)
Sets this SQLOperation's performance statistics id |
void |
setSecurityId(int value)
Sets this SQLOperation's security id |
void |
setSetName(String value)
Sets the name of the set to which this SQLOperation belongs |
void |
setThemeId(int value)
Sets this SQLOperation's auto theme id |
void |
setTitle(String value)
Sets this SQLOperation's title. |
void |
setType(int value)
Sets this SQLOperation's type |
boolean |
validate(ExecutingContext ec)
Validate this Row based on it's configuration and field values. |
boolean |
validate(int operation,
Principal user)
Validate this Row based on its configuration and field values. |
Methods inherited from class planetj.dataengine.PropertyRow |
getProperties, getRowPropertyGroup, getRowPropertyGroups, setProperties, transferDataTo |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface planetj.dataengine.application.IOwner |
getOwnerIdField |
Constructor Detail |
public SQLOperation()
Method Detail |
public Row createRow(Row row) throws CMException
createRow
in interface IRowCreator
createRow
in class Operation
row
- A Row containing data read from the database (it will always be equal to this)
CMException
public int delete(Connection pConn, ExecutingContext ec) throws CMException
delete
in class Row
pConn
- The connection to use for the deletion.
CMException
public Object execute(ExecutingContext pEc, Row pRow) throws CMException
execute
in class Operation
pRow
- planetj.database.Row - needed to extract values for current row parameters: ??, ???
CMException
public Object execute(ExecutingContext ec, Row pRow, boolean checkConnectionPool) throws CMException
ec
- planetj.dataengine.ExecutingContext - will be used in the future.pRow
- planetj.database.Row - needed to extract values for current row parameters: ??, ???checkConnectionPool
- boolean - true if connection pool should be started.
CMException
public final int getCachingLevel()
public final long getCachingTimeMillis()
public String getConnectionAlias()
getConnectionAlias
in class Operation
public ConnectionRow getConnectionRow() throws CMException
CMException
public String getDefaultOperationCode()
getDefaultOperationCode
in class Operation
public String getDescription()
public int getEncryptionId()
public String getHeaderText(ExecutingContext ec)
getHeaderText
in class Row
public ApplicationSQLContext getNewSQLOperationContext() throws CMException
CMException
public String getOperationSQL()
public String getParametersJspFile()
public int getPerformanceStatisticsId()
public ReportBreakCollection getReportBreakCollection() throws DataEngineException
DataEngineException
public int getSecuredTypeId()
getSecuredTypeId
in interface IGuarded
getSecuredTypeId
in class Row
public String getSecuredTypeName()
getSecuredTypeName
in interface IGuarded
getSecuredTypeName
in class Row
public String getSetName()
public int getThemeId()
public String getTitle()
public String getTranslatedLabel(UserProperties up)
public String getTranslatedTitle(UserProperties up)
public boolean isDeleteStatement() throws CMException
CMException
public boolean isFieldApplicable(Field fld, ExecutingContext ec) throws CMException
isFieldApplicable
in class Row
fld
- The field which may or may not be applicable
CMException
public boolean isInsertStatement() throws CMException
CMException
public boolean isSelectStatement() throws CMException
CMException
public boolean isSQLParameterized()
public boolean isUpdateStatement() throws CMException
CMException
public boolean isUserPromptingRequired() throws CMException
isUserPromptingRequired
in class Operation
CMException
public void setAllowDeletes(boolean value) throws CMException
CMException
public void setAllowDetails(boolean value) throws CMException
CMException
public void setAllowInserts(boolean value) throws CMException
CMException
public void setAllowUpdates(boolean value) throws CMException
CMException
public void setApplicationId(int id) throws CMException
CMException
public void setAutoRunId(int value) throws CMException
CMException
public void setCacheLevel(int value) throws CMException
CMException
public void setConnectionAlias(String connAlias) throws CMException
CMException
public void setDescription(String value) throws CMException
CMException
public void setDisplayOrder(int value) throws CMException
CMException
public void setEncryptionId(int value) throws CMException
CMException
public void setInstructions(String value) throws CMException
CMException
public void setIsSQLParameterized(boolean pUserPromptNeeded)
public void setJspFile(String newJspFile) throws CMException
CMException
public void setLabel(String value) throws CMException
CMException
public void setOperationSetName(String name) throws CMException
CMException
public void setOperationSQL(String value) throws CMException
CMException
public void setOwnerId(int value) throws CMException
CMException
public void setParametersJspFile(String newJspFile) throws CMException
CMException
public void setPerformanceStatisticsId(int value) throws CMException
CMException
public void setSecurityId(int value) throws CMException
CMException
public void setSetName(String value) throws CMException
CMException
public void setThemeId(int value) throws CMException
CMException
public void setTitle(String value) throws CMException
CMException
public void setType(int value) throws CMException
CMException
public boolean validate(int operation, Principal user) throws CMException
Row
validate
in class Row
operation
- i.e. Row.INSERT, Row.UPDATE, etc...
CMException
public boolean validate(ExecutingContext ec) throws CMException
validate
in class Operation
ec
- current context in which application is executing
CMException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |