Symphony Framework
Symphony TableMapping v3 2
Symphony Templates > Symphony TableMapping v3 2
Template file name Symphony_TableMapping_v3_2.tpl

The Symphony_TableMapping (version 3.2) template provides the ability to create a class/method to map between the table name and the physical ISAM file name and is used with the Symphony Harmony framework.

It is recommended that your generated code from the Symphony_TableMapping template is created into a project sub-folder called Data
 CodeGen Template Tokens
Token Comments
NAMESPACE Define the namespace within which the generated class will be placed (-n option).
 Symphony Tokens

Symphony tokens are applied to fields in the repository in the Long Description.  They allow for additional field processing by CodeGen.  You must define both the token and value, enclosed within <> brackets.  For example <SYMPHONY_MAX_DISPLAY_LENGTH=100>

You can define any number of Symphony tokens in the long description.  There is no separation character required.


There are no Symphony Tokens applicable for this template.
       
 CodeGen Command Examples
Table mapping
codegen e -r -s * -ms -t Symphony_TableMapper_v3_2.tpl -o "%ROOT%ExampleData_Server\Data" -n ExampleData.Data
 Example
;;****************************************************************************
;; WARNING: This code was code generated. Any changes that you
;;          make to this code will be overwritten if the code is regenerated!
;;
;; Template author: Richard C. Morris, RCP Consultants
;;
;; Template Name:   Symphony Framework : SYMPHONY_TABLEMAPPER_V3_2.tpl
;;
;;***************************************************************************
import System
import System.Collections.Generic
import System.Text

;;ControlLibrary.Data.TableMapper.MapTableToFile

namespace ControlLibrary.Data

    public class TableMapper
    
        public method MapTableToFile    ,string
            in req tableName            ,string
            endparams
        proc
            using tableName + " " select
            ("GROUP "),
                mreturn "SYMPHONYDATA:groups.ism"
            ("ORDER_HEADER "),
                mreturn "SYMPHONYDATA:orders.ism"
            ("ORDER_LINE "),
                mreturn "SYMPHONYDATA:lines.ism"
            ("PART "),
                mreturn "SYMPHONYDATA:parts.ism"
            ("SUPPLIER "),
                mreturn "SYMPHONYDATA:suppliers.ism"
            (),
                mreturn ""
            endusing
        endmethod
        
    endclass

endnamespace