Class PersistenceUpdateProcessor<T>
java.lang.Object
org.eclipse.dirigible.database.persistence.processors.AbstractPersistenceProcessor
org.eclipse.dirigible.database.persistence.processors.entity.PersistenceUpdateProcessor<T>
- Type Parameters:
T- the generic type
- All Implemented Interfaces:
IPersistenceProcessor
public class PersistenceUpdateProcessor<T> extends AbstractPersistenceProcessor
The Persistence Update Processor.
-
Constructor Summary
Constructors Constructor Description PersistenceUpdateProcessor(IEntityManagerInterceptor entityManagerInterceptor)Instantiates a new persistence update processor. -
Method Summary
Modifier and Type Method Description protected StringgenerateScript(Connection connection, PersistenceTableModel tableModel)Generate script.protected booleanshouldSetColumnValue(PersistenceTableColumnModel columnModel)Should set column value.intupdate(Connection connection, PersistenceTableModel tableModel, T pojo)Update.Methods inherited from class org.eclipse.dirigible.database.persistence.processors.AbstractPersistenceProcessor
closePreparedStatement, getEntityManagerInterceptor, getPrimaryKey, getPrimaryKeyModel, getValueFromPojo, openPreparedStatement, setEntityManagerInterceptor, setValue, setValue, setValuePrimaryKey, setValuesFromPojo, setValueToPojo, setValueToPojo
-
Constructor Details
-
PersistenceUpdateProcessor
Instantiates a new persistence update 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
-
update
public int update(Connection connection, PersistenceTableModel tableModel, T pojo) throws PersistenceExceptionUpdate.- Parameters:
connection- the connectiontableModel- the table modelpojo- the pojo- Returns:
- the int
- Throws:
PersistenceException- the persistence exception
-
shouldSetColumnValue
Description copied from class:AbstractPersistenceProcessorShould set column value.- Overrides:
shouldSetColumnValuein classAbstractPersistenceProcessor- Parameters:
columnModel- the column model- Returns:
- true, if successful
-