Anyframe Web

anyframe.web.springmvc.util.ria.mip
Class MiPMapper

java.lang.Object
  extended by anyframe.web.springmvc.util.ria.mip.MiPMapper

public class MiPMapper
extends java.lang.Object

The Util class needed at UI development using the Tobesoft's MiPlatform

The MiPlatform's data trasmitting object are Dataset and VariableList. So, it is different from the VO object used in Java. When transmitting the user inputted value by VO in Server Side, there needs a conversion of Data for transmitting the value to the presentation layer again.


Consists of the method helping converting the data such as Dataset, VariableList and VO for MiPMapper.

Author:
Byunghun Woo

Constructor Summary
MiPMapper()
           
 
Method Summary
static java.util.Collection populate(java.lang.Class voClazz, com.tobesoft.platform.data.Dataset dataList)
          Map the VO the value of Dataset The populate method is different from populateCudList in that all Data record without relation to stauts maps to VO and returns Collection.
static java.util.Collection populate(java.lang.Class voClazz, com.tobesoft.platform.data.Dataset dataList, boolean converToCamelCase)
          Map VO the Dataset's value The populate method is different from populateCudList in that all Data record without relation to stauts maps to VO and returns Collection.
static void populate(com.tobesoft.platform.data.Dataset dataList, java.util.List voList)
          Maps to Dataset the List consisting of the Value Object
static void populate(com.tobesoft.platform.data.Dataset dataList, java.util.List voList, boolean isCheck)
           This method converts Value Object(VO) List into Dataset(MiPlatform).
static void populate(com.tobesoft.platform.data.Dataset dataList, java.lang.Object vo)
          Maps to Dataset the VO
static void populate(com.tobesoft.platform.data.Dataset dataList, java.lang.Object vo, boolean isCheck)
          Maps Dataset the VO In the case the Dataset's Check Column is needed, then we set isCheck to true
static void populate(java.lang.Object vo, com.tobesoft.platform.data.VariableList variableList)
          Execute the data bind of VariableList and VO class.
static void populate(java.lang.Object vo, com.tobesoft.platform.data.VariableList variableList, boolean converToCamelCase)
          Execute the data bind of VariableList and VO.
static void populate(com.tobesoft.platform.data.VariableList variableList, java.lang.Object vo)
          Maps the VO to VariaableList
static java.util.HashMap populateCudList(java.lang.Class voClazz, com.tobesoft.platform.data.Dataset dataList)
          The Dataset consists of many records.
static java.util.HashMap populateCudList(java.lang.Class voClazz, com.tobesoft.platform.data.Dataset dataList, boolean converToCamelCase)
          The Dataset consists of many records and each record has status such as insert, update and delete. populateCuList method returns by saving in the HashMap with the key values such as insert, update and delete after mapping in the ArryList consiting of VO according to the record's status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiPMapper

public MiPMapper()
Method Detail

populate

public static void populate(java.lang.Object vo,
                            com.tobesoft.platform.data.VariableList variableList)
Execute the data bind of VariableList and VO class.

Parameters:
vo - Sever Side VO
variableList - MiPlatform VariableList

populate

public static void populate(java.lang.Object vo,
                            com.tobesoft.platform.data.VariableList variableList,
                            boolean converToCamelCase)
Execute the data bind of VariableList and VO. The VO's attribute name is of CameCase. And, the VariableList's Attribute Name includes underscore('_'). Then, we can set the converToCamelCase option as true and the data bind occurs.

Parameters:
vo - Server Side VO
variableList - MiPlatform VariableList
converToCamelCase - When changing to CamelCase the VariableList' Attribute Name, then true.

populate

public static java.util.Collection populate(java.lang.Class voClazz,
                                            com.tobesoft.platform.data.Dataset dataList)
                                     throws java.lang.InstantiationException,
                                            java.lang.IllegalAccessException
Map the VO the value of Dataset The populate method is different from populateCudList in that all Data record without relation to stauts maps to VO and returns Collection.

Parameters:
voClazz - Server Side VO
dataList - MiPlatform Dataset
Returns:
Collection consisting of VO
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException

populate

public static java.util.Collection populate(java.lang.Class voClazz,
                                            com.tobesoft.platform.data.Dataset dataList,
                                            boolean converToCamelCase)
                                     throws java.lang.InstantiationException,
                                            java.lang.IllegalAccessException
Map VO the Dataset's value The populate method is different from populateCudList in that all Data record without relation to stauts maps to VO and returns Collection. If the Dataset's Column Name includes the Underscore('_'), and if the convertToCamelCase value is true, then maps to VO as changed to CamelCase

Parameters:
voClazz - Sever Side VO
dataList - MiPlatform Dataset
converToCamelCase - If mapping by changing to CamcelCase the Dataset's column name, then true
Returns:
The collection consisting of VO
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException

populateCudList

public static java.util.HashMap populateCudList(java.lang.Class voClazz,
                                                com.tobesoft.platform.data.Dataset dataList)
                                         throws java.lang.InstantiationException,
                                                java.lang.IllegalAccessException
The Dataset consists of many records. Each record has the status such as insert, update and delete. populatedCudList method maps by dividing in ArryList consisting of VO with respect to the status of the Record. Afterwards, with key values such as insert, update, and delete, we return by saving in the HashMap.

Parameters:
voClazz - Server Side VO
dataList - MiPlatform Dataset
Returns:
java.util.HashMap, HashMap의 key값은 insert, update, delete
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException

populateCudList

public static java.util.HashMap populateCudList(java.lang.Class voClazz,
                                                com.tobesoft.platform.data.Dataset dataList,
                                                boolean converToCamelCase)
                                         throws java.lang.InstantiationException,
                                                java.lang.IllegalAccessException
The Dataset consists of many records and each record has status such as insert, update and delete. populateCuList method returns by saving in the HashMap with the key values such as insert, update and delete after mapping in the ArryList consiting of VO according to the record's status. When the dataset's column name includes Underscore('_'), and VO's attribute name is CamelCase, then we set convertToCamelCase to true and the mapping occurs.

Parameters:
voClazz - Server Side VO
dataList - MiPlatform Dataset
converToCamelCase - If mapping by changing to CamelCast the Dataset's Column Name, then true.
Returns:
java.util.HashMap, HashMap's key value are insert, update and delete
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException

populate

public static void populate(com.tobesoft.platform.data.VariableList variableList,
                            java.lang.Object vo)
                     throws java.lang.IllegalAccessException,
                            java.lang.reflect.InvocationTargetException,
                            java.lang.NoSuchMethodException
Maps the VO to VariaableList

Parameters:
variableList - MiPlatform variableList
vo - Sever Side VO
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException

populate

public static void populate(com.tobesoft.platform.data.Dataset dataList,
                            java.lang.Object vo)
                     throws java.lang.IllegalAccessException,
                            java.lang.reflect.InvocationTargetException,
                            java.lang.NoSuchMethodException
Maps to Dataset the VO

Parameters:
dataList - MiPlatform Dataset
vo - Server Side VO
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException

populate

public static void populate(com.tobesoft.platform.data.Dataset dataList,
                            java.lang.Object vo,
                            boolean isCheck)
                     throws java.lang.IllegalAccessException,
                            java.lang.reflect.InvocationTargetException,
                            java.lang.NoSuchMethodException
Maps Dataset the VO In the case the Dataset's Check Column is needed, then we set isCheck to true

Parameters:
dataList - MiPlatform Dataset
vo - Server Side VO
isCheck - when check column is needed, then true
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException

populate

public static void populate(com.tobesoft.platform.data.Dataset dataList,
                            java.util.List voList)
                     throws java.lang.IllegalAccessException,
                            java.lang.reflect.InvocationTargetException,
                            java.lang.NoSuchMethodException
Maps to Dataset the List consisting of the Value Object

Parameters:
dataList - MiPlatform Dataset
voList - List consisting of Value Object
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException

populate

public static void populate(com.tobesoft.platform.data.Dataset dataList,
                            java.util.List voList,
                            boolean isCheck)
                     throws java.lang.IllegalAccessException,
                            java.lang.reflect.InvocationTargetException,
                            java.lang.NoSuchMethodException

This method converts Value Object(VO) List into Dataset(MiPlatform).

Parameters:
dataList - MiPlatform Dataset
voList - List consisting of Value Object
-
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException

Anyframe Web

Copyright © 2008-2009 Samsung SDS. All Rights Reserved.