blob: 3b193e9da9e295c531ef3d2c6b4d75d92d1596a5 [file]
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
// This file automatically generated by:
// Apache Etch 1.1.0-incubating (LOCAL-0) / go 1.1.0-incubating (LOCAL-0)
// Thu Nov 18 15:39:28 CET 2010
// This file is automatically created and should not be edited!
package org_apache_etch_examples_helloworld
import "etch"
import "reflect"
type ValueFactoryHelloWorld struct
{
etch.ValueFactory
_mf_id *etch.Field
_mf_name *etch.Field
_mf_mes *etch.Field
_mf_to_whom *etch.Field
_mf_x *etch.Field
_mf_ints *etch.Field
_mf_users *etch.Field
}
type dummyVal struct{}
func (dv *dummyVal) Validate(value interface{}) bool {
return true
}
func (dv *dummyVal) ValidateValue(value interface{}) interface{} {
return value
}
func NewArray_mt_org_apache_etch_examples_helloworld_HelloWorld_user (length int32) interface{} {
return make([]*User, length)
}
func NewArray_mt_org_apache_etch_examples_helloworld_HelloWorld_UserUnknownException (length int32) interface{} {
return make([]*UserUnknownException, length)
}
func NewValueFactoryHelloWorld() *ValueFactoryHelloWorld {
ret := &ValueFactoryHelloWorld{etch.NewDefaultValueFactory(), nil,nil,nil,nil,nil,nil,nil}
_mt_org_apache_etch_examples_helloworld_HelloWorld_user := etch.NewTypeByName("org.apache.etch.examples.helloworld.HelloWorld.user")
ret.AddType(_mt_org_apache_etch_examples_helloworld_HelloWorld_user)
_mt_org_apache_etch_examples_helloworld_HelloWorld_UserUnknownException := etch.NewTypeByName("org.apache.etch.examples.helloworld.HelloWorld.UserUnknownException")
ret.AddType(_mt_org_apache_etch_examples_helloworld_HelloWorld_UserUnknownException)
_mt_org_apache_etch_examples_helloworld_HelloWorld_say_hello := etch.NewTypeByName("org.apache.etch.examples.helloworld.HelloWorld.say_hello")
ret.AddType(_mt_org_apache_etch_examples_helloworld_HelloWorld_say_hello)
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_say_hello := etch.NewTypeByName("org.apache.etch.examples.helloworld.HelloWorld._result_say_hello")
ret.AddType(_mt_org_apache_etch_examples_helloworld_HelloWorld__result_say_hello)
_mt_org_apache_etch_examples_helloworld_HelloWorld_f := etch.NewTypeByName("org.apache.etch.examples.helloworld.HelloWorld.f")
ret.AddType(_mt_org_apache_etch_examples_helloworld_HelloWorld_f)
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_f := etch.NewTypeByName("org.apache.etch.examples.helloworld.HelloWorld._result_f")
ret.AddType(_mt_org_apache_etch_examples_helloworld_HelloWorld__result_f)
_mt_org_apache_etch_examples_helloworld_HelloWorld_oneway := etch.NewTypeByName("org.apache.etch.examples.helloworld.HelloWorld.oneway")
ret.AddType(_mt_org_apache_etch_examples_helloworld_HelloWorld_oneway)
_mt_org_apache_etch_examples_helloworld_HelloWorld_twoway := etch.NewTypeByName("org.apache.etch.examples.helloworld.HelloWorld.twoway")
ret.AddType(_mt_org_apache_etch_examples_helloworld_HelloWorld_twoway)
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_twoway := etch.NewTypeByName("org.apache.etch.examples.helloworld.HelloWorld._result_twoway")
ret.AddType(_mt_org_apache_etch_examples_helloworld_HelloWorld__result_twoway)
_mt_org_apache_etch_examples_helloworld_HelloWorld_simpleArrayTest := etch.NewTypeByName("org.apache.etch.examples.helloworld.HelloWorld.simpleArrayTest")
ret.AddType(_mt_org_apache_etch_examples_helloworld_HelloWorld_simpleArrayTest)
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_simpleArrayTest := etch.NewTypeByName("org.apache.etch.examples.helloworld.HelloWorld._result_simpleArrayTest")
ret.AddType(_mt_org_apache_etch_examples_helloworld_HelloWorld__result_simpleArrayTest)
_mt_org_apache_etch_examples_helloworld_HelloWorld_structArrayTest := etch.NewTypeByName("org.apache.etch.examples.helloworld.HelloWorld.structArrayTest")
ret.AddType(_mt_org_apache_etch_examples_helloworld_HelloWorld_structArrayTest)
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_structArrayTest := etch.NewTypeByName("org.apache.etch.examples.helloworld.HelloWorld._result_structArrayTest")
ret.AddType(_mt_org_apache_etch_examples_helloworld_HelloWorld__result_structArrayTest)
_mt_org_apache_etch_examples_helloworld_HelloWorld_user.NewArray = NewArray_mt_org_apache_etch_examples_helloworld_HelloWorld_user
_mt_org_apache_etch_examples_helloworld_HelloWorld_UserUnknownException.NewArray = NewArray_mt_org_apache_etch_examples_helloworld_HelloWorld_UserUnknownException
ret._mf_id = etch.NewField("id")
ret.AddField(ret._mf_id)
ret._mf_name = etch.NewField("name")
ret.AddField(ret._mf_name)
ret._mf_mes = etch.NewField("mes")
ret.AddField(ret._mf_mes)
ret._mf_to_whom = etch.NewField("to_whom")
ret.AddField(ret._mf_to_whom)
ret._mf_x = etch.NewField("x")
ret.AddField(ret._mf_x)
ret._mf_ints = etch.NewField("ints")
ret.AddField(ret._mf_ints)
ret._mf_users = etch.NewField("users")
ret.AddField(ret._mf_users)
_mt_org_apache_etch_examples_helloworld_HelloWorld_say_hello.AsyncMode = etch.QUEUED;
_mt_org_apache_etch_examples_helloworld_HelloWorld_f.AsyncMode = etch.MODE_NONE ;
_mt_org_apache_etch_examples_helloworld_HelloWorld_oneway.AsyncMode = etch.MODE_NONE ;
_mt_org_apache_etch_examples_helloworld_HelloWorld_twoway.AsyncMode = etch.MODE_NONE ;
_mt_org_apache_etch_examples_helloworld_HelloWorld_simpleArrayTest.AsyncMode = etch.MODE_NONE ;
_mt_org_apache_etch_examples_helloworld_HelloWorld_structArrayTest.AsyncMode = etch.MODE_NONE ;
// params for List
// params for Map
// params for Set
// params for Datetime
// params for user
_mt_org_apache_etch_examples_helloworld_HelloWorld_user.PutValidator(ret._mf_id, new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld_user.PutValidator(ret._mf_name, new(dummyVal))
// params for UserUnknownException
_mt_org_apache_etch_examples_helloworld_HelloWorld_UserUnknownException.PutValidator(ret._mf_mes, new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_say_hello.ResponseField = ret.GetDefaultResponseField() ;
_mt_org_apache_etch_examples_helloworld_HelloWorld_say_hello.RType = _mt_org_apache_etch_examples_helloworld_HelloWorld__result_say_hello
// params for say_hello
_mt_org_apache_etch_examples_helloworld_HelloWorld_say_hello.PutValidator(ret._mf_to_whom, new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld_say_hello.PutValidator(ret.GetDefaultMessageIdField(), new(dummyVal))
// params for _result_say_hello
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_say_hello.PutValidator(ret.GetDefaultMessageIdField(), new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_say_hello.PutValidator(ret.GetDefaultInReplyToField(), new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_say_hello.PutValidator(ret.GetDefaultResponseField(), new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_f.ResponseField = ret.GetDefaultResponseField() ;
_mt_org_apache_etch_examples_helloworld_HelloWorld_f.RType = _mt_org_apache_etch_examples_helloworld_HelloWorld__result_f
// params for f
_mt_org_apache_etch_examples_helloworld_HelloWorld_f.PutValidator(ret._mf_x, new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld_f.PutValidator(ret.GetDefaultMessageIdField(), new(dummyVal))
// params for _result_f
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_f.PutValidator(ret.GetDefaultMessageIdField(), new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_f.PutValidator(ret.GetDefaultInReplyToField(), new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_f.PutValidator(ret.GetDefaultResponseField(), new(dummyVal))
// params for oneway
_mt_org_apache_etch_examples_helloworld_HelloWorld_oneway.PutValidator(ret.GetDefaultMessageIdField(), new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_twoway.ResponseField = ret.GetDefaultResponseField() ;
_mt_org_apache_etch_examples_helloworld_HelloWorld_twoway.RType = _mt_org_apache_etch_examples_helloworld_HelloWorld__result_twoway
// params for twoway
_mt_org_apache_etch_examples_helloworld_HelloWorld_twoway.PutValidator(ret.GetDefaultMessageIdField(), new(dummyVal))
// params for _result_twoway
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_twoway.PutValidator(ret.GetDefaultMessageIdField(), new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_twoway.PutValidator(ret.GetDefaultInReplyToField(), new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_twoway.PutValidator(ret.GetDefaultResponseField(), new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_simpleArrayTest.ResponseField = ret.GetDefaultResponseField() ;
_mt_org_apache_etch_examples_helloworld_HelloWorld_simpleArrayTest.RType = _mt_org_apache_etch_examples_helloworld_HelloWorld__result_simpleArrayTest
// params for simpleArrayTest
_mt_org_apache_etch_examples_helloworld_HelloWorld_simpleArrayTest.PutValidator(ret._mf_ints, new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld_simpleArrayTest.PutValidator(ret.GetDefaultMessageIdField(), new(dummyVal))
// params for _result_simpleArrayTest
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_simpleArrayTest.PutValidator(ret.GetDefaultMessageIdField(), new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_simpleArrayTest.PutValidator(ret.GetDefaultInReplyToField(), new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_simpleArrayTest.PutValidator(ret.GetDefaultResponseField(), new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_structArrayTest.ResponseField = ret.GetDefaultResponseField() ;
_mt_org_apache_etch_examples_helloworld_HelloWorld_structArrayTest.RType = _mt_org_apache_etch_examples_helloworld_HelloWorld__result_structArrayTest
// params for structArrayTest
_mt_org_apache_etch_examples_helloworld_HelloWorld_structArrayTest.PutValidator(ret._mf_users, new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld_structArrayTest.PutValidator(ret.GetDefaultMessageIdField(), new(dummyVal))
// params for _result_structArrayTest
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_structArrayTest.PutValidator(ret.GetDefaultMessageIdField(), new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_structArrayTest.PutValidator(ret.GetDefaultInReplyToField(), new(dummyVal))
_mt_org_apache_etch_examples_helloworld_HelloWorld__result_structArrayTest.PutValidator(ret.GetDefaultResponseField(), new(dummyVal))
(*ret.GetClass2type())[reflect.TypeOf(new(User))] = _mt_org_apache_etch_examples_helloworld_HelloWorld_user
_mt_org_apache_etch_examples_helloworld_HelloWorld_user.Helper = new(_mt_org_apache_etch_examples_helloworld_HelloWorld_userImportExportHelper)
(*ret.GetClass2type())[reflect.TypeOf(new(UserUnknownException))] = _mt_org_apache_etch_examples_helloworld_HelloWorld_UserUnknownException
_mt_org_apache_etch_examples_helloworld_HelloWorld_UserUnknownException.Helper = new(_mt_org_apache_etch_examples_helloworld_HelloWorld_UserUnknownExceptionImportExportHelper)
return ret
}
type _mt_org_apache_etch_examples_helloworld_HelloWorld_userImportExportHelper struct {
}
func (h *_mt_org_apache_etch_examples_helloworld_HelloWorld_userImportExportHelper) ExportValue(ty *etch.Type, vf etch.ValueFactory, value interface{}) *etch.StructValue {
sv := etch.NewStructValue( vf.GetTypeByName("org.apache.etch.examples.helloworld.HelloWorld.user"), vf, 0 )
v := value.(*User)
sv.Put( vf.GetFieldByName("id"), v.Id )
sv.Put( vf.GetFieldByName("name"), v.Name )
return sv;
}
func (h *_mt_org_apache_etch_examples_helloworld_HelloWorld_userImportExportHelper) ImportValue(str *etch.StructValue) interface{} {
v := new(User)
v.Id = etch.Toint32(str.Fields[str.Vf.GetFieldByName("id")])
v.Name = str.Fields[str.Vf.GetFieldByName("name")].(string)
return v
}
type _mt_org_apache_etch_examples_helloworld_HelloWorld_UserUnknownExceptionImportExportHelper struct {
}
func (h *_mt_org_apache_etch_examples_helloworld_HelloWorld_UserUnknownExceptionImportExportHelper) ExportValue(ty *etch.Type, vf etch.ValueFactory, value interface{}) *etch.StructValue {
sv := etch.NewStructValue( vf.GetTypeByName("org.apache.etch.examples.helloworld.HelloWorld.UserUnknownException"), vf, 0 )
v := value.(*UserUnknownException)
sv.Put( vf.GetFieldByName("mes"), v.Mes )
return sv;
}
func (h *_mt_org_apache_etch_examples_helloworld_HelloWorld_UserUnknownExceptionImportExportHelper) ImportValue(str *etch.StructValue) interface{} {
v := new(UserUnknownException)
v.Mes = str.Fields[str.Vf.GetFieldByName("mes")].(string)
return v
}