This project has retired. For details please refer to its Attic page.
BeanFactory (Apache Gora 0.2 API)

org.apache.gora.persistency
Interface BeanFactory<K,T extends Persistent>

All Known Implementing Classes:
BeanFactoryImpl

public interface BeanFactory<K,T extends Persistent>

BeanFactory's enable contruction of keys and Persistent objects.


Method Summary
 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
 K newKey()
          Constructs a new instance of the key class
 T newPersistent()
          Constructs a new instance of the Persistent class
 

Method Detail

newKey

K newKey()
         throws Exception
Constructs a new instance of the key class

Returns:
a new instance of the key class
Throws:
Exception

newPersistent

T newPersistent()
Constructs a new instance of the Persistent class

Returns:
a new instance of the Persistent class

getCachedKey

K getCachedKey()
Returns an instance of the key 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.

Returns:
a cached instance of the key object

getCachedPersistent

T getCachedPersistent()
Returns an instance of the Persistent 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.

Returns:
a cached instance of the Persistent object

getKeyClass

Class<K> getKeyClass()
Returns the key class

Returns:
the key class

getPersistentClass

Class<T> getPersistentClass()
Returns the persistent class

Returns:
the persistent class


Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.