org.apache.openjpa.jdbc.kernel
Class FinderQueryImpl

java.lang.Object
  extended by org.apache.openjpa.jdbc.kernel.FinderQueryImpl
All Implemented Interfaces:
FinderQuery<ClassMapping,SelectExecutor,Result>

public class FinderQueryImpl
extends Object
implements FinderQuery<ClassMapping,SelectExecutor,Result>

Implements Finder Query identified by ClassMappping for SelectExecutor that can be executed to generate Result.

Since:
2.0.0
Author:
Pinaki Poddar

Method Summary
 Result execute(OpenJPAStateManager sm, StoreManager store, FetchConfiguration fetch)
          Execute the query for a given instance.
 SelectExecutor getDelegate()
          Gets the value to which this receiver delegates its execution.
 ClassMapping getIdentifier()
          Gets the identifier of this receiver.
 Column[] getPKColumns()
           
 String getQueryString()
          Gets the query string.
(package private) static FinderQueryImpl newFinder(ClassMapping mapping, SelectExecutor select)
          Attempts to construct a FinderQuery from the given Select for the given mapping.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

newFinder

static FinderQueryImpl newFinder(ClassMapping mapping,
                                 SelectExecutor select)
Attempts to construct a FinderQuery from the given Select for the given mapping. The given Select may not be amenable for caching and then a null value is returned.


getIdentifier

public ClassMapping getIdentifier()
Description copied from interface: FinderQuery
Gets the identifier of this receiver.

Specified by:
getIdentifier in interface FinderQuery<ClassMapping,SelectExecutor,Result>

getDelegate

public SelectExecutor getDelegate()
Description copied from interface: FinderQuery
Gets the value to which this receiver delegates its execution.

Specified by:
getDelegate in interface FinderQuery<ClassMapping,SelectExecutor,Result>
Returns:

getQueryString

public String getQueryString()
Description copied from interface: FinderQuery
Gets the query string.

Specified by:
getQueryString in interface FinderQuery<ClassMapping,SelectExecutor,Result>

getPKColumns

public Column[] getPKColumns()

execute

public Result execute(OpenJPAStateManager sm,
                      StoreManager store,
                      FetchConfiguration fetch)
Description copied from interface: FinderQuery
Execute the query for a given instance.

Specified by:
execute in interface FinderQuery<ClassMapping,SelectExecutor,Result>
Parameters:
sm - the StateManager for a given instance carrying the primary key values.
store - the data store against which the query is to be executed.
fetch - fetch parameters
Returns:
the result of execution.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.