com.ontotext.ordi
Interface Wrapper

All Known Subinterfaces:
Connection, DataSource, TConnection, TSource, WsmoConnection, WsmoSource
All Known Implementing Classes:
ConnectionImpl, DataSourceImpl, RDBMSAdapter, RDBMSConnection, RemoteWsmoConnection, RemoteWsmoSource, TConnectionImpl, TQueryConnectionImpl, TRREEAdapter, TRREEConnection, TSourceImpl, WsmoConnectionImpl, WsmoSourceImpl

public interface Wrapper

Interface for ORDI classes to provide ability to retrieve the delegate instance when the instance in question is in fact proxy class.

Author:
vassil
See Also:
Wrapper

Method Summary
 boolean isWrapperFor(Class<?> iface)
          Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.
<T> T
unwrap(Class<T> iface)
          Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.
 

Method Detail

isWrapperFor

boolean isWrapperFor(Class<?> iface)
                     throws ORDIException
Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.

Parameters:
iface - A Class defining an interface that the result must implement.
Returns:
an object that implements the interface. May be a proxy for the actual implementing object.
Throws:
ORDIException

unwrap

<T> T unwrap(Class<T> iface)
         throws ORDIException
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.

Parameters:
iface - a Class defining an interface.
Returns:
true if this implements the interface or directly or indirectly wraps an object that does.
Throws:
ORDIException


Copyright © 2008. All Rights Reserved.