FileDocCategorySizeDatePackage
QueryValueFetcher.javaAPI DocGlassfish v2 API3524Fri May 04 22:35:06 BST 2007com.sun.jdo.spi.persistence.support.sqlstore.query.jqlc

QueryValueFetcher

public class QueryValueFetcher extends Object implements com.sun.jdo.spi.persistence.support.sqlstore.ValueFetcher
Class wrapping the actual query parameters to make them accessible through the ValueFetcher interface.

Fields Summary
protected static final ResourceBundle
messages
I18N support
private Object[]
parameters
The actual parameter values.
Constructors Summary
public QueryValueFetcher(Object[] parameters)
Constructor.

param
parameters the actual parameter values.

    
                
       
    
        this.parameters = parameters;
    
Methods Summary
public java.lang.ObjectgetValue(int whichOne)
Returns the parameter value for the specified parameter index

param
whichOne the parameter index
return
the parameter value

        if (parameters == null || whichOne >= parameters.length) 
        {
            throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                "jqlc.queryvaluefetcher.getvalue.invalidparam", //NOI18N
                String.valueOf(whichOne),
                String.valueOf((parameters == null) ? 0 : parameters.length)));
        }
        return parameters[whichOne];