com.triactive.jdo.store.query.result
Class NamedResultExpression

java.lang.Object
  extended bycom.triactive.jdo.store.query.result.NamedResultExpression
All Implemented Interfaces:
ResultExpression

public class NamedResultExpression
extends java.lang.Object
implements ResultExpression

A result expression that has a textual name.

This class just combines an already existing result expression with a name string. The name is used when the result value gets placed into a Map or user-defined value object.

Author:
Mike Martin

Constructor Summary
NamedResultExpression(ResultExpression expr, java.lang.String name)
          Constructs a new named result expression.
 
Method Summary
 java.lang.String getName()
          Returns the name of this result expression.
 java.lang.Class getResultType()
          Returns the type of objects produced by this result expression.
 ResultObjectFactory newResultObjectFactory(java.sql.ResultSet rs)
          Generates a result object factory to convert expression values from the specified SQL result set into Java objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedResultExpression

public NamedResultExpression(ResultExpression expr,
                             java.lang.String name)
Constructs a new named result expression.

Parameters:
expr - an existing result expression
name - the name for the result expression
Method Detail

getName

public java.lang.String getName()
Returns the name of this result expression.


getResultType

public java.lang.Class getResultType()
Description copied from interface: ResultExpression
Returns the type of objects produced by this result expression.

Specified by:
getResultType in interface ResultExpression
Returns:
The type of objects produced by this result expression. Never returns a primitive type.

newResultObjectFactory

public ResultObjectFactory newResultObjectFactory(java.sql.ResultSet rs)
                                           throws java.sql.SQLException
Description copied from interface: ResultExpression
Generates a result object factory to convert expression values from the specified SQL result set into Java objects.

Specified by:
newResultObjectFactory in interface ResultExpression
Parameters:
rs - the result set containing the columns backing the result expression
Returns:
a new factory that can produce result Java objects of the correct type
Throws:
java.sql.SQLException - if a database error occurs


Copyright © 2001-2007 The TJDO Project All Rights Reserved.