Top Description Methods
org.hibernate.service.spi

public Interface Wrapped

Known Direct Subinterfaces
org.hibernate.engine.jdbc.connections.spi.ConnectionProvider, org.hibernate.engine.jdbc.connections.spi.MultiTenantConnectionProvider
Imports
org.hibernate.service.UnknownUnwrapTypeException

Optional contract for services that wrap stuff that to which it is useful to have access.

For example, a service that maintains a javax.sql.DataSource might want to expose access to the javax.sql.DataSource or its java.sql.Connection instances.

Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

True/false.
isUnwrappableAs
(Class<?>
The type to check.
unwrapType
)

Can this wrapped service be unwrapped as the indicated type?

public <T> T

Returns:

The unwrapped reference
unwrap
(Class<T>
The java type as which to unwrap this instance.
unwrapType
)

Unproxy the service proxy

Method Detail

isUnwrappableAsback to summary
public boolean isUnwrappableAs(Class<?> unwrapType)

Can this wrapped service be unwrapped as the indicated type?

Parameters
unwrapType:Class<?>

The type to check.

Returns:boolean

True/false.

unwrapback to summary
public <T> T unwrap(Class<T> unwrapType)

Unproxy the service proxy

Parameters
unwrapType:Class<T>

The java type as which to unwrap this instance.

Returns:T

The unwrapped reference

Exceptions
UnknownUnwrapTypeException:
if the service cannot be unwrapped as the indicated type