Class PersistenceInsertProcessor<T>
java.lang.Object
org.eclipse.dirigible.database.persistence.processors.AbstractPersistenceProcessor
org.eclipse.dirigible.database.persistence.processors.entity.PersistenceInsertProcessor<T>
- Type Parameters:
T- the entity type
- All Implemented Interfaces:
IPersistenceProcessor
public class PersistenceInsertProcessor<T> extends AbstractPersistenceProcessor
The Persistence Insert Processor.
-
Constructor Summary
Constructors Constructor Description PersistenceInsertProcessor(IEntityManagerInterceptor entityManagerInterceptor)Instantiates a new persistence insert processor. -
Method Summary
Modifier and Type Method Description protected StringgenerateScript(Connection connection, PersistenceTableModel tableModel)Generate script.Objectinsert(Connection connection, PersistenceTableModel tableModel, T pojo)Insert.Methods inherited from class org.eclipse.dirigible.database.persistence.processors.AbstractPersistenceProcessor
closePreparedStatement, getEntityManagerInterceptor, getPrimaryKey, getPrimaryKeyModel, getValueFromPojo, openPreparedStatement, setEntityManagerInterceptor, setValue, setValue, setValuePrimaryKey, setValuesFromPojo, setValueToPojo, setValueToPojo, shouldSetColumnValue
-
Constructor Details
-
PersistenceInsertProcessor
Instantiates a new persistence insert processor.- Parameters:
entityManagerInterceptor- the entity manager interceptor
-
-
Method Details
-
generateScript
Description copied from class:AbstractPersistenceProcessorGenerate script.- Specified by:
generateScriptin classAbstractPersistenceProcessor- Parameters:
connection- the connectiontableModel- the table model- Returns:
- the string
-
insert
public Object insert(Connection connection, PersistenceTableModel tableModel, T pojo) throws PersistenceExceptionInsert.- Parameters:
connection- the connectiontableModel- the table modelpojo- the pojo- Returns:
- the identifier of the inserted pojo
- Throws:
PersistenceException- the persistence exception
-