Skip to content
Model centric tools for Spring development Community portal
Skyway PerspectivesModel driven delivery

Model reference

Reference Figure: Operation Inputs and Outputs

Every operation declares its inputs and outputs. This figure shows the tab where those declarations are made and how they reach the generated method.

Diagram of the model view controller pattern with a request moving from the browser to the controller, service and data layers
Figure 19. Declared inputs and outputs become method parameters and a return type.

An operation is only useful when its inputs and outputs are declared. The inputs and outputs tab records the parameter names, their types and the single return type. Generation reads those declarations directly, so a clear signature in the model produces a clear signature in Java.

Declaring inputs

  • Name. Use the same name as the model attribute it carries.
  • Type. Choose a model type or a simple type such as text, number or date.
  • Required flag. Mark inputs that must be present.
  • Direction. Input, output or both for values that flow in and out.

Declaring outputs

An operation returns one type. When a method needs to return more than one value, define a small result type rather than adding several output parameters. A named result type reads better in the generated code and in the views that consume it.

Keep signatures stable. Renaming an input changes the generated method and every caller. Rename in the model, regenerate, and let the compiler show the callers that need attention.

The tab also shows a preview of the generated method signature. Use it to confirm that the declaration reads the way you expect before you run generation.