106 lines
4.2 KiB
C#
106 lines
4.2 KiB
C#
/*
|
|
* Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved.
|
|
*
|
|
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
|
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
|
* without the written permission of iTAC Software AG.
|
|
*/
|
|
// created 05.11.2018 14:52:23
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using com.itac.oib.siplacepro.contracts.types;
|
|
|
|
namespace com.itac.oib.siplacepro.contracts.data
|
|
{
|
|
// source: assembly 5.1.0.84
|
|
// source: assembly ASM.AS.OIB.SIPLACEPro.Proxy
|
|
public class TableInsertMapper
|
|
{
|
|
// used for itac->asm: True
|
|
// used for asm->itac: True
|
|
|
|
// maps iTAC namespace conform type to ASM namespace type
|
|
public static Asm.As.Oib.SiplacePro.Proxy.Business.Objects.TableInsert get(TableInsert itacTableInsert)
|
|
{
|
|
if (itacTableInsert == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.TableInsert asmTableInsert = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.TableInsert();
|
|
mapItac2Asm(asmTableInsert, itacTableInsert);
|
|
return asmTableInsert;
|
|
}
|
|
|
|
public static void mapItac2Asm(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.TableInsert asmTableInsert, TableInsert itacTableInsert)
|
|
{
|
|
// complex property TableInsertType, isArray:False, isGeneric:False
|
|
itacTableInsert.TableInsertType = com.itac.oib.siplacepro.contracts.types.TableInsertTypeIdMapper.get( asmTableInsert.TableInsertType);
|
|
// complex property Table, isArray:False, isGeneric:False
|
|
itacTableInsert.Table = com.itac.oib.siplacepro.contracts.data.TableMapper.get( asmTableInsert.Table);
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static Asm.As.Oib.SiplacePro.Proxy.Business.Objects.TableInsert[] get(TableInsert[] itacTableInsert)
|
|
{
|
|
if (itacTableInsert == null) { return null; }
|
|
Asm.As.Oib.SiplacePro.Proxy.Business.Objects.TableInsert[] asmTableInsert = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.TableInsert[itacTableInsert.Length];
|
|
for (int i = 0; i < itacTableInsert.Length; i++)
|
|
{
|
|
// to itac array
|
|
asmTableInsert[i] = TableInsertMapper.get(itacTableInsert[i]);
|
|
}
|
|
return asmTableInsert;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.TableInsert> getList(TableInsert[] asmTableInsert)
|
|
{
|
|
if (asmTableInsert == null) { return null; }
|
|
List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.TableInsert> itacTableInsert = new List<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.TableInsert>();
|
|
for (int i = 0; i < asmTableInsert.Length; i++)
|
|
{
|
|
itacTableInsert.Add(TableInsertMapper.get(asmTableInsert[i]));
|
|
}
|
|
return itacTableInsert;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static TableInsert get(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.TableInsert asmTableInsert)
|
|
{
|
|
if (asmTableInsert == null) { return null; }
|
|
TableInsert itacTableInsert = new TableInsert();
|
|
mapAsm2Itac(asmTableInsert, itacTableInsert);
|
|
return itacTableInsert;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.TableInsert asmTableInsert, TableInsert itacTableInsert)
|
|
{
|
|
itacTableInsert.TableInsertType = com.itac.oib.siplacepro.contracts.types.TableInsertTypeIdMapper.get(asmTableInsert.TableInsertType);
|
|
// complex asm property TableInsertType
|
|
itacTableInsert.Table = com.itac.oib.siplacepro.contracts.data.TableMapper.get(asmTableInsert.Table);
|
|
// complex asm property Table
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static TableInsert[] getArray(IList<Asm.As.Oib.SiplacePro.Proxy.Business.Objects.TableInsert> asmTableInsert)
|
|
{
|
|
if (asmTableInsert == null) { return null; }
|
|
TableInsert[] itacTableInsert = new TableInsert[asmTableInsert.Count];
|
|
for (int i = 0; i < asmTableInsert.Count; i++)
|
|
{
|
|
itacTableInsert[i] = TableInsertMapper.get(asmTableInsert[i]);
|
|
}
|
|
return itacTableInsert;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static TableInsert[] getArray(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.TableInsert[] asmTableInsert)
|
|
{
|
|
if (asmTableInsert == null) { return null; }
|
|
TableInsert[] itacTableInsert = new TableInsert[asmTableInsert.Length];
|
|
for (int i = 0; i < asmTableInsert.Length; i++)
|
|
{
|
|
itacTableInsert[i] = TableInsertMapper.get(asmTableInsert[i]);
|
|
}
|
|
return itacTableInsert;
|
|
}
|
|
}
|
|
}
|