List of usage examples for org.hibernate.type CompositeCustomType getPropertyValue
public Object getPropertyValue(Object component, int i) throws HibernateException
From source file:com.fiveamsolutions.nci.commons.audit.AuditLogInterceptor.java
License:Open Source License
@SuppressWarnings("unchecked") private Object getCompositeValue(CompositeCustomType type, Object input) { if (input == null) { return null; }//from ww w . j av a 2s.co m JSONObject jsonObject = new JSONObject(); for (int i = 0; i < type.getPropertyNames().length; i++) { jsonObject.put(type.getPropertyNames()[i], type.getPropertyValue(input, i)); } return jsonObject.toString(); }