Creating the Data Control Class

This section describes how to create the AddressBookDC.java class.

  1. In the Projects panel located on the left of the screen, right-click the Model project, select New, and then select From Gallery.

  2. On the New Gallery form, select Java from the Categories panel, and then select Class in the Items panel.

  3. On the Create Java Class form, enter the following information:

    • Name: AddressBookRecord

    • Package: com.oracle.e1.E01012.formservicetypes

  4. Click the OK button to create the Java class.

  5. Add the following fields to AddressBookRecord.java:

        private String addressNumber;
        private String alphaName;
        private String mailingName;
        private String address;
        private String city;
        private String state;
        private String zipCode;
        private String taxId;
        private String businessUnit;
        private String searchType;
    
  6. Add the following method to AddressBookRecord.java:

        public void clear()
        {
            addressNumber = "";
            alphaName = "";
            mailingName = "";
            address = "";
            city = "";
            state = "";
            zipCode = "";
            taxId = "";
            businessUnit = "";
            searchType = "";
        }
    
  7. Right-click within the cass and select Generate Accessors... from context menu.

  8. Select all methods and click OK button.

  9. Save changes to AddressBookRecord.java.

  10. In the Projects panel located on the left of the screen, right-click the Model project, select New, and then select Java Class.

  11. On the Create Java Class form, enter the following information:

    Name: AddressBookDC

    Package: com.oracle.e1.E01012.model

  12. Click the OK button to create the Java class.

  13. Add the following fields to AddressBookDC.java:

        private P01012_W01012B_FormParent addressBook = new P01012_W01012B_FormParent();
        private P01012_W01012B_GridRow selectedAddressBook = new P01012_W01012B_GridRow();
        private AddressBookRecord addressBookDetail = new AddressBookRecord();
        private String selectedAddressNumber = "";
        
        // Processing Options
        private String p01012Version = "";
        private String hideTax = "";
        private String displaySupplierMaster = "";
        private String displayCustomerMaster = "";
        private String searchTypeDefault = "";
        private String displayCSMS = "";
        private String p0100041Version = "";
        private String selfServiceMode = "";
        private String typeCode = "";
        private String postalCodeValidate = "";
        private String postalAddressRetrieval = "";
        private String p03013Version = "";
        private String p04012Version = "";
    
  14. Right-click within the class and select Generate Accessors... from context menu.

  15. Select all methods and click OK button

  16. Save changes to AddressBookDC.java.