Class HyperonSubContext

All Implemented Interfaces:
ParamContext
Direct Known Subclasses:
Adapter

@Deprecated public class HyperonSubContext extends HyperonContext
Deprecated.

Class to be used as Higson sub-context.

Example:
context structure:

  # root
  policy      : Policy
  risk        : PolicyRisk

  # Policy
  rcd         : date
  risks       : PolicyRisk*  (collection)

  # PolicyRisk
  code        : string
  premium     : number
  status      : string
    
        
Example usage in higson function:

  ...
  for (risk in ctx.get('policy.risks')) {
      //risk is a context anchored in current PolicyRisk object
      def code = risk.getString('code')

      // parameter 'par.risk.rate' has now access to different risk object on each call (not to the one that is put in the root
      // of context structure).
      def rate = hyperon.getNumber('par.risk.rate', ctx, 'risk', r)
      ...
  }
  
  
Author:
przemek hertel
See Also: