Package org.teiid.translator.jpa
Class JPQLUpdateExecution
- java.lang.Object
-
- org.teiid.translator.jpa.JPQLBaseExecution
-
- org.teiid.translator.jpa.JPQLUpdateExecution
-
- All Implemented Interfaces:
Execution,UpdateExecution
public class JPQLUpdateExecution extends JPQLBaseExecution implements UpdateExecution
-
-
Field Summary
-
Fields inherited from class org.teiid.translator.jpa.JPQLBaseExecution
enityManager, executionContext, metadata
-
-
Constructor Summary
Constructors Constructor Description JPQLUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, javax.persistence.EntityManager em)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancels the execution abnormally.voidclose()Terminates the execution normally.voidexecute()Execute the associated command.int[]getUpdateCounts()Returns the update counts for the execution.
-
-
-
Constructor Detail
-
JPQLUpdateExecution
public JPQLUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, javax.persistence.EntityManager em)
-
-
Method Detail
-
execute
public void execute() throws TranslatorExceptionDescription copied from interface:ExecutionExecute the associated command. Results will be retrieved through a specific sub-interface call.- Specified by:
executein interfaceExecution- Throws:
TranslatorException
-
getUpdateCounts
public int[] getUpdateCounts() throws DataNotAvailableException, TranslatorExceptionDescription copied from interface:UpdateExecutionReturns the update counts for the execution.
A single positive integer value is expected for non bulk/batch commands.
bulk/batch should return an integer for each value/command. 0 or greater for successful update count, -2 for no info, -3 failure- Specified by:
getUpdateCountsin interfaceUpdateExecution- Returns:
- the update counts corresponding to the command executed
- Throws:
DataNotAvailableExceptionTranslatorException
-
close
public void close()
Description copied from interface:ExecutionTerminates the execution normally.
-
cancel
public void cancel() throws TranslatorExceptionDescription copied from interface:ExecutionCancels the execution abnormally. This will happen via a different thread from the one performing the execution, so should be expected to happen in a multi-threaded scenario.- Specified by:
cancelin interfaceExecution- Throws:
TranslatorException
-
-