Class InsertHandler
- java.lang.Object
-
- io.ebeaninternal.server.persist.dml.DmlHandler
-
- io.ebeaninternal.server.persist.dml.InsertHandler
-
- All Implemented Interfaces:
BindableRequest
public class InsertHandler extends DmlHandler
Insert bean handler.
-
-
Constructor Summary
Constructors Constructor Description InsertHandler(PersistRequestBean<?> persist, io.ebeaninternal.server.persist.dml.InsertMeta meta)
Create to handle the insert execution.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind()
Generate and bind the insert statement.int
execute()
Execute non batched insert additionally using getGeneratedKeys if required.boolean
isUpdate()
Return true if this is an update request.-
Methods inherited from class io.ebeaninternal.server.persist.dml.DmlHandler
addBatch, bind, bind, bindNoLog, bindNoLog, close, executeNoBatch, getPersistRequest, now, setIdValue
-
-
-
-
Constructor Detail
-
InsertHandler
public InsertHandler(PersistRequestBean<?> persist, io.ebeaninternal.server.persist.dml.InsertMeta meta)
Create to handle the insert execution.
-
-
Method Detail
-
isUpdate
public boolean isUpdate()
Description copied from interface:BindableRequest
Return true if this is an update request.
-
bind
public void bind() throws SQLException
Generate and bind the insert statement.- Specified by:
bind
in classDmlHandler
- Throws:
SQLException
-
execute
public int execute() throws SQLException, javax.persistence.OptimisticLockException
Execute non batched insert additionally using getGeneratedKeys if required.- Specified by:
execute
in classDmlHandler
- Throws:
SQLException
javax.persistence.OptimisticLockException
-
-