|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.ojb.broker.accesslayer.PkEnumeration
this class can be used to create enumerations of PrimaryKey objects. This is interesting for EJB finder methods in BMP entity beans which must return such enumerations.
| Field Summary | |
protected PersistenceBroker |
broker
|
protected ClassDescriptor |
classDescriptor
descriptor for the class of which items are to be found |
protected java.lang.reflect.Constructor |
constructor
the Constructor that is needed to build the PrimaryKey Objects |
protected boolean |
hasCalledCheck
|
protected boolean |
hasNext
|
protected ResultSetAndStatement |
resultSetAndStatment
The underlying jdbc resultset produced by select statement |
(package private) static long |
serialVersionUID
|
| Constructor Summary | |
PkEnumeration(Query query,
ClassDescriptor cld,
java.lang.Class primaryKeyClass,
PersistenceBroker broker)
PkEnumeration constructor. |
|
| Method Summary | |
protected void |
finalize()
protection just in case someone leaks. |
boolean |
hasMoreElements()
Tests if this enumeration contains more elements. |
java.lang.Object |
nextElement()
Returns the next element of this enumeration if this enumeration object has at least one more element to provide. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static final long serialVersionUID
protected boolean hasCalledCheck
protected boolean hasNext
protected PersistenceBroker broker
protected ResultSetAndStatement resultSetAndStatment
protected ClassDescriptor classDescriptor
protected java.lang.reflect.Constructor constructor
| Constructor Detail |
public PkEnumeration(Query query,
ClassDescriptor cld,
java.lang.Class primaryKeyClass,
PersistenceBroker broker)
query - the SELECT statement gerating the underlying resultsetcld - classDescriptor of the target entity class (say Article)primaryKeyClass - the entity classes PrimaryKey class (say ArticleKey).
this key-class MUST have a constructor with one argument of type org.apache.ojb.broker.Identity !| Method Detail |
public boolean hasMoreElements()
hasMoreElements in interface java.util.Enumerationtrue if and only if this enumeration object
contains at least one more element to provide;
false otherwise.public java.lang.Object nextElement()
nextElement in interface java.util.Enumerationjava.util.NoSuchElementException - if no more elements exist.protected void finalize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||