Class DbSqlSession

java.lang.Object
org.flowable.common.engine.impl.db.DbSqlSession
All Implemented Interfaces:
Session
Direct Known Subclasses:
ProfilingDbSqlSession

public class DbSqlSession extends Object implements Session
Author:
Tom Baeyens, Joram Barrez
  • Field Details

  • Constructor Details

  • Method Details

    • insert

      public void insert(Entity entity, IdGenerator idGenerator)
    • directInsert

      public int directInsert(String statement, Object parameters)
    • update

      public void update(Entity entity)
    • update

      public void update(String statement, Object parameter)
      Executes a BulkUpdateOperation, with the sql in the statement parameter.
    • directUpdate

      public int directUpdate(String statement, Object parameters)
    • delete

      public void delete(String statement, Object parameter, Class<? extends Entity> entityClass)
      Executes a BulkDeleteOperation, with the sql in the statement parameter. The passed class determines when this operation will be executed: it will be executed depending on the place of the class in the EntityDependencyOrder.
    • delete

      public void delete(Entity entity)
    • selectList

      public List selectList(String statement)
    • selectList

      public List selectList(String statement, Object parameter)
    • selectList

      public List selectList(String statement, Object parameter, Page page)
    • selectList

      public List selectList(String statement, ListQueryParameterObject parameter)
    • selectList

      public List selectList(String statement, ListQueryParameterObject parameter, Class entityClass)
    • selectList

      public List selectList(String statement, Object parameter, int firstResult, int maxResults)
    • selectListNoCacheLoadAndStore

      public List selectListNoCacheLoadAndStore(String statement, Object parameter)
    • selectListWithRawParameterNoCacheLoadAndStore

      public List selectListWithRawParameterNoCacheLoadAndStore(String statement, Object parameter)
    • selectListWithRawParameterNoCacheLoadAndStore

      public List selectListWithRawParameterNoCacheLoadAndStore(String statement, ListQueryParameterObject parameter, Class entityClass)
    • selectListWithRawParameterNoCacheLoadAndStore

      public List selectListWithRawParameterNoCacheLoadAndStore(String statement, ListQueryParameterObject parameter)
    • selectListNoCacheLoadAndStore

      public List selectListNoCacheLoadAndStore(String statement, ListQueryParameterObject parameter, Class entityClass)
    • selectListNoCacheLoadAndStore

      public List selectListNoCacheLoadAndStore(String statement, ListQueryParameterObject parameter)
    • selectListWithRawParameter

      public List selectListWithRawParameter(String statement, Object parameter)
    • queryWithRawParameter

      public List queryWithRawParameter(String statement, CacheAwareQuery parameter, Class entityClass, boolean cacheLoadAndStore)
    • queryWithRawParameterNoCacheLoadAndStore

      public List queryWithRawParameterNoCacheLoadAndStore(String statement, CacheAwareQuery parameter, Class entityClass)
    • selectListWithRawParameter

      public List selectListWithRawParameter(String statement, Object parameter, boolean useCache)
    • selectOne

      public Object selectOne(String statement, Object parameter)
    • selectById

      public <T extends Entity> T selectById(Class<T> entityClass, String id)
    • selectById

      public <T extends Entity> T selectById(Class<T> entityClass, String id, boolean useCache)
    • cacheLoadOrStore

      protected List cacheLoadOrStore(List<Object> loadedObjects, Object parameter)
    • cacheLoadOrStore

      protected Entity cacheLoadOrStore(Entity entity, Object parameter)
      Returns the object in the cache. If this object was loaded before, then the original object is returned (the cached version is more recent). If this is the first time this object is loaded, then the loadedObject is added to the cache.
    • flush

      public void flush()
      Specified by:
      flush in interface Session
    • removeUnnecessaryOperations

      protected void removeUnnecessaryOperations()
      Clears all deleted and inserted objects from the cache, and removes inserts and deletes that cancel each other. Also removes deletes with duplicate ids.
    • determineUpdatedObjects

      public void determineUpdatedObjects()
    • debugFlush

      protected void debugFlush()
    • isEntityInserted

      public boolean isEntityInserted(Entity entity)
    • isEntityInserted

      public boolean isEntityInserted(Class<?> entityClass, String entityId)
    • isEntityToBeDeleted

      public boolean isEntityToBeDeleted(Entity entity)
    • flushInserts

      protected void flushInserts()
    • flushInsertEntities

      protected void flushInsertEntities(Class<? extends Entity> entityClass, Collection<Entity> entitiesToInsert)
    • flushRegularInsert

      protected void flushRegularInsert(Entity entity, Class<? extends Entity> clazz)
    • flushBulkInsert

      protected void flushBulkInsert(Collection<Entity> entities, Class<? extends Entity> clazz)
    • incrementRevision

      protected void incrementRevision(Entity insertedObject)
    • flushUpdates

      protected void flushUpdates()
    • flushUpdateEntity

      protected void flushUpdateEntity(Entity updatedObject)
    • flushBulkUpdate

      protected void flushBulkUpdate(BulkUpdateOperation bulkUpdateOperation)
    • flushDeletes

      protected void flushDeletes()
    • flushBulkDeletes

      protected void flushBulkDeletes(Class<? extends Entity> entityClass, List<BulkDeleteOperation> deleteOperations)
    • flushDeleteEntities

      protected void flushDeleteEntities(Class<? extends Entity> entityClass, Collection<Entity> entitiesToDelete)
    • close

      public void close()
      Specified by:
      close in interface Session
    • commit

      public void commit()
    • rollback

      public void rollback()
    • getCustomMapper

      public <T> T getCustomMapper(Class<T> type)
    • getSqlSession

      public org.apache.ibatis.session.SqlSession getSqlSession()
    • getDbSqlSessionFactory

      public DbSqlSessionFactory getDbSqlSessionFactory()
    • getConnectionMetadataDefaultCatalog

      public String getConnectionMetadataDefaultCatalog()
    • setConnectionMetadataDefaultCatalog

      public void setConnectionMetadataDefaultCatalog(String connectionMetadataDefaultCatalog)
    • getConnectionMetadataDefaultSchema

      public String getConnectionMetadataDefaultSchema()
    • setConnectionMetadataDefaultSchema

      public void setConnectionMetadataDefaultSchema(String connectionMetadataDefaultSchema)