Create the generic cost method implementation

Before you begin

Create the line-level interface

Procedure

  1. In Studio, navigate in configuration > gsrc to the gw.lob.line.financials package.
    For Golf Cart, navigate to gw.lob.go.financials.
  2. Right-click the financials node, and then select New > Gosu Class. In the New Gosu Class dialog box, enter the name of the interface.
    For Golf Cart, enter GenericGOCostMethodsImpl.
  3. In the new Gosu class, write a constructor for the generic cost method.
    For example, the following is code for a Golf Cart generic cost method constructor, GenericGOCostMethodsImpl:
    package gw.lob.go.financials
    
     class GenericGOCostMethodsImpl<T extends GOCost> implements GOCostMethods  {
      protected var _owner : T as readonly Cost
      construct(owner : T) {
         _owner = owner
      }
    }

    This code produces a Gosu error in the class statement that you fix in the next step.

  4. Place the insertion point at the error (after GOCostMethods) and press Alt-Enter. Click the ImplementMethods command that pops up to open the Select Methods to Implement dialog box. With all listed methods selected, click OK to insert the empty methods into your code.
  5. Write code for the new methods and properties. In most cases, the code for each method is a single line. Examine the transaction adapters for other lines of business as an example.
  6. At this point, you can verify your work. For instructions, see Verify your work.