org.spicefactory.pimento.service.impl
Class DefaultQuery

java.lang.Object
  extended by org.spicefactory.pimento.service.impl.DefaultQuery
All Implemented Interfaces:
Externalizable

public class DefaultQuery
extends Object
implements Externalizable

Default Query implementation.

Author:
Jens Halm

Constructor Summary
DefaultQuery()
           
 
Method Summary
 Object execute(EntityManager em, boolean executeUpdatePermitted)
          Executes this Query using the specified EntityManager and returns the result.
 boolean isNamed()
          Checks whether this instance represents a named query.
 void readExternal(DataInput input)
          Restores the content of this object from the DataInput instance.
 void writeExternal(DataOutput output)
          Saves the content of this object to the DataOutput instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultQuery

public DefaultQuery()
Method Detail

isNamed

public boolean isNamed()
Checks whether this instance represents a named query.

Returns:
true if this instance represents a named query

execute

public Object execute(EntityManager em,
                      boolean executeUpdatePermitted)
Executes this Query using the specified EntityManager and returns the result.

Parameters:
em - the EntityManager instance to use
Returns:
the result of the query

readExternal

public void readExternal(DataInput input)
Description copied from interface: Externalizable
Restores the content of this object from the DataInput instance. Values must be read in the same sequence as they were written on the client side.

Specified by:
readExternal in interface Externalizable
Parameters:
input - the AMF3 data to read from

writeExternal

public void writeExternal(DataOutput output)
Description copied from interface: Externalizable
Saves the content of this object to the DataOutput instance.

Specified by:
writeExternal in interface Externalizable
Parameters:
output - the output to write to