|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.spi.config.ds.DsPropertyCollection
@NotThreadSafe public final class DsPropertyCollection
Implementation of PropertyCollection
based on accessing a data source.
Constructor Summary | |
---|---|
DsPropertyCollection(String dataSourceId, Connection connection, ResultSet resultSet) Default constructor. |
Method Summary | |
---|---|
void |
close() Closes the collection to release the underlying connection. |
Iterator<Property> |
iterator() Returns an iterator over a set of properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DsPropertyCollection(String dataSourceId, Connection connection, ResultSet resultSet)
dataSourceId
- the identifier of the data source the properties are read from.
connection
- the underlying connection of the result set.
resultSet
- the properties to iterate over.
Method Detail |
---|
public Iterator<Property> iterator()
Please note that an implementation may require to call PropertyCollection.close()
after iterating over the values. The client calling PropertyCollection.iterator()
is responsible for closing the collection.
iterator
in interface
PropertyCollection
iterator
in interface
Iterable<Property>
Iterable.iterator()
public void close()
The connection is automatically closed when the iterator reaches the last element.
close
in interface
PropertyCollection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |