| java.util.AbstractSet org.geotools.referencing.factory.epsg.AuthorityCodes
AuthorityCodes | final class AuthorityCodes extends AbstractSet implements Serializable(Code) | | A set of EPSG authority codes. This set requires a living connection to the EPSG database.
All
AuthorityCodes.iterator method call creates a new
ResultSet holding the codes. However,
call to
AuthorityCodes.contains map directly to a SQL call.
Serialization of this class store a copy of all authority codes. The serialization
do not preserve any connection to the database.
since: 2.2 version: $Id: AuthorityCodes.java 27862 2007-11-12 19:51:19Z desruisseaux $ author: Martin Desruisseaux |
Field Summary | |
final String | sqlAll The SQL command to use for creating the
queryAll statement. | final public Class | type The type for this code set. |
Method Summary | |
final java.util.Map | asMap() Returns a view of this set as a map with object's name as value, or
null if none. | public synchronized boolean | contains(Object code) Returns
true if this collection contains the specified element. | protected synchronized void | finalize() Closes the underlying statements. | public synchronized boolean | isEmpty() Returns
true if this collection contains no elements. | public synchronized java.util.Iterator | iterator() Returns an iterator over the codes. | public synchronized int | size() Count the number of elements in the underlying result set. | static void | unexpectedException(Class classe, String method, SQLException exception) Invoked when an exception occured. | protected Object | writeReplace() Returns a serializable copy of this set. |
sqlAll | final String sqlAll(Code) | | The SQL command to use for creating the
queryAll statement.
Used for iteration over all codes.
|
type | final public Class type(Code) | | The type for this code set. This is translated to the most appropriate
interface type even if the user supplied an implementation type.
|
AuthorityCodes | public AuthorityCodes(Connection connection, TableInfo table, Class type, DirectEpsgFactory factory)(Code) | | Creates a new set of authority codes for the specified type.
Parameters: connection - The connection to the EPSG database. Parameters: table - The table to query. Parameters: type - The type to query. Parameters: factory - The factory originator. |
asMap | final java.util.Map asMap()(Code) | | Returns a view of this set as a map with object's name as value, or
null if none.
|
contains | public synchronized boolean contains(Object code)(Code) | | Returns
true if this collection contains the specified element.
|
finalize | protected synchronized void finalize() throws SQLException(Code) | | Closes the underlying statements. Note: this method is also invoked directly
by
DirectEpsgFactory.dispose , which is okay in this particular case since
the implementation of this method can be executed an arbitrary amount of times.
|
isEmpty | public synchronized boolean isEmpty()(Code) | | Returns
true if this collection contains no elements.
This method fetch at most one row instead of counting all rows.
|
iterator | public synchronized java.util.Iterator iterator()(Code) | | Returns an iterator over the codes. The iterator is backed by a living
ResultSet ,
which will be closed as soon as the iterator reach the last element.
|
size | public synchronized int size()(Code) | | Count the number of elements in the underlying result set.
|
unexpectedException | static void unexpectedException(Class classe, String method, SQLException exception)(Code) | | Invoked when an exception occured. This method just log a warning.
|
writeReplace | protected Object writeReplace() throws ObjectStreamException(Code) | | Returns a serializable copy of this set. This method is invoked automatically during
serialization. The serialised set of authority code is disconnected from the underlying
database.
|
|
|