591 lines
23 KiB
Plaintext
Executable File
591 lines
23 KiB
Plaintext
Executable File
package com.fp.common.helper;
|
|
|
|
/**
|
|
* Clase utilitaria para el manejo de objetos, ejemplo permite comparar dos objetos, obtener el valor de un atributo de un objeto, fijar el valor de un atributo de un objeto, entrega información de datos que fueron modificado en el objeto original.
|
|
*
|
|
* @author Jorge Vaca.
|
|
* @version 2.1
|
|
*/
|
|
|
|
import java.lang.reflect.Constructor;
|
|
import java.lang.reflect.Field;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
import java.lang.reflect.Method;
|
|
import java.math.BigDecimal;
|
|
import java.sql.Date;
|
|
import java.sql.Timestamp;
|
|
import java.text.ParseException;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.HashMap;
|
|
|
|
import com.fp.dto.AbstractDataTransport;
|
|
import com.fp.dto.hb.HibernateBean;
|
|
|
|
/**
|
|
* Clase utilitaria para el manejo de objetos.
|
|
*
|
|
* @author Jorge Vaca.
|
|
* @version 2.1
|
|
*/
|
|
public class BeanManager {
|
|
|
|
public static SimpleDateFormat getTransportDateFormat() {
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
return sdf;
|
|
}
|
|
|
|
/**
|
|
* Obtiene el Formateador para el Transporte de Timestamp
|
|
*
|
|
* @throws java.lang.Exception Error en la creaci�n del Formateador
|
|
* @return Formateador para el Transporte de Timestamp
|
|
*/
|
|
public static SimpleDateFormat getTransportDatetimeFormat() {
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
return sdf;
|
|
|
|
}
|
|
|
|
/**
|
|
* Obtiene el formateador de Timestamps para su transaporte en String
|
|
*
|
|
* @return Formtateador
|
|
* @throws Exception
|
|
*/
|
|
public static SimpleDateFormat getTransportTimestampFormat() {
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
|
return sdf;
|
|
}
|
|
|
|
/**
|
|
* Entrega el valor de un atributo perteneciente a un bean persistente.
|
|
*
|
|
* @param pObject Bean persistente.
|
|
* @param pName Nombre del atributo.
|
|
* @return
|
|
* @throws NoSuchMethodException
|
|
* @throws SecurityException
|
|
* @throws InvocationTargetException
|
|
* @throws IllegalAccessException
|
|
* @throws IllegalArgumentException
|
|
* @throws Exception
|
|
*/
|
|
public static Object getBeanAttributeValue(Object pObject, String pAttribute) throws Exception {
|
|
if (pAttribute.indexOf('.') > 0) {
|
|
String name = pAttribute.substring(0, pAttribute.indexOf('.'));
|
|
String subName = pAttribute.substring(pAttribute.indexOf('.') + 1);
|
|
name = name.substring(0, 1).toUpperCase() + name.substring(1);
|
|
Method m = null;
|
|
try {
|
|
m = pObject.getClass().getMethod("get" + name, new Class[] {});
|
|
} catch (Exception e) {
|
|
m = pObject.getClass().getMethod("is" + name, new Class[] {});
|
|
}
|
|
return BeanManager.getBeanAttributeValue(m.invoke(pObject, new Object[] {}), subName);
|
|
} else {
|
|
Method m = BeanManager.getBeanGetterMethod(pObject, pAttribute);
|
|
return m.invoke(pObject, new Object[] {});
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Fija el valro de un un atributo del bean, dado el bean, nombre del atributo y el valor.
|
|
*
|
|
* @param bean Objeto a fijar el valor.
|
|
* @param pAttribute Nombre del atributo a fijar el valor.
|
|
* @param pValue Valor a alamcenar en el atributo.
|
|
* @return Object
|
|
* @throws Exception
|
|
*/
|
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
|
public static Object setAbstractDataTransportAttributeValue(HibernateBean bean, String pAttribute, Object pValue) throws Exception {
|
|
try {
|
|
BeanManager.setBeanAttributeValue(bean, pAttribute, pValue);
|
|
} catch (IllegalArgumentException e) {
|
|
Class type = BeanManager.getBeanGetterMethod(bean, pAttribute).getReturnType();
|
|
pValue = BeanManager.convertObject(pValue, type);
|
|
try {
|
|
BeanManager.setBeanAttributeValue(bean, pAttribute, pValue);
|
|
} catch (NoSuchMethodException e2) {
|
|
((AbstractDataTransport) bean).put(pAttribute, pValue);
|
|
}
|
|
}
|
|
return bean;
|
|
}
|
|
|
|
/**
|
|
* Fija el valor de un atributo en un TransportBean.
|
|
*
|
|
* @param pObject Referencia a TransportBean.
|
|
* @param pAttribute Nombre del atributo a fijar el valor.
|
|
* @param pValue Valor a fijar en el atributo del bean.
|
|
* @return
|
|
* @throws NoSuchMethodException
|
|
* @throws SecurityException
|
|
* @throws InvocationTargetException
|
|
* @throws IllegalAccessException
|
|
* @throws IllegalArgumentException
|
|
* @throws Exception
|
|
*/
|
|
public static Object setBeanAttributeValue(Object pObject, String pAttribute, Object pValue) throws SecurityException, NoSuchMethodException,
|
|
IllegalArgumentException, IllegalAccessException, InvocationTargetException {
|
|
if (pAttribute.indexOf('.') > 0) {
|
|
String name = pAttribute.substring(0, pAttribute.indexOf('.'));
|
|
String subName = pAttribute.substring(pAttribute.indexOf('.') + 1);
|
|
name = name.substring(0, 1).toUpperCase() + name.substring(1);
|
|
Method m = pObject.getClass().getMethod("get" + name, new Class[] {});
|
|
return BeanManager.setBeanAttributeValue(m.invoke(pObject, new Object[] {}), subName, pValue);
|
|
} else {
|
|
Method m = BeanManager.getBeanSetterMethod(pObject, pAttribute, pValue);
|
|
return m.invoke(pObject, new Object[] { pValue });
|
|
}
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
public static <T> T convertObject(Object pValue, Class<T> pType) throws ParseException {
|
|
return BeanManager.convertObject(pValue, pType, false);
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
public static <T> T convertObject(Object pValue, Class<T> pType, boolean pUpper) throws ParseException {
|
|
Object value = pValue;
|
|
if (pType.getName().compareTo("java.lang.String") == 0 && pUpper) {
|
|
if (value != null) {
|
|
value = value.toString().toUpperCase();
|
|
}
|
|
}
|
|
try {
|
|
if (value == null || value.getClass().getName().compareTo(pType.getName()) == 0) {
|
|
return (T) value;
|
|
}
|
|
if (value != null) {
|
|
if (pType.getName().compareTo("java.lang.String") != 0 && pValue.toString().compareTo("") == 0) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
return pType.cast(value);
|
|
} catch (ClassCastException e) {
|
|
;
|
|
}
|
|
String sValue = value.toString();
|
|
Class[] param = { String.class };
|
|
try {
|
|
Constructor c = pType.getConstructor(param);
|
|
Object[] data = { sValue };
|
|
return (T) c.newInstance(data);
|
|
} catch (Exception e) {
|
|
// No hacer nada
|
|
}
|
|
if (pType.getName().compareTo(Timestamp.class.getName()) == 0) {
|
|
String val = sValue;
|
|
if (sValue.indexOf(".") < 0) {
|
|
sValue += ".0";
|
|
}
|
|
String d[] = sValue.split(" ");
|
|
if (d.length == 2) {
|
|
sValue = d[0] + " " + d[1].replaceAll("-", ":");
|
|
}
|
|
try {
|
|
return (T) new Timestamp(BeanManager.getTransportTimestampFormat().parse(sValue).getTime());
|
|
} catch (Exception e) {
|
|
return (T) new Timestamp(BeanManager.getTransportDateFormat().parse(val).getTime());
|
|
}
|
|
}
|
|
if (pType.getName().compareTo(Date.class.getName()) == 0) {
|
|
String d[] = sValue.split(" ");
|
|
if (d.length == 2) {
|
|
sValue = d[0];
|
|
}
|
|
return (T) new Date(BeanManager.getTransportDateFormat().parse(sValue).getTime());
|
|
}
|
|
/*
|
|
* if(pType.getName().compareTo(Clob.class.getName()) == 0){ ClobImpl clob = new ClobImpl(sValue); return clob;
|
|
* } if(pType.getName().compareTo(Blob.class.getName()) == 0){ BlobImpl blob = new BlobImpl(sValue.getBytes());
|
|
* return blob; }
|
|
*/
|
|
return (T) value;
|
|
}
|
|
|
|
/**
|
|
* Entrega el valor de un atributo para que sea comparable.
|
|
*
|
|
* @param pObject Bean de referencia.
|
|
* @param pAttribute Atributo a obtener el valor.
|
|
* @return
|
|
* @throws SecurityException
|
|
* @throws IllegalArgumentException
|
|
* @throws NoSuchMethodException
|
|
* @throws IllegalAccessException
|
|
* @throws InvocationTargetException
|
|
* @throws Exception
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
public static Comparable<Object> getBeanAttributeComparable(Object pObject, String pAttribute) throws SecurityException,
|
|
IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, Exception {
|
|
return (Comparable<Object>) BeanManager.getBeanAttributeValue(pObject, pAttribute);
|
|
}
|
|
|
|
/**
|
|
* Entrega el valor de un atributo perteneciente a un bean persistente.
|
|
*
|
|
* @param pObject Bean persistente.
|
|
* @param pName Nombre del atributo.
|
|
* @return
|
|
* @throws NoSuchMethodException
|
|
* @throws SecurityException
|
|
* @throws Exception
|
|
*/
|
|
public static Method getBeanGetterMethod(Object pObject, String pField) throws SecurityException, NoSuchMethodException, ClassNotFoundException,
|
|
IllegalAccessException, InstantiationException {
|
|
Method m = null;
|
|
if (pField.indexOf('.') > 0) {
|
|
m = BeanManager.getMethodpk(pObject, pField);
|
|
} else {
|
|
m = BeanManager.getMethodnormal(pObject, pField);
|
|
}
|
|
return m;
|
|
}
|
|
|
|
private static Method getMethodnormal(Object pObject, String pField) throws SecurityException, NoSuchMethodException {
|
|
pField = pField.substring(0, 1).toUpperCase() + pField.substring(1);
|
|
Method m = null;
|
|
try {
|
|
m = BeanManager.getMethod(pObject, "get" + pField, null);
|
|
} catch (Exception e) {
|
|
m = BeanManager.getMethod(pObject, "is" + pField, null);
|
|
}
|
|
return m;
|
|
}
|
|
|
|
private static Method getMethodpk(Object pObject, String pAttribute) throws SecurityException, NoSuchMethodException, ClassNotFoundException,
|
|
IllegalAccessException, InstantiationException {
|
|
Method m = null;
|
|
Object bean = null;
|
|
String classpk = "";
|
|
if (pAttribute.indexOf('.') > 0) {
|
|
String subName = pAttribute.substring(pAttribute.indexOf('.') + 1);
|
|
subName = subName.substring(0, 1).toUpperCase() + subName.substring(1);
|
|
classpk = pObject.getClass().getName() + "Key";
|
|
try {
|
|
bean = BeanManager.getBeanAttributeValue(pObject, "pk");
|
|
} catch (Exception e) {
|
|
// No hacer nada
|
|
}
|
|
if (bean == null) {
|
|
bean = Class.forName(classpk).newInstance();
|
|
}
|
|
try {
|
|
m = bean.getClass().getMethod("get" + subName, new Class[] {});
|
|
} catch (Exception e) {
|
|
m = bean.getClass().getMethod("is" + subName, new Class[] {});
|
|
}
|
|
}
|
|
return m;
|
|
}
|
|
|
|
private static Method getMethod(Object pObject, String pMethod, Object pValue) throws NoSuchMethodException {
|
|
Method[] m = pObject.getClass().getMethods();
|
|
Method method = null;
|
|
for (Method me : m) {
|
|
if (me.getName().compareTo(pMethod) == 0) {
|
|
method = me;
|
|
break;
|
|
}
|
|
}
|
|
if (method == null) {
|
|
method = pObject.getClass().getMethod(pMethod, pValue == null ? null : new Class[] { pValue.getClass() });
|
|
}
|
|
return method;
|
|
}
|
|
|
|
/**
|
|
* Entrega el nombre del metodo a invocar para fijar un valor en un Bean.
|
|
*
|
|
* @param pObject Bean de referencia.
|
|
* @param pAttribute Nombre del atributo a fijar el valor.
|
|
* @param pValue Valor a fijar en el atributo.
|
|
* @return
|
|
* @throws SecurityException
|
|
* @throws NoSuchMethodException
|
|
*/
|
|
public static Method getBeanSetterMethod(Object pObject, String pAttribute, Object pValue) throws SecurityException, NoSuchMethodException {
|
|
pAttribute = pAttribute.substring(0, 1).toUpperCase() + pAttribute.substring(1);
|
|
return BeanManager.getMethod(pObject, "set" + pAttribute, pValue);
|
|
}
|
|
|
|
/**
|
|
* Compara dos Objetos, si los objetos son iguales retorna true.
|
|
*
|
|
* @param pObject Objeto uno.
|
|
* @param pOtherObject Objeto dos
|
|
* @return
|
|
* @throws SecurityException
|
|
* @throws IllegalArgumentException
|
|
* @throws NoSuchMethodException
|
|
* @throws IllegalAccessException
|
|
* @throws InvocationTargetException
|
|
* @throws Exception
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
public static boolean compareObject(Object pObject, Object pOtherObject) throws SecurityException, IllegalArgumentException,
|
|
NoSuchMethodException, IllegalAccessException, InvocationTargetException, Exception {
|
|
Field f[] = pObject.getClass().getDeclaredFields();
|
|
boolean equal = true;
|
|
for (Field obj : f) {
|
|
if (obj.getName().compareTo("pk") == 0 || obj.getName().compareTo("hashValue") == 0 || obj.getName().compareTo("class") == 0
|
|
|| obj.getName().compareTo("serialVersionUID") == 0) {
|
|
continue;
|
|
}
|
|
Object value = null;
|
|
try {
|
|
value = BeanManager.getBeanAttributeValue(pObject, obj.getName());
|
|
} catch (NoSuchMethodException e) {
|
|
continue;
|
|
}
|
|
Object value1 = null;
|
|
try {
|
|
value1 = BeanManager.getBeanAttributeValue(pOtherObject, obj.getName());
|
|
} catch (Exception e) {
|
|
continue;
|
|
}
|
|
if (value == null && value1 == null) {
|
|
continue;
|
|
}
|
|
if (!(value != null && value instanceof Comparable)) {
|
|
continue;
|
|
}
|
|
if (!(value1 != null && value1 instanceof Comparable)) {
|
|
continue;
|
|
}
|
|
if (value == null && value1 != null) {
|
|
return false;
|
|
}
|
|
if (value1 == null && value != null) {
|
|
return false;
|
|
}
|
|
if (((Comparable) value).compareTo(value1) != 0) {
|
|
return false;
|
|
}
|
|
}
|
|
return equal;
|
|
}
|
|
|
|
/**
|
|
* Metodo que se encarga de hacer un merge de dos objetos, si los datos de un campo del objeto origen son diferentes
|
|
* a los del destino remplazo los datos destino con los datos del origen.
|
|
*
|
|
* @param pSourceObject Datos del objeto orgigene a copiar al destino.
|
|
* @param pDestinyObject Datos del objeto destino.
|
|
* @throws SecurityException
|
|
* @throws IllegalArgumentException
|
|
* @throws NoSuchMethodException
|
|
* @throws IllegalAccessException
|
|
* @throws InvocationTargetException
|
|
* @throws Exception
|
|
*/
|
|
public static void mergeObject(Object pSourceObject, Object pDestinyObject) throws SecurityException, IllegalArgumentException,
|
|
NoSuchMethodException, IllegalAccessException, InvocationTargetException, Exception {
|
|
Field f[] = pSourceObject.getClass().getDeclaredFields();
|
|
for (Field obj : f) {
|
|
if (obj.getName().compareTo("pk") == 0 || obj.getName().compareTo("hashValue") == 0 || obj.getName().compareTo("class") == 0
|
|
|| obj.getName().compareTo("serialVersionUID") == 0) {
|
|
continue;
|
|
}
|
|
Object value = BeanManager.getBeanAttributeValue(pSourceObject, obj.getName());
|
|
Object value1 = BeanManager.getBeanAttributeValue(pDestinyObject, obj.getName());
|
|
if (!BeanManager.isEqual(value, value1)) {
|
|
BeanManager.setBeanAttributeValue(pDestinyObject, obj.getName(), value);
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Metodo que compara el valor de dos objetos simples no compuestos, ejemplo BigDecimal, String, Integer etc.
|
|
*
|
|
* @param pValue valor a compar
|
|
* @param pValue1 valor con el que se compara el primer parametro.
|
|
* @return
|
|
* @throws Exception
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
private static boolean isEqual(Object pValue, Object pValue1) throws Exception {
|
|
if (pValue == null && pValue1 == null) {
|
|
return true;
|
|
} else if (pValue == null && pValue1 != null) {
|
|
return false;
|
|
} else if (pValue1 == null && pValue != null) {
|
|
return false;
|
|
} else if (!(pValue != null && pValue instanceof Comparable)) {
|
|
return true;
|
|
} else if (!(pValue1 != null && pValue1 instanceof Comparable)) {
|
|
return true;
|
|
} else if (((Comparable) pValue).compareTo(pValue1) != 0) {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Metodo que compara dos string dado la una condicion.
|
|
*
|
|
* @param pValue Valor del primer string.
|
|
* @param pOtherValue Valor con el que se compara el primer string.
|
|
* @param pCondition Condicion con la que se evalua los dos strings.
|
|
* @return
|
|
*/
|
|
public static boolean compareString(String pValue, String pOtherValue, String pCondition) {
|
|
if (pCondition.compareTo("==") == 0 || pCondition.compareTo("=") == 0) {
|
|
if (pValue.compareTo(pOtherValue) == 0) {
|
|
return true;
|
|
}
|
|
}
|
|
if (pCondition.compareTo("!=") == 0) {
|
|
if (pValue.compareTo(pOtherValue) != 0) {
|
|
return true;
|
|
}
|
|
}
|
|
if (pCondition.compareTo(">") == 0) {
|
|
if (pValue.compareTo(pOtherValue) > 0) {
|
|
return true;
|
|
}
|
|
}
|
|
if (pCondition.compareTo(">=") == 0) {
|
|
if (pValue.compareTo(pOtherValue) >= 0) {
|
|
return true;
|
|
}
|
|
}
|
|
if (pCondition.compareTo("<") == 0) {
|
|
if (pValue.compareTo(pOtherValue) < 0) {
|
|
return true;
|
|
}
|
|
}
|
|
if (pCondition.compareTo("<=") == 0) {
|
|
if (pValue.compareTo(pOtherValue) <= 0) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Metodo que compara dos BigDecimal dado la una condicion.
|
|
*
|
|
* @param pValue Valor del primer BigDecimal.
|
|
* @param pOtherValue Valor con el que se compara el primer BigDecimal.
|
|
* @param pCondition Condicion con la que se evalua los dos BigDecimal.
|
|
* @return
|
|
*/
|
|
public static boolean compareBigDecimal(BigDecimal pValue, BigDecimal pOtherValue, String pCondition) {
|
|
if (pCondition.compareTo("==") == 0 || pCondition.compareTo("=") == 0) {
|
|
if (pValue.compareTo(pOtherValue) == 0) {
|
|
return true;
|
|
}
|
|
}
|
|
if (pCondition.compareTo("!=") == 0) {
|
|
if (pValue.compareTo(pOtherValue) != 0) {
|
|
return true;
|
|
}
|
|
}
|
|
if (pCondition.compareTo(">") == 0) {
|
|
if (pValue.compareTo(pOtherValue) > 0) {
|
|
return true;
|
|
}
|
|
}
|
|
if (pCondition.compareTo(">=") == 0) {
|
|
if (pValue.compareTo(pOtherValue) >= 0) {
|
|
return true;
|
|
}
|
|
}
|
|
if (pCondition.compareTo("<") == 0) {
|
|
if (pValue.compareTo(pOtherValue) < 0) {
|
|
return true;
|
|
}
|
|
}
|
|
if (pCondition.compareTo("<=") == 0) {
|
|
if (pValue.compareTo(pOtherValue) <= 0) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public static Integer getRecordversion(Object bean) throws Exception {
|
|
Object optlock;
|
|
try {
|
|
optlock = BeanManager.getBeanAttributeValue(bean, "recordversion");
|
|
} catch (NoSuchMethodException e) {
|
|
return null;
|
|
}
|
|
if (optlock == null) {
|
|
return 0;
|
|
}
|
|
return Integer.valueOf(optlock.toString());
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
public static HashMap<String, Object> getModified(AbstractDataTransport beanoriginal, AbstractDataTransport beanmodificado) throws Exception {
|
|
|
|
HashMap<String, Object> updated = new HashMap<String, Object>();
|
|
Field f[] = beanoriginal.getClass().getDeclaredFields();
|
|
boolean modificado = false;
|
|
Integer optlock = null;
|
|
|
|
for (Field obj : f) {
|
|
modificado = false;
|
|
String ncampo = obj.getName();
|
|
if (ncampo.compareTo("pk") == 0 || ncampo.compareTo("hashValue") == 0 || ncampo.compareTo("class") == 0
|
|
|| ncampo.compareTo("serialVersionUID") == 0) {
|
|
continue;
|
|
}
|
|
Object valori, valmod = null;
|
|
try {
|
|
valori = BeanManager.getBeanAttributeValue(beanoriginal, obj.getName());
|
|
valmod = BeanManager.getBeanAttributeValue(beanmodificado, obj.getName());
|
|
} catch (NoSuchMethodException e) {
|
|
continue;
|
|
}
|
|
if (valmod instanceof byte[]) {
|
|
updated.put(ncampo, valmod);
|
|
continue;
|
|
}
|
|
if (ncampo.equals("recordversion")) {
|
|
optlock = (Integer) valmod;
|
|
continue;
|
|
}
|
|
if (valori == null && valmod == null) {
|
|
continue;
|
|
}
|
|
if (valori == null && valmod != null) {
|
|
modificado = true;
|
|
}
|
|
if (valmod == null && valori != null) {
|
|
modificado = true;
|
|
}
|
|
if (valori != null && valmod != null && ((Comparable<Object>) valori).compareTo(valmod) != 0) {
|
|
modificado = true;
|
|
}
|
|
if (modificado) {
|
|
updated.put(ncampo, valmod);
|
|
}
|
|
}
|
|
if (!updated.isEmpty()) {
|
|
updated.put("pk", BeanManager.getBeanAttributeValue(beanmodificado, "pk"));
|
|
if (optlock != null) {
|
|
updated.put("recordversion", BeanManager.getBeanAttributeValue(beanmodificado, "recordversion"));
|
|
}
|
|
|
|
// hay que crear el objeto para poder eliminar el bean original.
|
|
HashMap<String, Object> mdata = new HashMap<String, Object>();
|
|
mdata = (HashMap<String, Object>) BeanManager.getBeanAttributeValue(beanmodificado, "modifiedData");
|
|
// mdata.remove("ORIGINALBEAN");
|
|
updated.put("modifiedData", mdata);
|
|
updated.put("rowkey", BeanManager.getBeanAttributeValue(beanmodificado, "rowkey"));
|
|
|
|
}
|
|
return updated;
|
|
}
|
|
|
|
}
|