org.geotools.data.jdbc.datasource
Interface UnWrapper

All Known Implementing Classes:
DBCPUnWrapper, LifecycleConnectionUnWrapper

public interface UnWrapper

Generic Connection unwrapper. A user can test if the unwrapper is able to unwrap a certain connection, on positive answer he can call unwrap(Connection) to get the native connection

Author:
Andrea Aime - TOPP

Method Summary
 boolean canUnwrap(Connection conn)
          Returns true if this unwrapper knows how to unwrap the specified connection
 boolean canUnwrap(Statement st)
          Returns tru if this unwrapper knows how to unwrap the specified statement
 Connection unwrap(Connection conn)
          Returns the unwrapped connection, of throws IllegalArgumentException if the passed Connection is not supported (canUnwrap(Connection) returns false}.
 Statement unwrap(Statement statement)
          Returns the unwrapped statement, of throws IllegalArgumentException if the passed Statement is not supported (canUnwrap(Statement) returns false}.
 

Method Detail

canUnwrap

boolean canUnwrap(Connection conn)
Returns true if this unwrapper knows how to unwrap the specified connection

Parameters:
conn -
Returns:

canUnwrap

boolean canUnwrap(Statement st)
Returns tru if this unwrapper knows how to unwrap the specified statement

Parameters:
st -
Returns:

unwrap

Connection unwrap(Connection conn)
Returns the unwrapped connection, of throws IllegalArgumentException if the passed Connection is not supported (canUnwrap(Connection) returns false}.

Parameters:
conn -
Returns:

unwrap

Statement unwrap(Statement statement)
Returns the unwrapped statement, of throws IllegalArgumentException if the passed Statement is not supported (canUnwrap(Statement) returns false}.

Parameters:
statement -
Returns:


Copyright © 1996-2014 Geotools. All Rights Reserved.