planetj.dataengine.sqloperation
Class SQLOperation

java.lang.Object
  extended byplanetj.database.Row
      extended byplanetj.dataengine.PropertyRow
          extended byplanetj.dataengine.operation.Operation
              extended byplanetj.dataengine.sqloperation.SQLOperation
All Implemented Interfaces:
java.lang.Cloneable, IActionObject, IBatchProcessObject, IBusinessObject, ICSVRow, IFDFObject, IGuarded, INamedCollection, INavigationObject, IOperation, IOwner, IRowCreator, ISQLOperation, IXMLObject, java.io.Serializable
Direct Known Subclasses:
AuthenticationOperation, AutoRunOperation, FileServerOperation, MultiSystemSQLOperation, OperationBuilderCreateDataInquiryOp, PossibleValuesOperation, PossibleValuesSearchOperation, TabbedOperation, UserAuthorizationOperation

public class SQLOperation
extends Operation
implements java.io.Serializable, ISQLOperation, IOwner

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.

See Also:
Serialized Form

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.sqloperation.ISQLOperation
CACHING_LEVEL_CACHE_FOR_1_DAY, CACHING_LEVEL_CACHE_FOR_1_HOUR, CACHING_LEVEL_CACHE_FOR_1_WEEK, CACHING_LEVEL_CACHE_FOR_15_MINUTES, CACHING_LEVEL_CACHE_FOR_30_MINUTES, CACHING_LEVEL_CHECK_AND_STORE_IN_CACHE, CACHING_LEVEL_NO_CACHE, CACHING_LEVEL_ONLY_CHECK_CACHE, CACHING_LEVEL_ONLY_STORE_IN_CACHE, CURRENT_SQL_OPERATION, INSIDE_APPLICATION, SQL_OPERATION, SQL_OPERATION_HTTP_ID, SQL_OPERATION_ID, SQL_OPERATION_MODE, SQL_OPERATION_ONLY
 
Fields inherited from interface planetj.dataengine.operation.IOperation
ALLOW_DELETES, ALLOW_DETAILS, ALLOW_INSERTS, ALLOW_UPDATES, APPLICABLE_CODE_ONLY, APPLICABLE_ONLY_FOR_DISPLAY, APPLICABLE_ONLY_FOR_SQL, APPLICATION_ID, AUTHORIZE_EXECUTE_OPERATION, AUTO_RUN_ID, AUTO_RUN_STATUS, CACHE_LEVEL, CONNECTION_ALIAS, CSS_LINK_CLASS, CURRENT_FIELD, CURRENT_REQUEST, CURRENT_RESPONSE, CURRENT_ROW, CURRENT_ROW_COLLECTION, CURRENT_SERVLET, CURRENT_USER, DEPENDS_ON_ID, DESCRIPTION, DETAILS_JSP_FILE, DISPLAY_COLUMNS, DISPLAY_LOCATION, DISPLAY_LOCATION_LEFT, DISPLAY_LOCATION_TOP, DISPLAY_ORDER, DISPLAY_RULE, DISPLAY_RULE_HIDE, DISPLAY_RULE_UNKNOWN, ENCRYPTION_ID, EXECUTION_MODE, EXECUTION_MODE_NO, EXECUTION_MODE_YES, EXECUTION_RULE, EXECUTION_RULE_EXECUTE_ONLY, EXECUTION_RULE_EXECUTE_THEN_PROMPT, EXECUTION_RULE_PROMPT_THEN_EXECUTE, INSTRUCTIONS, JSP_FILE, LABEL, OPERATION_CLASS, OPERATION_CODE, OPERATION_DISPLAY_MODE, OPERATION_DISPLAY_MODE_FULL, OPERATION_DISPLAY_MODE_SKINNY, OPERATION_HTTP_ID, OPERATION_ID, OPERATION_SET, OPERATION_SQL, OPERATION_TABLE_NAME, OUTPUT_ALIAS, OWNER_ID, PARAMETERS_JSP_FILE, PARENT_ID, PERFORMACE_STATISTICS_ID, PROPERTIES, ROW_CLASS, ROW_COLLECTION_CLASS, ROW_COUNT, SECURITY_ID, SECURITY_TYPE, SET_NAME, THEME_ID, TITLE, TYPE, TYPE_ASSOCIATED_EXECUTION_GROUP, TYPE_ASSOCIATED_JAVA_OPERATION, TYPE_ASSOCIATED_JOIN, TYPE_ASSOCIATION_1_TO_1, TYPE_ASSOCIATION_1_TO_MANY, TYPE_AUTHENTICATION, TYPE_AUTO_POPULATE, TYPE_AUTORUN_BATCH_PROCESS, TYPE_AUTORUN_EMAIL, TYPE_BLOB_DOWNLOAD, TYPE_EMAIL, TYPE_EXECUTION_GROUP, TYPE_FILE_UPLOAD, TYPE_HTML_CODE, TYPE_HTML_CODE_ASSOCIATION, TYPE_HTML_REFERENCE, TYPE_HTML_REFERENCE_ASSOCIATION, TYPE_JAVA_OPERATION, TYPE_JSP_REFERENCE, TYPE_JSP_REFERENCE_ASSOCIATION, TYPE_POSSIBLE_VALUES, TYPE_POSSIBLE_VALUES_SEARCH, TYPE_POSSIBLE_VALUES_SELECTOR, TYPE_REFERER_AUTHORIZATION_OPERATION, TYPE_SQL, TYPE_TABBED, TYPE_TABBED_ASSOCIATION, TYPE_UNKNOWN, TYPE_USER_AUTHENTICATION_LIST_OPERATION, TYPE_USER_AUTHORIZATION_LIST_OPERATION, TYPE_USER_AUTHORIZATION_OPERATION, TYPE_VIEW_SELECTED_ASSOCIATION, USAGE_ID
 
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.operation.Operation
adjustRequest, createAction, createMagicRequest, createMagicRequest, createMagicRequest, createMagicRequest, createMagicRequest, createRow, createSQLContextForDelete, createSQLContextForInsert, createSQLContextForUpdate, execute, execute, execute, execute, execute, getActionDefaultLocation, getActionDescriptor, getActions, getActionsForType, getApplication, getApplicationId, getApplicationIdAsInteger, getAutoRunId, getAutoRunOperation, getAutoRunStatus, getChildren, getConnectionAlias, getConnectionRow, getCSSLinkClass, getCurrentTab, getDeleteConfirmationMessage, getDependants, getDependsOn, getDependsOnId, getDependsOnIdAsInteger, getDetailsJspFile, getDisplayColumns, getDisplayColumnsAsString, getDisplayColumnsAsStringArray, getDisplayLocation, getDisplayOrder, getDisplayRule, getExecutionRule, getFieldDefaultValue, getId, getIdAsInteger, getJspFile, getLabel, getLayoutProperties, getNavigationSuffix, getNewContext, getNewContext, getNewContextInternal, getOperationClass, getOperationCode, getOperationHandledActionNames, getOperationSetName, getOriginalInstructions, getOutputAlias, getOwnerId, getOwnerIdField, getParent, getParentId, getParentIdAsInteger, getPropertyFieldName, getRowClass, getRowClassName, getRowCollectionClass, getRowCollectionClassName, getRowCount, getRowPropertyGroups, getSecurityId, getSecurityType, getTitle, getTitleForDisplay, getType, getUsageId, getUserMessageForOperation, hasDependants, initializeRow, insert, isAllowDeletes, isAllowDetails, isAllowInserts, isAllowUpdates, isAssociation, isAuthentication, isAuthorizedForExecution, isAutoPopulate, isAutoRunOperation, isBlobDownload, isChild, isContextCurrent, isDependant, isDisplayable, isDisplayRule, isExecutionGroup, isFileUpload, isHide, isHtml, isHTMLAssociation, isHtmlCode, isHtmlCodeAssocation, isHtmlReference, isHtmlReferenceAssociation, isJava, isJavaAssociation, isJSPReference, isJSPReferenceAssociation, isOneToManyAssociation, isOneToOneAssociation, isParent, isPleaseWait, isPossibleValues, isPossibleValuesSearch, isPossibleValuesSelector, isSQL, isSQLAssociation, isTabDataOperation, isUserAuthenticationListOperation, isUserAuthorizationListOperation, isUserAuthorizationOperation, openForExecution, postDelete, postInsert, prepareForRun, setCurrentTab, setDefaultOperationCode, setDisplayColumns, setDisplayColumns, setDisplayColumns, setId, setId, setOperationCode, setRowClass, setRowClassInternal, setRowClassName, setRowClassNameInternal, setRowCollectionClass, setRowCollectionClassInternal, setRowCollectionClassName, setRowCollectionClassNameInternal, setRowCount, setUsageId, statusChanged, toString, validateOperationCode
 
Methods inherited from class planetj.dataengine.PropertyRow
getProperties, getRowPropertyGroup, getRowPropertyGroups, setProperties, setPropertiesInternal, setRowPropertyGroups, transferDataTo, transferPropertiesTo
 
Methods inherited from class planetj.database.Row
add, add, addObject, addPropertyChangeListener, addPropertyChangeListener, addRowEventListener, addRowEventListeners, addTable, addToRowCollection, appendDisplayType, batchProcess, clearFields, clearTables, clearValidationException, clone, cloneRow, commitFieldValues, commitFieldValues, commitFieldValues, concatenateFieldFullLengthValues, concatenateFieldValues, containsField, copy, copyIntoRowFieldsWithCommonFieldNames, copyIntoRowFieldsWithCommonFieldNames, copyIntoRowFieldsWithCommonUsageIds, copyIntoRowFieldsWithGivenFieldNames, copyIntoRowFieldsWithGivenFieldNames, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, createNamedActionRequest, defaultMerge, delete, delete, delete, deleteObject, divide, duplicateKey, duplicateKey, enforceExclusiveOr, equals, equals, equalsInstance, fieldHasPossibleValuesSQLOperation, firePropertyChange, fireRowEvent, getActionRequest, getActionRequest, getActionsForFields, getActionsForOperation, getAssociation, getAssociation, getAssociationByOperationUsageId, getAssociationOperation, getAttribute, getAutoIncrementDatabaseDrivenField, getBackgroundColor, getChangedFields, getColumnSpan, getCompleteRow, getCompleteRow, getConcurrentFields, getConfigProperty, getCopiedFieldValues, getCreationContext, getCSVRow, getCSVRow, getDatabaseRow, getDatabaseRow, getDatabaseRow, getDatabaseRow, getDBSystem, getDeleteConfirmation, getDisjointRowClass, getDisplayValue, getDisplayValueByUsageId, getDisplayValueForKey, getErrorMessageForOperation, getExternalName, getExternalNames, getFDFData, getFDTable, getField, getField, getField, getFieldAssociationOperation, getFieldCollection, getFieldDescriptor, getFieldDescriptor, getFieldDescriptor, getFieldDescriptorsWithUsage, getFieldDescriptorsWithUsageId, getFieldDescriptorWithUsageId, getFieldDisplayComponent, getFieldDisplayOrder, getFieldDisplayValue, getFieldDisplayValue, getFieldExternalName, getFieldFieldClassParameters, getFieldFieldSetName, getFieldIncrementor, getFieldMaxLength, getFieldNames, getFieldNames, getFieldPossibleValues, getFields, getFields, getFieldSearchDefaultValue, getFieldSets, getFieldsForInsert, getFieldSQLObject, getFieldStatusChange, getFieldsToDisplay, getFieldsToDisplayStrict, getFieldsToDisplayStrict, getFieldStyleClass, getFieldsWithUsageId, getFieldUsageIds, getFieldValue, getFieldValueWithUsageId, getFieldWithUsageId, getHorizontalAlignment, getJSPFor, getKeyFieldNames, getKeyFields, getKeyFields, getLibraryName, getMaxFieldLengths, getMaxFieldLengths, getMaxInsertRetries, getMetaDataSystemAlias, getNamed, getNamed, getNamesOfUpdatedFields, getNavigationKey, getNavigationListKey, getNextOperationToRun, getOperation, getOperation, getOperationFromDB, getOperationFromDBByUsage, getPercentage, getPhysicalFieldNames, getPossibleValueClass, getPossibleValueClass, getPossibleValues, getPossibleValuesKey, getPossibleValuesOperation, getPropertyChangeSupport, getPropertyGroup, getPropertyGroups, getPropertyGroups, getReplacementFieldsToDisplay, getReplacementFieldsToDisplay, getRequiredFields, getRow, getRowCollection, getRowDisplayAttributes, getRowDisplayAttributes, getRowHandledActionNames, getRowKey, getSQL, getSQLContext, getStaticAttribute, getStaticAttributes, getSum, getSystemAlias, getTabbedOperation, getTable, getTable, getTableName, getTables, getTimestamp, getUpdatedFields, getUserMessageForOperation, getUseWOWLibrary, getValidationExceptions, getValueAsBoolean, getValueAsByte, getValueAsDate, getValueAsDate, getValueAsDouble, getValueAsDouble, getValueAsFloat, getValueAsFullLengthString, getValueAsInt, getValueAsInt, getValueAsLong, getValueAsNumber, getValueAsNumber, getValueAsShort, getValueAsString, getValueAsString, getValueAsStringByUsageId, getValueByUsageId, getValueForKey, getValues, getXMLData, getXMLData, getXMLHeaderData, goToNextOperation, handleAction, hasAssociationOperation, hasChildRows, hasMultipleStyleClasses, hasPossibleValuesKeyClassOrOp, hasPossibleValuesOperation, hasPropertyChangeListeners, incrementFieldValue, initializeRow, initializeRow, initializeRow, initializeRow, initializeRow, insert, insert, insert, is, isActionApplicable, isActionRepeatable, isARow, isARowCollection, isChanged, isChanged, isChangedRealTime, isChangedSinceLastCheck, isCloneNeeded, isContainsAllFields, isCopyable, isCurrent, isDeletable, isDistinctRow, isEditable, isEmpty, isFieldAuthorizedForEdit, isFieldAuthorizedForRead, isFieldAutoIncrement, isFieldAutoIncrementDatabaseDriven, isFieldAutoIncrementWOWDriven, isFieldDisplayable, isFieldPresent, isFieldReadOnly, isFieldReadOnlyOnSearch, isFieldRequired, isFieldRequiredOnSearch, isFieldsChanged, isFieldUpdateable, isFieldValueNotBlank, isFieldValuePossibleValue, isFieldValuesDatabaseDefaults, isGenerateChildRows, isGroupByRow, isGuarded, isHasColumnNames, isInARowCollection, isIncrementorResetAfterMaxInsertRetries, isInitializeDerivedFieldEnabled, isInitializeDerivedFieldsEnabled, isJoinedRow, isKeyFieldsPresent, isLogicalRow, isMultipleDeleteEnabled, isParameterRow, isPersistent, isPhysicalRow, isPrepareFieldValue, isPropertyChangeEventsEnabled, isReturningFromPossibleValuesSearch, isRowDisplayable, isRowKeyed, isSelectable, isStatusChange, isToBeSelected, isUnionRow, isUpdateable, isUseRowForFieldSets, isValidateDerivedFields, isValidateRequired, isValidationRequiredForAutoPopulate, isViewable, iterator, joinedDatabaseAccessFailure, joinedDelete, joinedDelete, joinedInsert, joinedInsert, joinedUpdate, joinedUpdate, merge, newField, newField, newField, newField, openFor, persist, populate, populate, populate, populateFD, postCreate, postExtract, postInsert, postUpdate, postUpdate, preDelete, preInsert, prepareForDetails, prepareForParameters, prepareForResultsDisplay, prepareFromFieldNames, preUpdate, removeField, removeField, removeNavigationKey, removePropertyChangeListener, removePropertyChangeListener, removeRowEventListener, removeRowEventListeners, replaceField, replaceFields, replaceFieldValues, replaceNumbersWithNames, reread, rereadIfNeeded, resetDisplayValues, rollbackChanges, runSQLQuery, runSQLQuery, runSQLStatement, runSQLStatement, setAttribute, setAutoUpdateFieldValues, setCreationContext, setCreationOperation, setFieldInitialValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValueAsString, setFieldValueAsString, setFieldValuesAsDate, setFieldValuesToDefault, setFieldValuesWithCommonFieldNames, setFieldValuesWithCommonFieldNames, setFieldValuesWithCommonFieldNames, setFieldValuesWithCommonUsageIds, setFieldValueToDefault, setMultipleDeleteEnabled, setNavigationKey, setParameterRow, setPersistent, setPropertyChangeEventsEnabled, setPropertyGroups, setReturningFromPossibleValuesSearch, setRowDisplayAttributes, setSavepoint, setSavepoint, setSavepoint, setStaticAttribute, setTables, setTables, setUseWOWLibrary, setValidateDerivedFields, setValidateRequired, setValues, size, splitAndSetFieldValues, swapFieldValues, toCSV, toDOC, toDOC, toFDF, toPDF, toPDF, toString, toUpperCase, toXML, transferDataTo, update, update, update, updateFieldValues, updateGlobalValues, updateObject, validate, validateField, validateRowOperation
 
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

SQL_OP_APPLICABLE_PROPERTY_GROUPS

public static final java.util.List SQL_OP_APPLICABLE_PROPERTY_GROUPS
Constructor Detail

SQLOperation

public SQLOperation()
Method Detail

createInsertObject

public java.lang.Object createInsertObject(SQLContext context,
                                           ExecutingContext ec)
                                    throws CMException
Create an object that can be used to insert an object for this Operation.

Throws:
CMException

createInsertObject

public java.lang.Object createInsertObject(SQLContext context,
                                           ExecutingContext ec,
                                           IRowEventListener listener)
                                    throws CMException
Create an object that can be used to insert an object for this Operation.

Throws:
CMException

dataTransferred

protected void dataTransferred(Row oldRow)
Description copied from class: Operation
This method is invoked after this row has data transferred to it from another row. Subclasses may override.

Overrides:
dataTransferred in class Operation

delete

public int delete(java.sql.Connection pConn,
                  ExecutingContext ec)
           throws CMException
Delete this operation and reset any FieldDescriptors or other operations that reference this operation. Author: Paul Holm Date: (04/11/2003 6:05:56 PM)

Overrides:
delete in class Row
Parameters:
pConn - The connection to use for the deletion.
Returns:
The number of row that were deleted.
Throws:
CMException

execute

public final java.lang.Object execute(Field field,
                                      Row pRow,
                                      ExecutingContext pEc)
                               throws CMException
Returns a result set that results from the SQL query Creation date: (4/23/2003 7:40:14 AM)

Overrides:
execute in class Operation
Parameters:
pRow - planetj.database.Row - needed to extract values for current row parameters: ??, ???
pEc - ExecutingContext in which to execute this Operation
Throws:
CMException

execute

public java.lang.Object execute(Field field,
                                Row row,
                                ExecutingContext ec,
                                boolean checkConnectionPool)
                         throws CMException
Returns a result set that results from the SQL query Creation date: (4/23/2003 7:40:14 AM)

Parameters:
ec - planetj.dataengine.ExecutingContext - will be used in the future.
checkConnectionPool - boolean - true if connection pool should be started.
Throws:
CMException

execute

public java.lang.Object execute(SQLContext context)
                         throws CMException
Returns a result set that results from the SQL query Creation date: (4/23/2003 7:40:14 AM)

Parameters:
context - planetj.dataengine.SQLContext - will be used in the future.
Throws:
CMException

getActionNamesForType

public java.util.List getActionNamesForType(java.lang.String type)
                                     throws CMException
Gets any actions for the given type of action that this operation contains.

Throws:
CMException

getApplicablePropertyGroupNames

public java.util.List getApplicablePropertyGroupNames()
Gets the names of the applicable property groups for this operation. These are the only property groups which will be defaulted for this operation


getCachingLevel

public final int getCachingLevel()
Gets the caching level to use when retrieving a row collection for this SQLOperation


getCachingTimeMillis

public final long getCachingTimeMillis()
Gets the amount of time this operation should be cached for.

Returns:
time operation should be cached for;

getConnectionAlias

public java.lang.String getConnectionAlias()
Get the alias of the system where this SQLOperation's data is located. This may be different than the alias of the system where the SQLOperation table itself is located, which is returned by the getSystemAlias() method. If no connection alias has been specified for this Operation, then the connection alias of this Operation's application (if this SQLOperation has an application) is returned.

Overrides:
getConnectionAlias in class Operation
Returns:
alias for system where this SQLOperation's data resides.

getConnectionRow

public ConnectionRow getConnectionRow()
                               throws CMException
Gets the ConnectionRow assoicated with this Application

Overrides:
getConnectionRow in class Operation
Throws:
CMException

getContextClass

protected java.lang.Class getContextClass()
Gets the class to use for this operation's context. Subclasses may override. The default is ApplicationSQLContext, and any overridden value should 1.) Be a subclass of ApplicatonSQLContext and 2.) Have a default constructor


getDefaultOperationCode

public java.lang.String getDefaultOperationCode()
Return a default string to use on the operation field. Subclasses can override to provide a context sensitive op code. NOTE: This statement is used because on the iSeries, all systems have a table in library QIWS called QCUSTCDT.

Overrides:
getDefaultOperationCode in class Operation

getDescription

public java.lang.String getDescription()
Gets the description for this SQLOperation


getEncryptionId

public int getEncryptionId()
Gets the encryption ID of this SQLOperation


getHeaderText

public java.lang.String getHeaderText(ExecutingContext ec)
Returns instruction header text

Overrides:
getHeaderText in class Row
Returns:
String header text

getInnerResultsJsp

public java.lang.String getInnerResultsJsp()
Returns the JSP which should be used to display the RowCollection data. Typcially, this JSP is included inside of the results JSP. The default JSP is suitable in most cases, however subclasses can provide a custom JSP.


getInsertRow

public Row getInsertRow(SQLContext context,
                        ExecutingContext ec)
                 throws CMException
Gets the row to use for an insert (if this is an insert operation). Normally this is done by the HTTPOperationManager, but if you want your subclass can return a row for insert from this method instead

Throws:
CMException

getInstructions

public java.lang.String getInstructions()
Gets the instructions for this operation. If the instructions are dynamic, then the parameter markers will be replaced by their values

Overrides:
getInstructions in class Operation

getNewContextInternal

protected IOperationContext getNewContextInternal(Field field,
                                                  Row row,
                                                  ExecutingContext ec)
                                           throws CMException
Description copied from class: Operation
Gets a new IOperationContext for this operation. Subclasses should return the proper context.

Overrides:
getNewContextInternal in class Operation
Throws:
CMException

getNewSQLOperationContext

public ApplicationSQLContext getNewSQLOperationContext()
                                                throws CMException
Creates and returns a new SQLContext to perform this SQLOperation's query. Note that this is different than the {Row#getSQLContext() getSQLContext()} method which returns the SQLContext that was used to retrieve this SQLOperation

Throws:
CMException

getNewSQLOperationContext

public ApplicationSQLContext getNewSQLOperationContext(Field field,
                                                       Row row,
                                                       ExecutingContext ec)
                                                throws CMException
Creates and returns a new SQLContext to perform this SQLOperation's query. Note that this is different than the {Row#getSQLContext() getSQLContext()} method which returns the SQLContext that was used to retrieve this SQLOperation

Throws:
CMException

getOperationSQL

public java.lang.String getOperationSQL()
Gets this SQLOperation's SQL


getParametersJspFile

public java.lang.String getParametersJspFile()
Gets the JSP used to query the user for this SQLOperation's parameters

Overrides:
getParametersJspFile in class Operation

getPerformanceStatisticsId

public int getPerformanceStatisticsId()
Gets the perfomrance statistics ID of this SQLOperation


getReportBreakCollection

public ReportBreakCollection getReportBreakCollection()
                                               throws DataEngineException
Gets the ReportBreakCollection associated with this SQLOperation (may be null)

Throws:
DataEngineException

getSecuredTypeId

public int getSecuredTypeId()
Gets the id of the secured type.

Specified by:
getSecuredTypeId in interface IGuarded
Overrides:
getSecuredTypeId in class Row

getSecuredTypeName

public java.lang.String getSecuredTypeName()
Gets the secured type name of the secured object.

Specified by:
getSecuredTypeName in interface IGuarded
Overrides:
getSecuredTypeName in class Row

getSetName

public java.lang.String getSetName()
Gets the name of the set to which this SQLOperation belongs


getThemeId

public int getThemeId()
Gets the theme ID of this SQLOperation


getTranslatedLabel

public java.lang.String getTranslatedLabel(UserProperties up)
Gets the label for this SQLOperation after translation


getTranslatedTitle

public java.lang.String getTranslatedTitle(UserProperties up)
Gets the title for this SQLOperation after translation. If there is no title, the translated label is returned.


isCallStatement

public boolean isCallStatement()
Check if the the SQL for this SQL begins with "CALL "


isDeleteStatement

public boolean isDeleteStatement()
                          throws CMException
Tests if this operation is a delete statement.

Throws:
CMException

isFieldApplicable

public boolean isFieldApplicable(Field fld,
                                 ExecutingContext ec)
                          throws CMException
Tests if a field is applicable in the current scenario

Overrides:
isFieldApplicable in class Row
Parameters:
fld - The field which may or may not be applicable
Throws:
CMException

isInsertStatement

public boolean isInsertStatement()
                          throws CMException
Tests whether or not rows can be inserted into the results of this SQLOperation

Throws:
CMException

isRowCollectionOperation

public boolean isRowCollectionOperation()
Check to see if this SQLOperation will result in a RowCollection


isSelectStatement

public boolean isSelectStatement()
Check to see if this SQLOperation is a select


isSQLParameterized

public boolean isSQLParameterized()
Deprecated. - no longer used

Tests if this SQLOperation's SQL is parameterized and thus requires user input before it can be run


isUpdateStatement

public boolean isUpdateStatement()
                          throws CMException
Tests if this operation is an update statement.

Throws:
CMException

isUserPromptingRequired

public boolean isUserPromptingRequired()
                                throws CMException
Does the user need to be prompted for input. Subclasses should override if they need it.

Overrides:
isUserPromptingRequired in class Operation
Throws:
CMException

preExecute

public AbstractContext preExecute(AbstractContext ac)
                           throws CMException
This method is invoked just before a context is executed. It is a last chance for an operation to alter or replace the context to be executed. ***NOTE: We will probably want to promote this method up to the Operation class eventually, which is why I have it returning an AbstractContext, even though it really can only return an SQLContext

Returns:
The context which should be executed
Throws:
CMException

postExecute

public java.lang.Object postExecute(java.lang.Object result,
                                    AbstractContext ac)
                             throws CMException
This method is invoked just after a context is executed. It is a first chance for an operation to alter or replace the results of the executed context ***NOTE: We will probably want to promote this method up to the Operation class eventually, which is why the context argument is an AbstractContext, even though it really can only be an SQLContext

Parameters:
result - The result of executing the context, possibly a RowCollection
Returns:
What the context should report as its result. By default this is the same result that was passed in
Throws:
CMException

setAllowDeletes

public void setAllowDeletes(boolean value)
                     throws CMException
Sets if rows in the results of this SQLOperation can be deleted (if this SQLOperation is a query)

Throws:
CMException

setAllowDetails

public void setAllowDetails(boolean value)
                     throws CMException
Sets whether or not the details of the results of this SQLOperation can be viewed (if this SQLOperation is a query)

Throws:
CMException

setAllowInserts

public void setAllowInserts(boolean value)
                     throws CMException
Sets if rows can be inserted into the results of this SQLOperation if this SQLOperation represents a query

Throws:
CMException

setAllowUpdates

public void setAllowUpdates(boolean value)
                     throws CMException
Sets if the results of this SQLOperation can be updated (if this SQLOperation is a query)

Throws:
CMException

setApplication

protected void setApplication(Application newApplication)
                       throws CMException
Sets the Application associated with this SQLOperation

Throws:
CMException

setApplicationId

public void setApplicationId(int id)
                      throws CMException
Set the ID of this SQLOperation's Application

Overrides:
setApplicationId in class Operation
Throws:
CMException

setAutoRunId

public void setAutoRunId(int value)
                  throws CMException
Sets this SQLOperation's auto run id

Throws:
CMException

setCacheLevel

public void setCacheLevel(int value)
                   throws CMException
Sets the caching level to use when retrieving this SQLOperation's row collection

Throws:
CMException

setConnectionAlias

public void setConnectionAlias(java.lang.String connAlias)
                        throws CMException
Sets the alias of the system where this SQLOperation's data is located. This may be different than the alias of the system where the SQLOperation table itself is located, which is returned by the getSystemAlias() method. If no connection alias has been specified for this SQLOperation, then the connection alias of this SQLOperation's application (if this SQLOperation has a application) is returned.

Overrides:
setConnectionAlias in class Operation
Throws:
CMException

setDescription

public void setDescription(java.lang.String value)
                    throws CMException
Sets this SQLOperation's description

Throws:
CMException

setDisplayOrder

public void setDisplayOrder(int value)
                     throws CMException
Sets this SQLOperation's display order. The display order determine how listings of SQLOperations are ordered

Throws:
CMException

setEncryptionId

public void setEncryptionId(int value)
                     throws CMException
Sets this SQLOperation's encryption id

Throws:
CMException

setInstructions

public void setInstructions(java.lang.String value)
                     throws CMException
Gets this SQLOperation's instructions

Throws:
CMException

setIsSQLParameterized

public void setIsSQLParameterized(boolean pUserPromptNeeded)
Deprecated. - no longer used

Sets if this SQLOperation's SQL is parameterized and thus requires user input before it can be run


setJspFile

public void setJspFile(java.lang.String newJspFile)
                throws CMException
Sets this SQLOperation's JSP file

Throws:
CMException

setLabel

public void setLabel(java.lang.String value)
              throws CMException
Sets this SQLOperation's label. The label is the text displayed on the link to the SQLOperation

Throws:
CMException

setOperationSetName

public void setOperationSetName(java.lang.String name)
                         throws CMException
Sets this SQLOperation's operation set name. The OperationSet determines how listings of SQLOperations are grouped.

Throws:
CMException

setOperationSQL

public void setOperationSQL(java.lang.String value)
                     throws CMException
Deprecated. replaced with setOperationCode

Sets this SQLOperation's SQL

Throws:
CMException

setOwnerId

public void setOwnerId(int value)
                throws CMException
Sets this SQLOperation's owner id

Overrides:
setOwnerId in class Operation
Throws:
CMException

setParametersJspFile

public void setParametersJspFile(java.lang.String newJspFile)
                          throws CMException
Sets the JSP used to query the user for this SQLOperation's parameters

Throws:
CMException

setPerformanceStatisticsId

public void setPerformanceStatisticsId(int value)
                                throws CMException
Sets this SQLOperation's performance statistics id

Throws:
CMException

setReportBreakCollection

protected void setReportBreakCollection(ReportBreakCollection pRBC)
Sets the ReportBreakCollection associated with this SQLOperation (may be null)


setRowPropertyGroupsInternal

protected void setRowPropertyGroupsInternal(PropertyGroupList propertyGroups)
                                     throws CMException
Sets the PropertyGroups associated with this PropertyRow. Invoking this method will not update the value of the property field

Overrides:
setRowPropertyGroupsInternal in class PropertyRow
Throws:
CMException

setSecurityId

public void setSecurityId(int value)
                   throws CMException
Sets this SQLOperation's security id

Throws:
CMException

setSetName

public void setSetName(java.lang.String value)
                throws CMException
Sets the name of the set to which this SQLOperation belongs

Throws:
CMException

setThemeId

public void setThemeId(int value)
                throws CMException
Sets this SQLOperation's auto theme id

Throws:
CMException

setTitle

public void setTitle(java.lang.String value)
              throws CMException
Sets this SQLOperation's title. If there is no title, the label is used as the title.

Throws:
CMException

setType

public void setType(int value)
             throws CMException
Sets this SQLOperation's type

Throws:
CMException

update

public int update(java.sql.Connection conn,
                  ExecutingContext ec)
           throws CMException
Description copied from class: Operation
Updates the database with the values in this Row. If concurrent alterations to the database prevent this row from being updated, a ConcurrentAlterationException is thrown.

Overrides:
update in class Operation
Parameters:
conn - The connection to use for the update
Returns:
The number of updated rows
Throws:
CMException

validate

public boolean validate(int operation,
                        java.security.Principal user)
                 throws CMException
Deprecated. on 4/15/2004. method no longer supported. use validate(ExecutingContext)

Description copied from class: Row
Validate this Row based on its configuration and field values. If the field values are valid, return true, if not return an exception that encapsulates the error.

Overrides:
validate in class Row
Parameters:
operation - i.e. Row.INSERT, Row.UPDATE, etc...
Returns:
boolean true if valid else and exception will be thrown
Throws:
CMException

validate

public boolean validate(ExecutingContext ec)
                 throws CMException
Validate this Row based on it's configuration and field values.

Overrides:
validate in class Operation
Parameters:
ec - current context in which application is executing
Returns:
true, if Row and Fields are valid; false otherwise.
Throws:
CMException