Sample Code of an Application Class Implementation
The following is an example of an application class implementation.
import EOCF_CLF_DL:Runtime:AccessMethods:*;
import EOCF_CLF_DL:Runtime:Resolution:*;
import EOCF_CLF_DL:Contexts:*;
import EOCF_CLF_DL:Runtime:Results:*;
class CaseRecordInformation
method CaseRecordInformation(&_oAccessMethod As EOCF_CLF_DL:Runtime:
Access Methods:AccessMethod);
method GetResultRecord();
private
instance EOCF_CLF_DL:Runtime:AccessMethods:AccessMethod &ioAccessMethod;
end-class;
method CaseRecordInformation
/+ &_oAccessMethod as EOCF_CLF_DL:Runtime:AccessMethods:AccessMethod +/
&ioAccessMethod = &_oAccessMethod;
end-method;
method GetResultRecord
Local Record &result;
Local number &nResolved_value, &nCaseID;
Local string &sBusUnit;
/* Retrieving the implementation bind using the API */
&nCaseID = &ioAccessMethod.getBindValueByName("CASE_ID");
SQLExec("SELECT BUSINESS_UNIT FROM PS_RC_CASE WHERE CASE_ID = :1",
&nCaseID, &s BusUnit);
&result = CreateRecord(Record.RC_CASE);
&result.CASE_ID.Value = &nCaseID;
&result.BUSINESS_UNIT.Value = &sBusUnit;
&result.SelectByKey();
/* Passing the values (in this case, it is a record) back to the data
library engine - this record could be used to resolve multiple terms */
&ioAccessMethod.Results = (create EOCF_CLF_DL:Runtime:Results:
ResultsRecord (&result));
end-method;