Package pl.decerto.hyperon.runtime.core
Class HyperonSubContext
java.lang.Object
org.smartparam.engine.core.context.DefaultContext
pl.decerto.hyperon.runtime.core.HyperonContext
pl.decerto.hyperon.runtime.core.HyperonSubContext
- All Implemented Interfaces:
ParamContext
- Direct Known Subclasses:
Adapter
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:
-
Field Summary
Fields inherited from class pl.decerto.hyperon.runtime.core.HyperonContext
SKIP_PARENT -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class pl.decerto.hyperon.runtime.core.HyperonContext
get, getBoolean, getBooleanHolder, getBooleanType, getDate, getDateHolder, getDatetime, getDatetimeHolder, getDatetimeType, getDateType, getDecimal, getFirst, getInteger, getIntegerHolder, getIntegerType, getLocalDate, getLocalDateHolder, getLocalDatetime, getLocalDatetimeHolder, getLocalDateTimeType, getLocalDateType, getNumber, getNumberHolder, getNumberType, getString, getStringHolder, getStringType, initialize, toStringMethods inherited from class org.smartparam.engine.core.context.DefaultContext
adhoc, get, get, getLevelValues, getUserContext, initialize, modifyKey, set, setLevelValues, with, with, withLevelValues, withLevelValues
-
Constructor Details
-
HyperonSubContext
Deprecated.
-
-
Method Details
-
set
Deprecated.Description copied from class:HyperonContextPut given value object under specified path.- Overrides:
setin classHyperonContext- Parameters:
path- where object will be storedvalue- any object- Returns:
- the same context instance with stored value under the path
- See Also:
-
getNull
Deprecated.returns null representation for current context- Overrides:
getNullin classHyperonContext- Returns:
HyperonContext.SKIP_PARENT
-
HigsonSubContext