net.java.ao
Class ReadOnlyEntityProxyFactory<T extends RawEntity<K>,K>

java.lang.Object
  extended by net.java.ao.ReadOnlyEntityProxyFactory<T,K>
Type Parameters:
T - the entity type
K - the primary key type

public class ReadOnlyEntityProxyFactory<T extends RawEntity<K>,K>
extends Object

Factory for building large number of ReadOnlyEntityProxy instances. Reflectively fetching information about the implemented type is expensive and unnecessary to be done more than once.

Author:
ahennecke

Constructor Summary
ReadOnlyEntityProxyFactory(EntityManager entityManager, Class<T> type)
          Cache information about the accessors (can be getters or annotated) and field names.
 
Method Summary
 ReadOnlyEntityProxy<T,K> build(K primaryKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadOnlyEntityProxyFactory

public ReadOnlyEntityProxyFactory(EntityManager entityManager,
                                  Class<T> type)
Cache information about the accessors (can be getters or annotated) and field names. All instances built by this factory will make use of this information.

Method Detail

build

public ReadOnlyEntityProxy<T,K> build(K primaryKey)
Parameters:
primaryKey - the primary key object
Returns:
a new read only proxy instance, using cached class structure information


Copyright © 2007-2011. All Rights Reserved.