Class SY_ConversionDriver_bus

Properties

LOCAL cMainTable$="SY_ConversionDriver"  

[String] Contains the table to maintain, used to open table in SY_Service

LOCAL cIsSysDB=isTRUE  
[Boolean] Indicates whether cMainTable$ is found in the system data base (MAS_SYSTEM) or not. Set to true for SY_ConversionDriver
LOCAL cLineIncr=100000000  
[Integer] Integer indicating amount to increment the ExecutionOrder$ variable by each time a new record is written for the current Version$+Module$ combination
LOCAL cVersionSegLen=2  
[Integer] Dictionary Length of each segment in the version, currently hard-coded. To match format of 00.00.00.00
PROPERTY DefaultVersion$   * Read Only *
[String] Contains the current default version from the SY_System table, for use in the UI as a default
PROPERTY ValidColumn   * Read Only *
[Boolean] Indicates whether current ColumnName$ was found in the dictionary
PROPERTY ValidTable   * Read Only *
[Boolean] Indicates whether current TableName$ was found in the dictionary

Methods

FUNCTION ClearSetFiles()  

Override of the ClearSetFiles() in SY_MaintSet class. This is overridden to create the mirror memory table with the filtered data. See cSortFH

Returns [integer]
ValueDescription
retSUCCESS (1) If memory files for use in set mode, and the mirror memory table for this class created correctly.
retFAILURE (0) If files not created properly.
FUNCTION CommitRow()  

Override of CommitRow() in the SY_MaintSet class. This is overridden to renumber the execution order of the filtered data for the Sage developer code only.

Returns [boolean] returns the value from the CommitRow() in SY_MaintSet
FUNCTION Delete(key$)  

Override of the Delete() in SY_Maint class. This is overridden to remove record from the mirror memory table, as well as to properly put the deleted record into the cDeleteFH for use with cancelling. This was necessary because of being filtered on a different index.

ParameterDescription
key$ [input, string] The key to the table that is being deleted.
Returns [boolean]
ValueDescription
retSUCCESS(1) If record was removed from all sources properly.
retFAILURE(0) If record was not removed properly.
FUNCTION FindTable(vers$, cnvType$, table$, tableCount, tableFirstRow, tableLastRow, tableLastKey$)  

This method will find if the table sent in is already being converted for this version+conversion combination. If so, will send back the number of records for the table, the first and last row, and the key value for the last row. To be used when adding or inserting new records.

ParameterDescription
vers$ [input, string] Filters the records by version passed into function. Will look for the table within this filtered selection.
cnvType$ [input, string] Filters the reocrds by conversion type passed into the function. Will look for the table within this filtered selection.
table$ [input, string] Table name to look for within the filtered selection.
tableCount [output, integer] Number of occurences of the table found within the filtered selection of conversion records.
tableFirstRow [output, integer] The row number of the first occurence of the table in the conversion records. If table not found will return 0.
tableLastRow [output, integer] The row number of the the last occurence of the table in the conversion records. If table not found will return 0.
tableLastKey$ [output, string] The key for the last occurence of the table in the conversion records. If table not found will return NULL
Returns [boolean]
ValueDescription
isTRUE (1) If table was found within the filtered selection.
isFALSE (0) If table was not found within the filtered selection..
FUNCTION GetBrowseFilter(browseDir$, filterRec$, filterCols$)  

This function will return the variables and filter values to browse to the next set of records based on the browse direction and the current position in the physical table. This function only will work if the business object is in "SET" mode.

ParameterDescription
browseDir$ [input, string] Direction to browse.
filterRec$ [output, string] Contains the record values to be used for the filtering in a SEP ($8A$) separated list.
filterCols$ [output, string] Contains the columns that correspond to the record values in a comma-delimited list.
Returns [boolean]
ValueDescription
"NEXT","BT_NEXT" to browse to the next set of records
"PREV","BT_PREV" to browse to the previous set of records
"FIRST","BT_FIRST" to browse to the first set of records
"LAST","BT_LAST" to browse to the last set of records
retFAILURE(0) If currently at the end of file (in the direction requested). No values will be returned in filterRec$ and filterCols$.
retSUCCESS(1) If new filter values are returned in filterRec$, filterCols$
FUNCTION GetNextConversionID(nextID$)  

Function to return the value of the nextID$ number based on Version, ConversionType, and TableName. This function will fail if the aforementioned columns are not populated. This function reads the physical table and if an existing record is found the ConversionID variable will be incremented by 1 and returned

ParameterDescription
nextID$ [output, string] Will be returned as a zero-filled numeric or NULL if an error occurred.
Returns [boolean]
ValueDescription
FAILURE if one of the following is NULL. Version, ConversionType, and TableName.
SUCCESS if the function was able to set nextID$
FUNCTION GetNextExecutionSeq(nextSeq$)  
FUNCTION GetNextExecutionSeq(nextSeq$, insertBefore$)  

Function to return the value of the nextSeq$ number based on Version, ModuleCode, ModuleConversionOrder, and ConversionType. This function will fail if the aforementioned columns are not populated. This function reads the physical table and if an existing record is found the ExecutionOrder variable will be incremented by the amount of cLineIncr

ParameterDescription
nextSeq$ [output, string] Will be returned as a zero-filled numeric or NULL if an error occurred.
insertBefore${optional} [input, string] If inserting a record before another record pass in the execution order of the record you wish to insert in front of in this argument.
Returns [boolean]
ValueDescription
FAILURE if one of the following is NULL. Version, Module, ModuleConversionOrder or ConversionType.
SUCCESS if the function was able to set nextseq$
FUNCTION ResequenceLine(keyToMove$, newSeq$, newKey$)  

Will re-write the row specificed in the keyToMove$ with the given newSeq$ and return the new key value. This is used from the BT_MoveUp/Down functions in MD_ConversionDriver_ui class.

ParameterDescription
keyToMove$ [input, string] The current key value of the row to be resequenced.
newSeq$ [input, string] The fully formatted new execution order to be substituted into the above key.
newKey$ [output, string] A fully formatted key value of the new key after the resequencing has taken place.
Returns [boolean]
ValueDescription
retFAILURE (0) If currently not in "SET" mode or if the line could not be properly re-written with new sequence.
retSUCCESS (1) If the line was successfully rewritten with the given new execution order.
FUNCTION ResetRow(key$)  

This function will recall the data from the physical table for the given key. This totally overrides the base class function in SY_Maint as it needs to protect the line sequencing in the ExecutionOrder variable. If the record does not exist in the physical table it will be removed from the working table, as it does in line entry.

ParameterDescription
key$ [input, string] The key to the record to reset. All data except the ExecutionOrder will be recalled from the physical table.
Returns [boolean] Always returns retSUCCESS (1)
FUNCTION SetNewSequences(insertBefore$)  

Function is to set the values of ExecutionOrder and ConversionID for new records. If a value is given in the insertBefore$ arguement, locate an execution order prior to the execution order passed in. This will do SetValue() on both the ExecutionOrder$ and ConversionID$

ParameterDescription
insertBefore$ [input, string] Pass in populated value of an execution order to insert a value in front of. This argument will be populated when inserting records between other records, and will be empty when adding new records to the end of the file.
Returns [boolean]
ValueDescription
retSUCCESS (1) If the value being set into both the ExecutionOrder and ConversionID fields succeeds.
retFAILURE (0) If the either ExecutionOrder or ConversionID fails their respective validations.
FUNCTION Write()  

Function is overridden from the original found in SY_Maint, to add the ability to set DateUpdated,TimeUpdated,WorkstationUpdated,DateCreated,TimeCreated and WorkstationCreated. The date and time fields would normally be populated, but that is dependent on a UserKey.

Returns [Integer] Returns the value from the Write() method call to the base class.

Properties inherited from: SY_ConversionConstant

cnvtagCOLDROP$, cnvtagIDXDROP$, cnvtagSETDEFAULT$, cnvtagSETINVALID$, cnvtagSETVALUE$, cnvtagTBLCOPY$, cnvtagTBLUPDATE$, cnvtagTBLDROP$, cnvtagRECDROP$, cnvtypDATA$, cnvtypDICTIONARY$, cnvtypREMOVEDATA$, cnvtypINFORMATION$, vertokenSYSTEM$, vertokenPAYROLL$, devcodeSAGE$, versionSELECTLENGTH

Properties inherited from: SY_Maint

cActionWrite, cActionDelete, cActivityLogFilePrefix$, DocDateWarnDisplayed, DocDateWarnStatus, EditState, RecordChanged, FirstFailure$, DocumentTotal, ReadOnlyReason$, UDTValidation$, ViewOnly, CurrentPrecision, DocDateWarnForceOff, DocDateWarnObject, ScriptObject, ImportTest

Properties inherited from: SY_MaintSet

FileChanged

Methods inherited from: CI_DeveloperCode_val

ClassValidateDeveloperCode()

Methods inherited from: CI_ModuleCode_val

ClassValidateModuleCode()

Methods inherited from: SY_ConversionConstant

GetValidCnvTags$(), GetValidCnvTypes$(), FormatVersion$(), GetConstantValues(), IsPvxToSQLConversion(), IsPvxToSQLTable()

Methods inherited from: SY_Maint

ChangedRecordCompare(), ChangedRecordInfo(), Clear(), ClearRecord(), ConfirmDelete(), CopyFrom(), ExportToCSV(), GetColumnInfo(), GetColumnProperties$(), GetDefaults(), GetOrigRecord$(), GetPropertyValue(), GetValidationGroups$(), ResetDocDateWarnState(), SetCopyKeyValue(), SetDocDateWarnDisplayed(), SetDocDateWarnOff(), SetKey(), SetKeyValue(), SetPartialRecord(), SetRecord(), SetToReadOnly(), SetValue(), SetValues(), Write(), ActivityLogCreateFile(), ActivityLogPrepare(), ActivityLogSetMessage$(), ActivityLogWrite(), CallScript(), CheckForAdvancedFieldSettings(), CheckForScripts(), CheckNullRequiredField(), PERFORM ChildValidate(), ClassValidateDate(), ClassValidateTelephoneNo(), ClearSetFiles(), ColInfoInitAll(), ColInfoInitDefaults(), CommitRow(), GetPropertyCommon(), InitColInfo(), InitScriptEngine(), InitWorkTable(), IsColInIOList(), IsValid(), LoadColInfo(), OpenMainTable(), ParseExtField(), RemoveColToSkip(), ResetRow(), RetrieveColInfo(), SetDefaults(), SetFilter(), SetMode(), SetParentHandle(), SetValueNoValidate(), StoreColToSkip(), ValidateAll(), ValidateAllRecord(), ValidateColInfo(), ValidateRule()

Methods inherited from: SY_MaintSet

ClearSetFiles(), CommitRow(), QuickRowLoad(), ResetRow(), SeedDetailRow(), SetFilter(), SetMode()