Using Code Templates in BOPF Implementation Classes

Context

A code template helps the developer to write the code faster and in consistent way. The Business Object Processing Framework generates code templates in the Implementation class for entities such as Actions, Validations, Determinations and Queries.

Code template appears on a new line within the Execute method of an Implementation class.

Code templates are generated for operations such as Retrieve, Retrieve by Association, Update, Create, Delete and Action. The table below lists the description for each code template operation:

Operation Description
Retrieve This operation retrieves the node data based on the business object and node information that you provide.
Retrieve By Association This operation retrieves the node data based on the source node, target node, and association information that you provide.
Update This operation updates a node instance based on the business object and node information that you provide.
Create This operation creates a node instance based on the business object, node information that you provide.
Delete This operation deletes a node instance based on the business object and node information that you provide.
Action This operation executes an action based on the business object, node name, and action information that you provide.
Prerequisite

You are in the source code editor of an implementation class.

Procedure

  1. Place the mouse pointer on a new line within the method endmethod area.
  2. Press CTRL + SPACEBAR.

    The code template dialog appears and displays the operations boRetrieve, boRetrieveByAssociation, boUpdate, boCreate, boDelete, and boAction.

  3. Double-click an operation to view the Code Template wizard.
  4. To generate code for the operation, enter relevant details.
  5. Choose Finish.