Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.ejb.plugins.cmp.jdbc.metadata
Class JDBCDeclaredQueryMetaData

    java.lang.Object
      org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCDeclaredQueryMetaData

All Implemented Interfaces:
  JDBCQueryMetaData

public final class JDBCDeclaredQueryMetaData
extends Object
implements JDBCQueryMetaData

Imutable class contains information about a declated query.

Version:
  $Revision: 1.21 $
Author:
  Dain Sundstrom

Constructor Summary
`JDBCDeclaredQueryMetaData(boolean isResultTypeMappingLocal, Element queryElement, Method method, JDBCReadAheadMetaData readAhead, Class compiler, boolean lazyResultSetLoading)` Constructs a JDBCDeclaredQueryMetaData which is defined by the declared-sql xml element and is invoked by the specified method.
`JDBCDeclaredQueryMetaData(JDBCDeclaredQueryMetaData defaults, JDBCReadAheadMetaData readAhead, Class compiler, boolean lazyResultSetLoading)` Constructs a JDBCDeclaredQueryMetaData which is defined by the declared-sql xml element and is invoked by the specified method.

Method Summary
`boolean` | `equals(Object o)` Compares this JDBCDeclaredQueryMetaData against the specified object.
`String` | `getAdditionalColumns()` Additional columns that should be added to the select clause.
`String` | `getAlias()` The alias that is used for the select table.
`String` | `getEJBName()` The name of the ejb from which the field will be selected.
`String` | `getFieldName()` The name of the cmp-field to be selected.
`String` | `getFrom()` Gets the sql FROM clause of this query.
`Method` | `getMethod()` Gets the method which invokes this query.
`String` | `getOrder()` Gets the sql ORDER BY clause of this query.
`String` | `getOther()` Gets other sql code which is appended to the end of the query.
`Class` | `getQLCompilerClass()`
`JDBCReadAheadMetaData` | `getReadAhead()` Gets the read ahead metadata for the query.
`String` | `getWhere()` Gets the sql WHERE clause of this query.
`int` | `hashCode()` Returns a hashcode for this JDBCDeclaredQueryMetaData.
`boolean` | `isLazyResultSetLoading()`
`boolean` | `isResultTypeMappingLocal()` Is the result set of ejbSelect is mapped to local ejb objects or remote ejb objects.
`boolean` | `isSelectDistinct()` Should the select be DISTINCT?
`String` | `toString()` Returns a string describing this JDBCDeclaredQueryMetaData.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### JDBCDeclaredQueryMetaData

    public JDBCDeclaredQueryMetaData(JDBCDeclaredQueryMetaData defaults,
                                     JDBCReadAheadMetaData readAhead,
                                     Class compiler,
                                     boolean lazyResultSetLoading)
                              throws org.jboss.deployment.DeploymentException

  Constructs a JDBCDeclaredQueryMetaData which is defined by the declared-sql xml element and is invoked by the specified method. Inherits unspecified values from the defaults.

Parameters:
  `defaults` - the default values to use
  `readAhead` - the read-ahead properties for this query

### JDBCDeclaredQueryMetaData

    public JDBCDeclaredQueryMetaData(boolean isResultTypeMappingLocal,
                                     Element queryElement,
                                     Method method,
                                     JDBCReadAheadMetaData readAhead,
                                     Class compiler,
                                     boolean lazyResultSetLoading)
                              throws org.jboss.deployment.DeploymentException

  Constructs a JDBCDeclaredQueryMetaData which is defined by the declared-sql xml element and is invoked by the specified method.

Parameters:
  `queryElement` - the xml Element which contains the metadata about this query
  `method` - the method which invokes this query
  `readAhead` - the read-ahead properties for this query

Method Detail

### getMethod

    public Method getMethod()

  Description copied from interface: `JDBCQueryMetaData`
  Gets the method which invokes this query.

  Specified by:
    `getMethod` in interface `JDBCQueryMetaData`
  Returns:
    the Method object which invokes this query

### isResultTypeMappingLocal

    public boolean isResultTypeMappingLocal()

  Description copied from interface: `JDBCQueryMetaData`
  Is the result set of ejbSelect is mapped to local ejb objects or remote ejb objects.

  Specified by:
    `isResultTypeMappingLocal` in interface `JDBCQueryMetaData`
  Returns:
    true, if the result set is to be local objects

### getReadAhead

    public JDBCReadAheadMetaData getReadAhead()

  Gets the read ahead metadata for the query.

  Specified by:
    `getReadAhead` in interface `JDBCQueryMetaData`
  Returns:
    the read ahead metadata for the query.

### getQLCompilerClass

    public Class getQLCompilerClass()

  Specified by:
    `getQLCompilerClass` in interface `JDBCQueryMetaData`
  Returns:
    EJBQL compiler implementation

### getFrom

    public String getFrom()

  Gets the sql FROM clause of this query.

  Returns:
    a String which contains the sql FROM clause

### getWhere

    public String getWhere()

  Gets the sql WHERE clause of this query.

  Returns:
    a String which contains the sql WHERE clause

### getOrder

    public String getOrder()

  Gets the sql ORDER BY clause of this query.

  Returns:
    a String which contains the sql ORDER BY clause

### getOther

    public String getOther()

  Gets other sql code which is appended to the end of the query. This is userful for supplying hints to the query engine.

  Returns:
    a String which contains additional sql code which is appended to the end of the query

### isSelectDistinct

    public boolean isSelectDistinct()

  Should the select be DISTINCT?

  Returns:
    true if the select clause should contain distinct

### getEJBName

    public String getEJBName()

  The name of the ejb from which the field will be selected.

  Returns:
    the name of the ejb from which a field will be selected, or null if returning a whole ejb

### getFieldName

    public String getFieldName()

  The name of the cmp-field to be selected.

  Returns:
    the name of the cmp-field to be selected or null if returning a whole ejb

### getAlias

    public String getAlias()

  The alias that is used for the select table.

  Returns:
    the alias that is used for the table from which the entity or field is selected.

### getAdditionalColumns

    public String getAdditionalColumns()

  Additional columns that should be added to the select clause. For example, columns that are used in an order by clause.

  Returns:
    additional columns that should be added to the select clause

### isLazyResultSetLoading

    public boolean isLazyResultSetLoading()

  Specified by:
    `isLazyResultSetLoading` in interface `JDBCQueryMetaData`

### equals

    public boolean equals(Object o)

  Compares this JDBCDeclaredQueryMetaData against the specified object. Returns true if the objects are the same. Two JDBCDeclaredQueryMetaData are the same if they are both invoked by the same method.

  Parameters:
    `o` - the reference object with which to compare
  Returns:
    true if this object is the same as the object argument; false otherwise

### hashCode

    public int hashCode()

  Returns a hashcode for this JDBCDeclaredQueryMetaData. The hashcode is computed by the method which invokes this query.

  Returns:
    a hash code value for this object

### toString

    public String toString()

  Returns a string describing this JDBCDeclaredQueryMetaData. The exact details of the representation are unspecified and subject to change, but the following may be regarded as typical:

  "[JDBCDeclaredQueryMetaData: method=public org.foo.User findByName( java.lang.String)]"

  Returns:
    a string representation of the object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.