org.perfectjpattern.jee.api.integration.dao
Interface IQuery


public interface IQuery

Abstract definition of Query available for the DAO implementation. The DAO API exposes this interface but it will be automatically adapted from the underlying JPA-specific implementation (see IAdapter).

JPA and specific implementations define similar abstractions e.g. Query but despite their similarities, their types actually mismatch making it difficult to provide a generic unified DAO solution.

Note that this is a subset of the functionality that the underlying implementation offers. This is the subset required to make the DAO portable.

Version:
$Revision: 1.0 $Date: Feb 18, 2009 10:31:58 AM $
Author:
Giovanni Azua
 

Method Summary
 int executeUpdate()
          Returns the number of entities updated or deleted.
<E> List<E>
getResultList()
          Returns the query results as a List
 Object getSingleResult()
          Returns the query result as a single result
 

Method Detail

getResultList

<E> List<E> getResultList()
Returns the query results as a List

Returns:
query results as a List

getSingleResult

Object getSingleResult()
Returns the query result as a single result

Returns:
query result as a single result

executeUpdate

int executeUpdate()
Returns the number of entities updated or deleted. Executes an update or delete statement.

Returns:
number of entities updated or deleted


Copyright © 2007-2009. All Rights Reserved.