Package edu.ucsb.cs156.courses.services
Class GradeHistoryImportServiceImpl
java.lang.Object
edu.ucsb.cs156.courses.services.GradeHistoryImportServiceImpl
- All Implemented Interfaces:
GradeHistoryImportService
@Service
public class GradeHistoryImportServiceImpl
extends Object
implements GradeHistoryImportService
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidflushBuffer(List<GradeHistory> buffer, int batchSize) This method flushes the buffer to the database in batches.voidimportGradesFromUrl(String url, JobContext ctx, int batchSize) voidupdateEntity(PreparedStatement ps, GradeHistory entity)
-
Constructor Details
-
GradeHistoryImportServiceImpl
public GradeHistoryImportServiceImpl()
-
-
Method Details
-
importGradesFromUrl
- Specified by:
importGradesFromUrlin interfaceGradeHistoryImportService- Throws:
Exception
-
flushBuffer
This method flushes the buffer to the database in batches. It is public so that it can be spied on using Mockito in the unit tests.- Parameters:
buffer-batchSize-
-
updateEntity
- Throws:
SQLException
-