FileDocCategorySizeDatePackage
EJBQLPlaceHolderQuery.javaAPI DocGlassfish v2 API5194Tue May 22 16:54:50 BST 2007oracle.toplink.essentials.queryframework

EJBQLPlaceHolderQuery

public class EJBQLPlaceHolderQuery extends DatabaseQuery
Purpose: A EJB3 placeholder Query object to store EJBQL strings so that processing the string is delayed until Login

author
Chris Delahunt
since
TopLink Java Essentials

Fields Summary
private String
ejbQLString
private Boolean
flushOnExecute
private HashMap
hints
Constructors Summary
public EJBQLPlaceHolderQuery()

    
public EJBQLPlaceHolderQuery(String ejbQLString)

        this.ejbQLString=ejbQLString;
    
public EJBQLPlaceHolderQuery(String name, String ejbql, HashMap hints)

        this.name=name;
        this.ejbQLString=ejbql;
        this.flushOnExecute=null;
        this.hints=hints;
    
public EJBQLPlaceHolderQuery(String name, String ejbql, Boolean flushOnExecute, HashMap hints)

        this.name=name;
        this.ejbQLString=ejbql;
        this.flushOnExecute=flushOnExecute;
        this.hints=hints;
    
Methods Summary
public java.lang.ObjectexecuteDatabaseQuery()
INTERNAL: This should never be called and is only here because it is needed as an extension to DatabaseQuery. An exception should be thrown to warn users, but for now it will process the EJBQL and execute the resulting query instead.

exception
DatabaseException - an error has occurred on the database.
exception
OptimisticLockException - an error has occurred using the optimistic lock feature.
return
- the result of executing the query.

        DatabaseQuery ejbquery = processEjbQLQuery(this.getSession());
        return ejbquery.executeDatabaseQuery();
    
public java.lang.StringgetEJBQLString()
INTERNAL: Add the expression value to be included in the result. EXAMPLE: reportQuery.addItem("name", expBuilder.get("firstName").toUpperCase()); The resultType can be specified to support EJBQL that adheres to the EJB 3.0 spec.

        return ejbQLString;
    
public java.util.HashMapgetHints()
INTERNAL: Accessor methods for hints that would be added to the EJBQuery class and applied to the TopLink query.

        return hints;
    
public oracle.toplink.essentials.queryframework.DatabaseQueryprocessEjbQLQuery(oracle.toplink.essentials.sessions.Session session)

        ClassLoader classloader = session.getDatasourcePlatform().getConversionManager().getLoader();
        DatabaseQuery ejbquery = EJBQueryImpl.buildEJBQLDatabaseQuery(
            this.getName(), ejbQLString,  flushOnExecute, session, hints, classloader);
        ejbquery.setName(this.getName());
        return ejbquery;
    
public voidsetEJBQLString(java.lang.String ejbQLString)

        this.ejbQLString = ejbQLString;
    
public voidsetHints(java.util.HashMap hints)

        this.hints = hints;