|
Hibernate example source code file (DynamicEntityTuplizer.java)
The Hibernate DynamicEntityTuplizer.java source code//$Id$ package org.hibernate.test.annotations.tuplizer; import org.hibernate.mapping.PersistentClass; import org.hibernate.property.Getter; import org.hibernate.property.Setter; import org.hibernate.proxy.ProxyFactory; import org.hibernate.tuple.Instantiator; import org.hibernate.tuple.entity.EntityMetamodel; import org.hibernate.tuple.entity.PojoEntityTuplizer; /** * @author Emmanuel Bernard */ public class DynamicEntityTuplizer extends PojoEntityTuplizer { public DynamicEntityTuplizer(EntityMetamodel entityMetamodel, PersistentClass mappedEntity) { super( entityMetamodel, mappedEntity ); } protected Instantiator buildInstantiator(PersistentClass persistentClass) { return new DynamicInstantiator( persistentClass.getEntityName() ); } protected ProxyFactory buildProxyFactory(PersistentClass persistentClass, Getter idGetter, Setter idSetter) { // allows defining a custom proxy factory, which is responsible for // generating lazy proxies for a given entity. // // Here we simply use the default... return super.buildProxyFactory( persistentClass, idGetter, idSetter ); } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate DynamicEntityTuplizer.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.