예제 #1
0
파일: UE2.java 프로젝트: jcmartin2889/Repo
  private void test() {
    // Have a bash...
    try {
      FunctionGenerator fg =
          new FunctionGenerator(
              "UE2",
              "EQ4 Test Service 2",
              "Test Service 2 - testing load, validate and update API generation",
              "com.bigbank.services",
              "com.bigbank.services.ui");
      fg.getFunction().addReservedFieldSet(Function.GY_FIELDSET, "Journal Details");

      fg.getFunction().setAllowedMaint(true);
      fg.getFunction().setAllowedDel(true);

      addPrimary(fg);
      addWorkFields(fg);

      addMappings(fg);
      // System Testing should test Batch External Input and Recovery
      // processing by applying as a service, not individual APIs
      fg.getFunction().setApplyDuringExtInput(true);
      fg.getFunction().setApplyDuringRecovery(true);

      // Write to DB
      // FunctionToolboxStub.writeToDB(unit, fg, true);
      System.out.println(fg.getService());

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
예제 #2
0
파일: UE2.java 프로젝트: jcmartin2889/Repo
  private void addMappings(FunctionGenerator fg) throws EQException {
    // Add mappings from the work fields to the Journal Header fields
    fg.addUpdateMapping("", "WORK_APP", "GY", "GYAPP");
    fg.addUpdateMapping("", "WORK_WHO", "GY", "GYWHO");
    fg.addUpdateMapping("", "WORK_SHN", "GY", "GYSHN");
    fg.addUpdateMapping("", "WORK_JREF", "GY", "GYJREF");
    fg.addUpdateMapping("", "WORK_IREF", "GY", "GYIREF");

    // Don't add update mapping;
    // fg.addUpdateMapping("", "WORK_MODE", "HCI", "MODE");
  }
예제 #3
0
파일: UE2.java 프로젝트: jcmartin2889/Repo
  private DisplayFieldSetWrapper addPrimary(FunctionGenerator fg) throws EQException {
    // add the record
    DisplayFieldSetWrapper fieldSetWrapper =
        fg.addFieldSet("PRIMARY", "Primary Input Field Set", "Primary Input Field Set Description");
    InputFieldSet inputFieldSet = fieldSetWrapper.getInputFieldSet();

    GAERecordDataModel gaeRecord = getGAERecord(GAERecordDataModel.TYPE_FIXED_INPUT_API, "HCI");
    inputFieldSet.addAPI(
        session,
        gaeRecord,
        "HCI",
        true,
        true,
        true,
        true,
        true,
        "",
        false,
        false,
        new RepeatingDetails(),
        false,
        "",
        null,
        "");

    return fieldSetWrapper;
  }
예제 #4
0
파일: UE2.java 프로젝트: jcmartin2889/Repo
  private void addWorkFields(FunctionGenerator fg) {
    // These are for mapping to the journal header fields
    FunctionToolbox.addWorkField(
        fg.getFunction(), "WORK_APP", "Journal Application Code", "", "A", "2", "");
    FunctionToolbox.addWorkField(
        fg.getFunction(), "WORK_WHO", "Journal WHO field", "", "A", "15", "");
    FunctionToolbox.addWorkField(
        fg.getFunction(), "WORK_SHN", "Journal short name", "", "A", "15", "");
    FunctionToolbox.addWorkField(
        fg.getFunction(), "WORK_JREF", "Journal reference", "", "A", "17", "");
    FunctionToolbox.addWorkField(
        fg.getFunction(), "WORK_IREF", "Journal Input reference", "", "A", "16", "");

    // No need to explicitly control API mode now.
    // FunctionToolbox.addWorkField(fg.getFunction(), "WORK_MODE", "Mode for HCI Update", "", "A",
    // "1", "");
  }
예제 #5
0
파일: MCX.java 프로젝트: jcmartin2889/Repo
 private void addUpdateAPI(FunctionGenerator fg) throws EQException {
   // note: getLoadAPIFieldSet it is used for input transaction.
   // note: getPVFieldSet it is used for validate module.
   // note: getEnquiryFieldSet it is used for enquire.
   // note: getTableFieldSet it is used for data base table.
   APIFieldSet apiFieldSet =
       FunctionToolbox.getAPIFieldSet(
           session, "LID", "MCD", "G01M", "Maintain Customer Details", "M");
   fg.addUpdateAPIFieldSet(apiFieldSet);
 }
예제 #6
0
파일: MCX.java 프로젝트: jcmartin2889/Repo
  private void addLoadAPI(FunctionGenerator fg) throws EQException {

    // note: getLoadAPIFieldSet it is used for input transaction.
    // note: getPVFieldSet it is used for validate module.
    // note: getEnquiryFieldSet it is used for enquire.
    // note: getTableFieldSet it is used for data base table.

    APIFieldSet apiFieldSet =
        FunctionToolbox.getLoadAPIFieldSet(
            session, "LID", "MCD", "G01M", "GZG011", "Maintain Customer Details", "M", true);
    fg.addLoadAPIFieldSet("REC1", apiFieldSet);

    // PV
    // PVFieldSet pvFieldSet = FunctionToolbox.getPVFieldSet(session, "GFR70R", "", false, "N",
    // MappingToolbox
    // .getFullLoadFieldSetPath("REC1", "LID"));
    // fg.setLoadPVFieldSet("REC1", pvFieldSet);
  }
예제 #7
0
파일: MCX.java 프로젝트: jcmartin2889/Repo
  private DisplayFieldSetWrapper addRecord1(FunctionGenerator fg) throws EQException {
    // input filed
    DisplayFieldSetWrapper fieldSetWrapper =
        fg.addFieldSet("PRIMARY", "Record 1 of MCX", "Description 1 of MCX");
    InputFieldSet inputFieldSet = fieldSetWrapper.getInputFieldSet();
    DisplayAttributesSet attributeSet = fieldSetWrapper.getDisplayAttributesSet();

    // input field
    InputField inputField;
    DisplayAttributes displayAttributes;

    // add all the fields in this section ---------------------------------------

    // Customer mnemonic
    inputField =
        FunctionToolbox.getInputField(
            "CUS", "Customer", "This is the customer mnemonic", "A", "6", "");
    inputField.setMandatory(InputField.MANDATORY_YES);
    inputField.setKey(true);
    displayAttributes = FunctionToolbox.getInputFieldAttribute(inputField);
    displayAttributes.setPrompt("JVR01R");
    FunctionToolbox.addInputField(inputFieldSet, inputField);
    FunctionToolbox.addDisplayAttributes(attributeSet, displayAttributes);

    // Customer location
    inputField =
        FunctionToolbox.getInputField(
            "CLC", "Customer location", "This is the customer location", "A", "3", "");
    inputField.setMandatory(InputField.MANDATORY_YES);
    inputField.setKey(true);
    displayAttributes = FunctionToolbox.getInputFieldAttribute(inputField);
    displayAttributes.setPrompt("GFR70R");
    displayAttributes.setKeepWithPrevious(true);
    FunctionToolbox.addInputField(inputFieldSet, inputField);
    FunctionToolbox.addDisplayAttributes(attributeSet, displayAttributes);
    FunctionToolbox.addPVFieldSet(
        inputField, FunctionToolbox.getPVFieldSet(session, "GFR70R", "", false, ""));

    // Customer full name
    inputField =
        FunctionToolbox.getInputField(
            "FNAME", "Customer full name", "This is the Customer full name", "A", "35", "");
    inputField.setMandatory(InputField.MANDATORY_YES);
    displayAttributes = FunctionToolbox.getInputFieldAttribute(inputField);
    FunctionToolbox.addInputField(inputFieldSet, inputField);
    FunctionToolbox.addDisplayAttributes(attributeSet, displayAttributes);

    // Customer short name
    inputField =
        FunctionToolbox.getInputField(
            "SNAME", "Customer short name", "This is the Customer short name", "A", "35", "");
    inputField.setMandatory(InputField.MANDATORY_YES);
    displayAttributes = FunctionToolbox.getInputFieldAttribute(inputField);
    FunctionToolbox.addInputField(inputFieldSet, inputField);
    FunctionToolbox.addDisplayAttributes(attributeSet, displayAttributes);

    // Customer branch
    inputField =
        FunctionToolbox.getInputField(
            "BRNM", "Default branch", "This is the default branch", "A", "4", "");
    inputField.setMandatory(InputField.MANDATORY_YES);
    displayAttributes = FunctionToolbox.getInputFieldAttribute(inputField);
    FunctionToolbox.addInputField(inputFieldSet, inputField);
    FunctionToolbox.addDisplayAttributes(attributeSet, displayAttributes);
    FunctionToolbox.addPVFieldSet(
        inputField, FunctionToolbox.getPVFieldSet(session, "CAR73R", "", false, ""));

    return fieldSetWrapper;
  }
예제 #8
0
파일: MCX.java 프로젝트: jcmartin2889/Repo
  private void addMappings(FunctionGenerator fg) throws EQException {
    // add validate mapping
    fg.addValidateMappingToPV("REC1", "CUS", "REC1", "CLC", "GFR70R", "$GFCUS");
    fg.addValidateMappingToPV("REC1", "CLC", "REC1", "CLC", "GFR70R", "$GFCLC");
    fg.addValidateMappingFromPV(
        "REC1", "CLC", "GFR70R", "$GFCUS", "REC1", "CUS", MappingToolbox.TYPE_PRIMITIVE);
    fg.addValidateMappingFromPV(
        "REC1", "CLC", "GFR70R", "$GFCLC", "REC1", "CLC", MappingToolbox.TYPE_PRIMITIVE);
    fg.addValidateMappingFromPV(
        "REC1", "CLC", "GFR70R", "$GFCUN", "REC1", "CUS", MappingToolbox.TYPE_OUTPUT);

    // add update mapping
    fg.addUpdateMapping("REC1", "CUS", "LID", "GZCUS");
    fg.addUpdateMapping("REC1", "CLC", "LID", "GZCLC");
    fg.addUpdateMapping("REC1", "FNAME", "LID", "GZCUN");
    fg.addUpdateMapping("REC1", "SNAME", "LID", "GZDAS");
    fg.addUpdateMapping("REC1", "BRNM", "LID", "GZBRNM");

    // add load PV
    fg.addLoadMappingToPVLoad("REC1", "CUS", "REC1", "GFR70R", "$GFCUS");
    fg.addLoadMappingToPVLoad("REC1", "CLC", "REC1", "GFR70R", "$GFCLC");

    // add load mapping
    fg.addLoadMappingToLoad("REC1", "CUS", "REC1", "LID", "GZCUS");
    fg.addLoadMappingToLoad("REC1", "CLC", "REC1", "LID", "GZCLC");
    fg.addLoadMappingFromLoad("REC1", "LID", "GZCUS", "REC1", "CUS", MappingToolbox.TYPE_PRIMITIVE);
    fg.addLoadMappingFromLoad("REC1", "LID", "GZCLC", "REC1", "CLC", MappingToolbox.TYPE_PRIMITIVE);
    fg.addLoadMappingFromLoad(
        "REC1", "LID", "GZCUN", "REC1", "FNAME", MappingToolbox.TYPE_PRIMITIVE);
    fg.addLoadMappingFromLoad(
        "REC1", "LID", "GZDAS", "REC1", "SNAME", MappingToolbox.TYPE_PRIMITIVE);
    fg.addLoadMappingFromLoad(
        "REC1", "LID", "GZBRNM", "REC1", "BRNM", MappingToolbox.TYPE_PRIMITIVE);
  }