com.streambase.sb.operator.parameter

## Class SBPropertyDescriptor.SingleValueSetter

- java.lang.Object
- - com.streambase.sb.operator.parameter.SBPropertyDescriptor.Setter
  - - com.streambase.sb.operator.parameter.SBPropertyDescriptor.SingleValueSetter

- Enclosing class:
    SBPropertyDescriptor

      protected abstract static class SBPropertyDescriptor.SingleValueSetter
      extends SBPropertyDescriptor.Setter

  This abstract specialization of Setter assumes that the property type will have a single value (which currently accounts for all property types except string lists). It extracts the value of that parameter from the map and calls an abstract parse method on it.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SingleValueSetter()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Object[]` | `getArgs(SBPropertyDescriptor pd, Map<String,List<Object>> params, SchemaUtil.SchemaProvider schemaProvider)` Get the setter arguments for Method.invoke, consume the property values.
    `protected abstract Object[]` | `parseArgs(SBPropertyDescriptor pd, String val, SchemaUtil.SchemaProvider schemaProvider)` Parse the single argument value from a string into the array of parameters to pass to the setter method.

    - ### Methods inherited from class com.streambase.sb.operator.parameter.SBPropertyDescriptor.Setter

      `getSingleValue, getValue, getValues, set`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SingleValueSetter

          protected SingleValueSetter()

  - ### Method Detail

    - #### getArgs

          protected Object[] getArgs(SBPropertyDescriptor pd,
                                     Map<String,List<Object>> params,
                                     SchemaUtil.SchemaProvider schemaProvider)
                              throws TypecheckException

      Description copied from class: `SBPropertyDescriptor.Setter`
      Get the setter arguments for Method.invoke, consume the property values. Returns null to indicate that the setter should not be called (ie, if an optional parameter was omitted)
      Specified by:
        `getArgs` in class `SBPropertyDescriptor.Setter`
      Parameters:
        `pd` - property descriptor
        `params` - parameters
        `schemaProvider` - a schema provider
      Returns:
        null if the setter should not be called
      Throws:
        `TypecheckException` - on type check exception

    - #### parseArgs

          protected abstract Object[] parseArgs(SBPropertyDescriptor pd,
                                                String val,
                                                SchemaUtil.SchemaProvider schemaProvider)
                                         throws TypecheckException

      Parse the single argument value from a string into the array of parameters to pass to the setter method. This can return null to skip calling the setter.
      Parameters:
        `pd` - a property descriptor
        `val` - for the setter method
        `schemaProvider` - a schema provider
      Returns:
        null if the setter should not be called
      Throws:
        `TypecheckException` - on type check exception

Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.