private void updateChunksInProjectVersions ( final DatabaseTransOperator transOperator , final int projectId , final int version , final int chunk ) throws ProjectManagerException { final String UPDATE_PROJECT_NUM_CHUNKS = "UPDATE project_versions SET num_chunks=? WHERE project_id=? AND version=?" ; try { transOperator . update ( UPDATE_PROJECT_NUM_CHUNKS , chunk , projectId , version ) ; transOperator . getConnection ( ) . commit ( ) ; } catch ( final SQLException e ) { logger . error ( "Error updating project " + projectId + " : chunk_num " + chunk , e ) ; throw new ProjectManagerException ( "Error updating project " + projectId + " : chunk_num " + chunk , e ) ; } }
we update num_chunks s actual number to db here .