org.jooq.impl
Class PackageImpl

java.lang.Object
  extended by org.jooq.impl.PackageImpl
All Implemented Interfaces:
Serializable, Comparable<NamedQueryPart>, Adapter, Attachable, NamedQueryPart, Package, QueryPart, QueryPartInternal, SchemaProvider

public class PackageImpl
extends Object
implements Package

A default implementation for packages (containers of stored procedures and functions)

Currently, this is only supported for the SQLDialect.ORACLE dialect.

This type is for JOOQ INTERNAL USE only. Do not reference directly

Author:
Lukas Eder
See Also:
Serialized Form

Constructor Summary
PackageImpl(String name, Schema schema)
           
 
Method Summary
 void attach(Configuration configuration)
          Deprecated. 
 void bind(BindContext context)
          Bind all parameters of this QueryPart to a PreparedStatement This method is for JOOQ INTERNAL USE only.
 int compareTo(NamedQueryPart that)
           
protected  Factory create()
          Internal convenience method
protected  Factory create(Configuration configuration)
          Internal convenience method
 boolean declaresFields()
          Subclasses may override this
 boolean declaresTables()
          Subclasses may override this
 boolean equals(Object that)
           
 List<Object> getBindValues()
          This method is also declared as Query.getBindValues() Retrieve the bind values that will be bound by this QueryPart This method is exposed publicly in Query.getBindValues()
 SQLDialect getDialect()
          Deprecated. 
 String getName()
          The name of this query part
 Param<?> getParam(String name)
          This method is also declared as Query.getParam(String) Retrieve a named parameter that will be bound by this QueryPart This method is exposed publicly in Query.getParam(String)
 Map<String,Param<?>> getParams()
          This method is also declared as Query.getParams() Retrieve the named parameters that will be bound by this QueryPart This method is exposed publicly in Query.getParams()
 Schema getSchema()
           
 String getSQL()
          This method is also declared as Query.getSQL() Retrieve the SQL that will be rendered by this QueryPart This method is exposed publicly in Query.getSQL()
 String getSQL(boolean inline)
          This method is also declared as Query.getSQL(boolean) Retrieve the SQL that will be rendered by this QueryPart This method is exposed publicly in Query.getSQL(boolean)
 int hashCode()
           
<I> I
internalAPI(Class<I> internalType)
          Adapt to an internal type assuming its functionality This is for JOOQ INTERNAL USE only.
 void toSQL(RenderContext context)
          Render this QueryPart to a SQL string contained in context.sql().
 String toString()
           
protected  DataAccessException translate(String sql, SQLException e)
          Internal convenience method
protected  DataAccessException translate(String task, String sql, SQLException e)
          Deprecated. - 2.3.0 - Do not reuse
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jooq.Package
getSchema
 
Methods inherited from interface org.jooq.NamedQueryPart
getName
 
Methods inherited from interface org.jooq.QueryPart
attach
 
Methods inherited from interface org.jooq.Adapter
internalAPI
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

PackageImpl

public PackageImpl(String name,
                   Schema schema)
Method Detail

toSQL

public final void toSQL(RenderContext context)
Description copied from interface: QueryPartInternal
Render this QueryPart to a SQL string contained in context.sql(). The context will contain additional information about how to render this QueryPart, e.g. whether this QueryPart should be rendered as a declaration or reference, whether this QueryPart's contained bind variables should be inlined or replaced by '?', etc.

Specified by:
toSQL in interface QueryPartInternal

bind

public final void bind(BindContext context)
Description copied from interface: QueryPartInternal
Bind all parameters of this QueryPart to a PreparedStatement

This method is for JOOQ INTERNAL USE only. Do not reference directly

Specified by:
bind in interface QueryPartInternal
Parameters:
context - The context holding the next bind index and other information for variable binding

getSchema

public final Schema getSchema()
Specified by:
getSchema in interface SchemaProvider
Returns:
The contained schema

getName

public final String getName()
Description copied from interface: NamedQueryPart
The name of this query part

Specified by:
getName in interface NamedQueryPart

compareTo

public final int compareTo(NamedQueryPart that)
Specified by:
compareTo in interface Comparable<NamedQueryPart>

internalAPI

public final <I> I internalAPI(Class<I> internalType)
Description copied from interface: Adapter
Adapt to an internal type assuming its functionality

This is for JOOQ INTERNAL USE only. If you need to access the internal API, these are the known possible interfaces:

Be aware though, that the internal API may change even between minor releases.

Specified by:
internalAPI in interface Adapter
Type Parameters:
I - The internal type's generic type parameter.
Parameters:
internalType - The internal type
Returns:
This object wrapped by or cast to an internal type

attach

@Deprecated
public void attach(Configuration configuration)
Deprecated. 

Description copied from interface: QueryPart
Attach this object to a new Configuration

Specified by:
attach in interface Attachable
Specified by:
attach in interface QueryPart
Parameters:
configuration - A configuration or null, if you wish to detach this Attachable from its previous configuration.

getDialect

@Deprecated
public final SQLDialect getDialect()
Deprecated. 

Description copied from interface: QueryPartInternal
Reproduce the SQL dialect this QueryPart was created with

This method is for JOOQ INTERNAL USE only. Do not reference directly

Specified by:
getDialect in interface QueryPartInternal
Returns:
The SQL dialect

getSQL

public final String getSQL()
This method is also declared as Query.getSQL()

Retrieve the SQL that will be rendered by this QueryPart

This method is exposed publicly in Query.getSQL()

Specified by:
getSQL in interface QueryPartInternal

getSQL

public final String getSQL(boolean inline)
This method is also declared as Query.getSQL(boolean)

Retrieve the SQL that will be rendered by this QueryPart

This method is exposed publicly in Query.getSQL(boolean)

Specified by:
getSQL in interface QueryPartInternal

getBindValues

public final List<Object> getBindValues()
This method is also declared as Query.getBindValues()

Retrieve the bind values that will be bound by this QueryPart

This method is exposed publicly in Query.getBindValues()

Specified by:
getBindValues in interface QueryPartInternal

getParams

public final Map<String,Param<?>> getParams()
This method is also declared as Query.getParams()

Retrieve the named parameters that will be bound by this QueryPart

This method is exposed publicly in Query.getParams()

Specified by:
getParams in interface QueryPartInternal

getParam

public final Param<?> getParam(String name)
This method is also declared as Query.getParam(String)

Retrieve a named parameter that will be bound by this QueryPart

This method is exposed publicly in Query.getParam(String)

Specified by:
getParam in interface QueryPartInternal

declaresFields

public boolean declaresFields()
Subclasses may override this

Specified by:
declaresFields in interface QueryPartInternal

declaresTables

public boolean declaresTables()
Subclasses may override this

Specified by:
declaresTables in interface QueryPartInternal

equals

public boolean equals(Object that)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

create

protected final Factory create()
Internal convenience method


create

protected final Factory create(Configuration configuration)
Internal convenience method


translate

@Deprecated
protected final DataAccessException translate(String task,
                                                         String sql,
                                                         SQLException e)
Deprecated. - 2.3.0 - Do not reuse

Internal convenience method


translate

protected final DataAccessException translate(String sql,
                                              SQLException e)
Internal convenience method



Copyright © 2012. All Rights Reserved.