Qorus Integration Engine®  4.0.3.p2_git
OMQ::InboundTableMapperType Class Reference

system mapper class for prividing TableMapper::InboundTableMapper objects at runtime More...

Inheritance diagram for OMQ::InboundTableMapperType:
OMQ::AbstractMapperType

Public Member Methods

string getName ()
 returns "InboundTableMapper", the name of the primary mapper class (must be unique in the mapper type list)
 
bool requiresInput ()
 mapper definition must include the input record description
 
bool requiresOutput ()
 mapper definition does not have to include the output record description; the output record description is provided by the table
 
hash getMapperOptions ()
 returns a hash of valid mapper options; the keys are the option names and the values are string descriptions for the options
 
*list getRequiredRecordOptions ()
 returns a list of mapper options that must be given to create the input or output records for the mapper for mappers that can create either input records (ie requiresInput() is False) and/or output records (ie requiresOutput() is False); these options must also be present in the getMapperOptions() output
 
Mapper::Mapper get (hash mapv, *hash opts)
 returns a TableMapper::InboundTableMapper object
 
Qore::AbstractIterator getIterator (Qore::AbstractIterator input, hash mapv, *hash opts)
 must return a iterator object given the input iterator that maps the input data to output in the iterator using the current Mapper
 
hash getOutput (string mname, hash opth)
 returns the output record from the table
 
- Public Member Methods inherited from OMQ::AbstractMapperType
*hash getRuntimeMapperOptions ()
 returns a hash of valid runtime mapper options; the keys are the option names and the values are string descriptions for the options
 
Qore::AbstractIterator getIterator (Qore::AbstractIterator input, hash mapv, *hash opts)
 must return a iterator object given the input iterator that maps the input data to output in the iterator using the current Mapper
 
*list getRequiredOptions ()
 returns a list of mapper options that must be given to create the mapper (these options must also be present in the getMapperOptions() output); by default this method returns getRequiredRecordOptions() + "input" (if requiresInput() returns False) + "output" (if requiresOutput() returns False)
 
hash< auto > getConfigInfo ()
 returns a hash of configuration info for the mapper type
 
hash< auto > getInput (string mname, hash< auto > opth)
 called for mapper providers that automatically define the input record
 
hash< auto > getOutput (string mname, hash< auto > opth)
 called for mapper providers that automatically define the output record
 
bool isValid ()
 whether the mapper is valid, i.e. eligible for parsing and other "regular" actions
 

Detailed Description

system mapper class for prividing TableMapper::InboundTableMapper objects at runtime

requires the following mapper options:

  • "datasource": a string giving the Qorus datasource name for the target table
  • "table": a string giving the target table name in the datasource

The input option is required, but this class automatically provides a definition for the output option based on the target table description, so no output option should be given with mappers of this type

Example:

# name: my-example-table-mapper
# version: 1.0
# desc: Example table mapper for documentation
# type: InboundTableMapper
# author: Joesephine Programmer (Qore Technologies, s.r.o.)
# functions: my-mapper-lib
# parse-options: PO_NEW_STYLE
# define-group: Example: Example interface objects
# groups: Example
OPTION: datasource: "omquser"
OPTION: table: "example_table"
OPTION: input: (
"order_id": "unique order ID",
#...
)

The documentation for this class was generated from the following file: