Package com.warrantchange.model

Examples of com.warrantchange.model.WarrantUserEmailLogClp


    return oldModel;
  }

  public static Object translateInputWarrantUserEmailLog(
    BaseModel<?> oldModel) {
    WarrantUserEmailLogClp oldCplModel = (WarrantUserEmailLogClp)oldModel;

    Thread currentThread = Thread.currentThread();

    ClassLoader contextClassLoader = currentThread.getContextClassLoader();

    try {
      currentThread.setContextClassLoader(_classLoader);

      try {
        Class<?> newModelClass = Class.forName("com.warrantchange.model.impl.WarrantUserEmailLogImpl",
            true, _classLoader);

        Object newModel = newModelClass.newInstance();

        Method method0 = newModelClass.getMethod("setId",
            new Class[] { Long.TYPE });

        Long value0 = new Long(oldCplModel.getId());

        method0.invoke(newModel, value0);

        Method method1 = newModelClass.getMethod("setSubject",
            new Class[] { String.class });

        String value1 = oldCplModel.getSubject();

        method1.invoke(newModel, value1);

        Method method2 = newModelClass.getMethod("setBodyContent",
            new Class[] { String.class });

        String value2 = oldCplModel.getBodyContent();

        method2.invoke(newModel, value2);

        Method method3 = newModelClass.getMethod("setUserId",
            new Class[] { Long.TYPE });

        Long value3 = new Long(oldCplModel.getUserId());

        method3.invoke(newModel, value3);

        Method method4 = newModelClass.getMethod("setCreateDate",
            new Class[] { Date.class });

        Date value4 = oldCplModel.getCreateDate();

        method4.invoke(newModel, value4);

        Method method5 = newModelClass.getMethod("setModifiedDate",
            new Class[] { Date.class });

        Date value5 = oldCplModel.getModifiedDate();

        method5.invoke(newModel, value5);

        return newModel;
      }
View Full Code Here


    try {
      currentThread.setContextClassLoader(_classLoader);

      try {
        WarrantUserEmailLogClp newModel = new WarrantUserEmailLogClp();

        Class<?> oldModelClass = oldModel.getClass();

        Method method0 = oldModelClass.getMethod("getId");

        Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

        newModel.setId(value0);

        Method method1 = oldModelClass.getMethod("getSubject");

        String value1 = (String)method1.invoke(oldModel, (Object[])null);

        newModel.setSubject(value1);

        Method method2 = oldModelClass.getMethod("getBodyContent");

        String value2 = (String)method2.invoke(oldModel, (Object[])null);

        newModel.setBodyContent(value2);

        Method method3 = oldModelClass.getMethod("getUserId");

        Long value3 = (Long)method3.invoke(oldModel, (Object[])null);

        newModel.setUserId(value3);

        Method method4 = oldModelClass.getMethod("getCreateDate");

        Date value4 = (Date)method4.invoke(oldModel, (Object[])null);

        newModel.setCreateDate(value4);

        Method method5 = oldModelClass.getMethod("getModifiedDate");

        Date value5 = (Date)method5.invoke(oldModel, (Object[])null);

        newModel.setModifiedDate(value5);

        return newModel;
      }
      catch (Exception e) {
        _log.error(e, e);
View Full Code Here

TOP

Related Classes of com.warrantchange.model.WarrantUserEmailLogClp

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.