Hibernate ORM HibernateProxy - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM HibernateProxy class.

This code example shows how to use the following methods: getHibernateLazyInitializer
import com.google.gson.JsonSerializer;
 
public class HibernateProxySerializer implements JsonSerializer<HibernateProxy> {
 
	public JsonElement serialize(HibernateProxy proxyObj, Type type, JsonSerializationContext ctx) {
		Object deProxied = proxyObj.getHibernateLazyInitializer().getImplementation();
		return ctx.serialize(deProxied);
	} 
} 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getHibernateLazyInitializer
This code example shows how to use the following methods: getHibernateLazyInitializer
    @Override 
    public void initialize(Object owner, String propertyName, Object propertyValue) {
        Hibernate.initialize(propertyValue);
    } 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getHibernateLazyInitializer
    @Override 
    public void initialize(Object owner, String propertyName, Object propertyValue) {
        Hibernate.initialize(propertyValue);
    } 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getHibernateLazyInitializer
        TargetNotAuditedEntity rev1 = getAuditReader().find(TargetNotAuditedEntity.class, tnae1.getId(), 1);
 
        assert rev1.getReference() instanceof HibernateProxy;
 
        HibernateProxy proxyCreateByEnvers = (HibernateProxy) rev1.getReference();
        LazyInitializer lazyInitializer = proxyCreateByEnvers.getHibernateLazyInitializer();
 
        assert lazyInitializer.isUninitialized();
        assert lazyInitializer.getIdentifier() != null;
        assert lazyInitializer.getIdentifier().equals(tnae1.getId());
        assert lazyInitializer.isUninitialized();
 
        assert rev1.getReference().getId().equals(uste1.getId());
        assert rev1.getReference().getStr().equals(uste1.getStr());
        assert !lazyInitializer.isUninitialized();
    } 
} 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Hibernate ORM HibernateProxy Methods: