|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectplanetj.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 | |
static java.util.List |
SQL_OP_APPLICABLE_PROPERTY_GROUPS
|
| Fields inherited from class planetj.dataengine.operation.Operation |
className |
| Fields inherited from class planetj.database.Row |
DISPLAY_ORDER_COMPARATOR, MODE_ALTER, MODE_COPY, MODE_DELETE, MODE_INSERT, MODE_READ, MODE_SEARCH, MODE_UNKNOWN, MODE_UPDATE, mRowEventListeners |
| 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 | |
java.lang.Object |
createInsertObject(SQLContext context,
ExecutingContext ec)
Create an object that can be used to insert an object for this Operation. |
java.lang.Object |
createInsertObject(SQLContext context,
ExecutingContext ec,
IRowEventListener listener)
Create an object that can be used to insert an object for this Operation. |
protected void |
dataTransferred(Row oldRow)
This method is invoked after this row has data transferred to it from another row. |
int |
delete(java.sql.Connection pConn,
ExecutingContext ec)
Delete this operation and reset any FieldDescriptors or other operations that reference this operation. |
java.lang.Object |
execute(Field field,
Row pRow,
ExecutingContext pEc)
Returns a result set that results from the SQL query Creation date: (4/23/2003 7:40:14 AM) |
java.lang.Object |
execute(Field field,
Row row,
ExecutingContext ec,
boolean checkConnectionPool)
Returns a result set that results from the SQL query Creation date: (4/23/2003 7:40:14 AM) |
java.lang.Object |
execute(SQLContext context)
Returns a result set that results from the SQL query Creation date: (4/23/2003 7:40:14 AM) |
java.util.List |
getActionNamesForType(java.lang.String type)
Gets any actions for the given type of action that this operation contains. |
java.util.List |
getApplicablePropertyGroupNames()
Gets the names of the applicable property groups for this operation. |
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. |
java.lang.String |
getConnectionAlias()
Get the alias of the system where this SQLOperation's data is located. |
ConnectionRow |
getConnectionRow()
Gets the ConnectionRow assoicated with this Application |
protected java.lang.Class |
getContextClass()
Gets the class to use for this operation's context. |
java.lang.String |
getDefaultOperationCode()
Return a default string to use on the operation field. |
java.lang.String |
getDescription()
Gets the description for this SQLOperation |
int |
getEncryptionId()
Gets the encryption ID of this SQLOperation |
java.lang.String |
getHeaderText(ExecutingContext ec)
Returns instruction header text |
java.lang.String |
getInnerResultsJsp()
Returns the JSP which should be used to display the RowCollection data. |
Row |
getInsertRow(SQLContext context,
ExecutingContext ec)
Gets the row to use for an insert (if this is an insert operation). |
java.lang.String |
getInstructions()
Gets the instructions for this operation. |
protected IOperationContext |
getNewContextInternal(Field field,
Row row,
ExecutingContext ec)
Gets a new IOperationContext for this operation. |
ApplicationSQLContext |
getNewSQLOperationContext()
Creates and returns a new SQLContext to perform this SQLOperation's query. |
ApplicationSQLContext |
getNewSQLOperationContext(Field field,
Row row,
ExecutingContext ec)
Creates and returns a new SQLContext to perform this SQLOperation's query. |
java.lang.String |
getOperationSQL()
Gets this SQLOperation's SQL |
java.lang.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. |
java.lang.String |
getSecuredTypeName()
Gets the secured type name of the secured object. |
java.lang.String |
getSetName()
Gets the name of the set to which this SQLOperation belongs |
int |
getThemeId()
Gets the theme ID of this SQLOperation |
java.lang.String |
getTranslatedLabel(UserProperties up)
Gets the label for this SQLOperation after translation |
java.lang.String |
getTranslatedTitle(UserProperties up)
Gets the title for this SQLOperation after translation. |
boolean |
isCallStatement()
Check if the the SQL for this SQL begins with "CALL " |
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 |
isRowCollectionOperation()
Check to see if this SQLOperation will result in a RowCollection |
boolean |
isSelectStatement()
Check to see if this SQLOperation is a select |
boolean |
isSQLParameterized()
Deprecated. - no longer used |
boolean |
isUpdateStatement()
Tests if this operation is an update statement. |
boolean |
isUserPromptingRequired()
Does the user need to be prompted for input. |
java.lang.Object |
postExecute(java.lang.Object result,
AbstractContext ac)
This method is invoked just after a context is executed. |
AbstractContext |
preExecute(AbstractContext ac)
This method is invoked just before a context is executed. |
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) |
protected void |
setApplication(Application newApplication)
Sets the Application associated with this SQLOperation |
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(java.lang.String connAlias)
Sets the alias of the system where this SQLOperation's data is located. |
void |
setDescription(java.lang.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(java.lang.String value)
Gets this SQLOperation's instructions |
void |
setIsSQLParameterized(boolean pUserPromptNeeded)
Deprecated. - no longer used |
void |
setJspFile(java.lang.String newJspFile)
Sets this SQLOperation's JSP file |
void |
setLabel(java.lang.String value)
Sets this SQLOperation's label. |
void |
setOperationSetName(java.lang.String name)
Sets this SQLOperation's operation set name. |
void |
setOperationSQL(java.lang.String value)
Deprecated. replaced with setOperationCode |
void |
setOwnerId(int value)
Sets this SQLOperation's owner id |
void |
setParametersJspFile(java.lang.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 |
protected void |
setReportBreakCollection(ReportBreakCollection pRBC)
Sets the ReportBreakCollection associated with this SQLOperation (may be null) |
protected void |
setRowPropertyGroupsInternal(PropertyGroupList propertyGroups)
Sets the PropertyGroups associated with this PropertyRow. |
void |
setSecurityId(int value)
Sets this SQLOperation's security id |
void |
setSetName(java.lang.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(java.lang.String value)
Sets this SQLOperation's title. |
void |
setType(int value)
Sets this SQLOperation's type |
int |
update(java.sql.Connection conn,
ExecutingContext ec)
Updates the database with the values in this Row. |
boolean |
validate(ExecutingContext ec)
Validate this Row based on it's configuration and field values. |
boolean |
validate(int operation,
java.security.Principal user)
Validate this Row based on its configuration and field values. |
| Methods inherited from class planetj.dataengine.PropertyRow |
getProperties, getRowPropertyGroup, getRowPropertyGroups, setProperties, setPropertiesInternal, setRowPropertyGroups, transferDataTo, transferPropertiesTo |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface planetj.dataengine.application.IOwner |
getOwnerIdField |
| Methods inherited from interface planetj.dataengine.action.IActionObject |
getActionRequest, getActionRequest, handleAction, isActionApplicable |
| Field Detail |
public static final java.util.List SQL_OP_APPLICABLE_PROPERTY_GROUPS
| Constructor Detail |
public SQLOperation()
| Method Detail |
public java.lang.Object createInsertObject(SQLContext context,
ExecutingContext ec)
throws CMException
CMException
public java.lang.Object createInsertObject(SQLContext context,
ExecutingContext ec,
IRowEventListener listener)
throws CMException
CMExceptionprotected void dataTransferred(Row oldRow)
Operation
dataTransferred in class Operation
public int delete(java.sql.Connection pConn,
ExecutingContext ec)
throws CMException
delete in class RowpConn - The connection to use for the deletion.
CMException
public final java.lang.Object execute(Field field,
Row pRow,
ExecutingContext pEc)
throws CMException
execute in class OperationpRow - planetj.database.Row - needed to extract values for current row parameters: ??, ???pEc - ExecutingContext in which to execute this Operation
CMException
public java.lang.Object execute(Field field,
Row row,
ExecutingContext ec,
boolean checkConnectionPool)
throws CMException
ec - planetj.dataengine.ExecutingContext - will be used in the future.checkConnectionPool - boolean - true if connection pool should be started.
CMException
public java.lang.Object execute(SQLContext context)
throws CMException
context - planetj.dataengine.SQLContext - will be used in the future.
CMException
public java.util.List getActionNamesForType(java.lang.String type)
throws CMException
CMExceptionpublic java.util.List getApplicablePropertyGroupNames()
public final int getCachingLevel()
public final long getCachingTimeMillis()
public java.lang.String getConnectionAlias()
getConnectionAlias in class Operation
public ConnectionRow getConnectionRow()
throws CMException
getConnectionRow in class OperationCMExceptionprotected java.lang.Class getContextClass()
public java.lang.String getDefaultOperationCode()
getDefaultOperationCode in class Operationpublic java.lang.String getDescription()
public int getEncryptionId()
public java.lang.String getHeaderText(ExecutingContext ec)
getHeaderText in class Rowpublic java.lang.String getInnerResultsJsp()
public Row getInsertRow(SQLContext context,
ExecutingContext ec)
throws CMException
CMExceptionpublic java.lang.String getInstructions()
getInstructions in class Operation
protected IOperationContext getNewContextInternal(Field field,
Row row,
ExecutingContext ec)
throws CMException
Operation
getNewContextInternal in class OperationCMException
public ApplicationSQLContext getNewSQLOperationContext()
throws CMException
CMException
public ApplicationSQLContext getNewSQLOperationContext(Field field,
Row row,
ExecutingContext ec)
throws CMException
CMExceptionpublic java.lang.String getOperationSQL()
public java.lang.String getParametersJspFile()
getParametersJspFile in class Operationpublic int getPerformanceStatisticsId()
public ReportBreakCollection getReportBreakCollection()
throws DataEngineException
DataEngineExceptionpublic int getSecuredTypeId()
getSecuredTypeId in interface IGuardedgetSecuredTypeId in class Rowpublic java.lang.String getSecuredTypeName()
getSecuredTypeName in interface IGuardedgetSecuredTypeName in class Rowpublic java.lang.String getSetName()
public int getThemeId()
public java.lang.String getTranslatedLabel(UserProperties up)
public java.lang.String getTranslatedTitle(UserProperties up)
public boolean isCallStatement()
public boolean isDeleteStatement()
throws CMException
CMException
public boolean isFieldApplicable(Field fld,
ExecutingContext ec)
throws CMException
isFieldApplicable in class Rowfld - The field which may or may not be applicable
CMException
public boolean isInsertStatement()
throws CMException
CMExceptionpublic boolean isRowCollectionOperation()
public boolean isSelectStatement()
public boolean isSQLParameterized()
public boolean isUpdateStatement()
throws CMException
CMException
public boolean isUserPromptingRequired()
throws CMException
isUserPromptingRequired in class OperationCMException
public AbstractContext preExecute(AbstractContext ac)
throws CMException
CMException
public java.lang.Object postExecute(java.lang.Object result,
AbstractContext ac)
throws CMException
result - The result of executing the context, possibly a RowCollection
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
protected void setApplication(Application newApplication)
throws CMException
CMException
public void setApplicationId(int id)
throws CMException
setApplicationId in class OperationCMException
public void setAutoRunId(int value)
throws CMException
CMException
public void setCacheLevel(int value)
throws CMException
CMException
public void setConnectionAlias(java.lang.String connAlias)
throws CMException
setConnectionAlias in class OperationCMException
public void setDescription(java.lang.String value)
throws CMException
CMException
public void setDisplayOrder(int value)
throws CMException
CMException
public void setEncryptionId(int value)
throws CMException
CMException
public void setInstructions(java.lang.String value)
throws CMException
CMExceptionpublic void setIsSQLParameterized(boolean pUserPromptNeeded)
public void setJspFile(java.lang.String newJspFile)
throws CMException
CMException
public void setLabel(java.lang.String value)
throws CMException
CMException
public void setOperationSetName(java.lang.String name)
throws CMException
CMException
public void setOperationSQL(java.lang.String value)
throws CMException
CMException
public void setOwnerId(int value)
throws CMException
setOwnerId in class OperationCMException
public void setParametersJspFile(java.lang.String newJspFile)
throws CMException
CMException
public void setPerformanceStatisticsId(int value)
throws CMException
CMExceptionprotected void setReportBreakCollection(ReportBreakCollection pRBC)
protected void setRowPropertyGroupsInternal(PropertyGroupList propertyGroups)
throws CMException
setRowPropertyGroupsInternal in class PropertyRowCMException
public void setSecurityId(int value)
throws CMException
CMException
public void setSetName(java.lang.String value)
throws CMException
CMException
public void setThemeId(int value)
throws CMException
CMException
public void setTitle(java.lang.String value)
throws CMException
CMException
public void setType(int value)
throws CMException
CMException
public int update(java.sql.Connection conn,
ExecutingContext ec)
throws CMException
Operation
update in class Operationconn - The connection to use for the update
CMException
public boolean validate(int operation,
java.security.Principal user)
throws CMException
Row
validate in class Rowoperation - i.e. Row.INSERT, Row.UPDATE, etc...
CMException
public boolean validate(ExecutingContext ec)
throws CMException
validate in class Operationec - current context in which application is executing
CMException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||