@SuppressWarnings("unchecked") public final void storeData(final List data) throws IDBPersistenceException {
  SqlSession session=null;
  int size=data.size();
  int commited=0;
  T dtShortTermLog;
  try {
    session=sqlSessionFactory.openSession(ExecutorType.BATCH,false);
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("Obtained batch transacted SQL session (session: " + session.toString() + ")");
    }
    LoggerMapper<T> persistenceMapper=session.getMapper(mapperInterface);
    for (int i=0; i != size; i++) {
      if ((0 == i % RECORDS_PER_BATCH) && i > 0) {
        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug("storeData([Collection]) : Commiting rows for i=" + i);
        }
        session.commit();
        commited=i;
      }
      if (data.get(i) != null) {
        dtShortTermLog=(T)data.get(i);
        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug("Logging object with ID: " + dtShortTermLog.getId());
        }
        persistenceMapper.insertLog(dtShortTermLog);
      }
    }
    session.commit();
    commited=size;
  }
 catch (  PersistenceException e) {
    LOGGER.error("storeData([Collection]) : Error executing/closing prepared statement for " + data.size() + " dataTags",e);
    try {
      if (session != null) {
        session.rollback();
      }
    }
 catch (    Exception sql) {
      LOGGER.error("storeData([Collection]) : Error rolling back transaction.",sql);
    }
    throw new IDBPersistenceException(e.getMessage(),commited);
  }
 finally {
    try {
      if (session != null) {
        session.close();
      }
    }
 catch (    Exception e) {
      LOGGER.error("storeData([Collection]) : Error closing session.",e);
    }
  }
}

@ SuppressWarnings ( "unchecked" ) public final void storeData ( final List data ) throws IDBPersistenceException { SqlSession session = null ; int size = data . size ( ) ; int commited = 0 ; T dtShortTermLog ; try { session = sqlSessionFactory . openSession ( ExecutorType . BATCH , false ) ; if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Obtained batch transacted SQL session (session: " + session . toString ( ) + ")" ) ; } LoggerMapper < T > persistenceMapper = session . getMapper ( mapperInterface ) ; for ( int i = 0 ; i != size ; i ++ ) { if ( ( 0 == i % RECORDS_PER_BATCH ) && i > 0 ) { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "storeData([Collection]) : Commiting rows for i=" + i ) ; } session . commit ( ) ; commited = i ; } if ( data . get ( i ) != null ) { dtShortTermLog = ( T ) data . get ( i ) ; if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Logging object with ID: " + dtShortTermLog . getId ( ) ) ; } persistenceMapper . insertLog ( dtShortTermLog ) ; } } session . commit ( ) ; commited = size ; } catch ( PersistenceException e ) { LOGGER . error ( "storeData([Collection]) : Error executing/closing prepared statement for " + data . size ( ) + " dataTags" , e ) ; try { if ( session != null ) { session . rollback ( ) ; } } catch ( Exception sql ) { LOGGER . error ( "storeData([Collection]) : Error rolling back transaction." , sql ) ; } throw new IDBPersistenceException ( e . getMessage ( ) , commited ) ; } finally { try { if ( session != null ) { session . close ( ) ; } } catch ( Exception e ) { LOGGER . error ( "storeData([Collection]) : Error closing session." , e ) ; } } }
inserts into the database a set of rows containing the data coming in several ifallback objects
