uk.co.kimble.cobra
Class PersistentSet
java.lang.Object
|
+--uk.co.kimble.cobra.PersistentSet
- public class PersistentSet
- extends java.lang.Object
Represents a set of objects retrieved from the database
|
Constructor Summary |
PersistentSet(java.lang.String name)
Constructor |
|
Method Summary |
void |
close()
Frees up database resources at end of retrieve |
void |
finalize()
If the set gets gc'd close the connection |
boolean |
hasMoreObjects()
Used to enumerate a set of objects returned after a database query
|
PersistentObject |
nextObject()
Return the next object in a set
|
| Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
PersistentSet
public PersistentSet(java.lang.String name)
throws PersistentException
- Constructor
- Parameters:
name - The name of the class this set represents- Throws:
- PersistentException - if there is a problem retrieving the class dictionary
hasMoreObjects
public boolean hasMoreObjects()
- Used to enumerate a set of objects returned after a database query
nextObject
public PersistentObject nextObject()
throws PersistentException
- Return the next object in a set
- Throws:
- PersistentException - if the next object can't be instantiated
close
public void close()
throws PersistentException
- Frees up database resources at end of retrieve
- Throws:
- PersistentException - if the database can't be closed down properly
finalize
public void finalize()
- If the set gets gc'd close the connection
- Overrides:
- finalize in class java.lang.Object