public class BeanFactoryImpl<K,T extends Persistent> extends Object implements BeanFactory<K,T>
BeanFactory interface. Constructs
the keys using by reflection, Persistent objects by calling
Persistent#newInstance(org.apache.gora.persistency.StateManager).| Constructor and Description |
|---|
BeanFactoryImpl(Class<K> keyClass,
Class<T> persistentClass)
Default constructor for this class.
|
| Modifier and Type | Method and Description |
|---|---|
K |
getCachedKey()
Returns an instance of the key object to be
used to access static fields of the object.
|
T |
getCachedPersistent()
Returns an instance of the
Persistent object to be
used to access static fields of the object. |
Class<K> |
getKeyClass()
Returns the key class
|
Class<T> |
getPersistentClass()
Returns the persistent class
|
boolean |
isKeyPersistent() |
K |
newKey()
Constructs a new instance of the key class
|
T |
newPersistent()
Constructs a new instance of the Persistent class
|
public K newKey() throws Exception
BeanFactorynewKey in interface BeanFactory<K,T extends Persistent>Exceptionpublic T newPersistent()
BeanFactorynewPersistent in interface BeanFactory<K,T extends Persistent>public K getCachedKey()
BeanFactorygetCachedKey in interface BeanFactory<K,T extends Persistent>public T getCachedPersistent()
BeanFactoryPersistent object to be
used to access static fields of the object. Returned object MUST
be treated as read-only. No fields other than the static fields
of the object should be assumed to be readable.getCachedPersistent in interface BeanFactory<K,T extends Persistent>public Class<K> getKeyClass()
BeanFactorygetKeyClass in interface BeanFactory<K,T extends Persistent>public Class<T> getPersistentClass()
BeanFactorygetPersistentClass in interface BeanFactory<K,T extends Persistent>public boolean isKeyPersistent()
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.