Code example for LazyInitializer

Methods: getPersistentClass

0
 
    private Class getClazz(Object obj) {
        try { 
            HibernateProxy hibernateProxy = (HibernateProxy) obj;
            LazyInitializer lazyInitializer = hibernateProxy.getHibernateLazyInitializer();
            return lazyInitializer.getPersistentClass();
        } catch (ClassCastException e) {
            return obj.getClass(); 
        } 
    } 
 
    private String getOldValueToKey(Map map, String key) {
        String value = null;
        if (map.get(key) != null) {
            value = map.get(key).toString();
            if (!value.trim().equals("")) {
                return value;
            } else { 
                return ""; 
            } 
Connect your IDE to all the code out there  Get Codota for Java