Class PersistenceDeleteProcessor<T>
java.lang.Object
org.eclipse.dirigible.database.persistence.processors.AbstractPersistenceProcessor
org.eclipse.dirigible.database.persistence.processors.entity.PersistenceDeleteProcessor<T>
- Type Parameters:
T- the generic type
- All Implemented Interfaces:
IPersistenceProcessor
public class PersistenceDeleteProcessor<T> extends AbstractPersistenceProcessor
The Persistence Delete Processor.
-
Constructor Summary
Constructors Constructor Description PersistenceDeleteProcessor(IEntityManagerInterceptor entityManagerInterceptor)Instantiates a new persistence delete processor. -
Method Summary
Modifier and Type Method Description intdelete(Connection connection, PersistenceTableModel tableModel, Class<T> clazz, Object id)Delete.intdeleteAll(Connection connection, PersistenceTableModel tableModel, Class<T> clazz)Delete all.protected StringgenerateScript(Connection connection, PersistenceTableModel tableModel)Generate script.protected StringgenerateScriptDelete(Connection connection, PersistenceTableModel tableModel)Generate script delete.protected StringgenerateScriptDeleteAll(Connection connection, PersistenceTableModel tableModel)Generate script delete all.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
-
PersistenceDeleteProcessor
Instantiates a new persistence delete 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
-
generateScriptDelete
Generate script delete.- Parameters:
connection- the connectiontableModel- the table model- Returns:
- the string
-
generateScriptDeleteAll
Generate script delete all.- Parameters:
connection- the connectiontableModel- the table model- Returns:
- the string
-
delete
public int delete(Connection connection, PersistenceTableModel tableModel, Class<T> clazz, Object id) throws PersistenceExceptionDelete.- Parameters:
connection- the connectiontableModel- the table modelclazz- the clazzid- the id- Returns:
- the int
- Throws:
PersistenceException- the persistence exception
-
deleteAll
public int deleteAll(Connection connection, PersistenceTableModel tableModel, Class<T> clazz) throws PersistenceExceptionDelete all.- Parameters:
connection- the connectiontableModel- the table modelclazz- the clazz- Returns:
- the int
- Throws:
PersistenceException- the persistence exception
-