public class

Query

extends Object
implements JPACommand
java.lang.Object
   ↳ org.mule.module.jpa.command.Query

Class Overview

Perform a JPA query operation

Summary

Fields
protected Log logger
Public Constructors
Query()
Public Methods
Object execute(EntityManager entityManager, Object payload, Map<String, Object> parameters, Boolean flush)
Performs the JPA operations exposed by implementing classes (ie, persist, merge, etc.)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.mule.module.jpa.command.JPACommand

Fields

protected Log logger

Public Constructors

public Query ()

Public Methods

public Object execute (EntityManager entityManager, Object payload, Map<String, Object> parameters, Boolean flush)

Performs the JPA operations exposed by implementing classes (ie, persist, merge, etc.)

Parameters
entityManager The entityManager
payload The message's payload. Typically an instance of an entity class, but could also be a primary key or query parameters depending on the operation.
parameters Additional parameters to pass to the request
flush If set to true then call flush() on the entityManager
Returns
  • the result of the JPA operation
Throws
Exception