Class AppointmentImportDAO
java.lang.Object
fr.paris.lutece.plugins.appointment.modules.importer.business.AppointmentImportDAO
- All Implemented Interfaces:
IAppointmentImportDAO
@ApplicationScoped
public final class AppointmentImportDAO
extends Object
implements IAppointmentImportDAO
SQL implementation of
IAppointmentImportDAO.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanarchiveBatch(int nBatchId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Archives a batch, if it is still completed.voidarchiveFile(int nFileId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Archives a file and removes its validation report.booleanbatchHasErrors(int nBatchId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Tells whether a row of the batch is in error.booleanclaimBatch(int nId, String strFromStatus, LocalDateTime dtLastExecBefore, String strToken, fr.paris.lutece.portal.service.plugin.Plugin plugin) Takes a batch for processing: moves it fromstrFromStatustoPROCESSINGwith the given token, unless another process took it first.voidcompleteBatchWithoutErrors(int nBatchId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Completes a batch completed with errors that has no row in error any more.voidcompleteFileWithoutErrors(int nFileId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Completes a file completed with errors that has no row in error any more.intcountAppointmentsByBatch(int nBatchId, boolean bProcessedOnly, fr.paris.lutece.portal.service.plugin.Plugin plugin) Counts the rows of a batch.countAppointmentsByBatches(List<Integer> listBatchIds, fr.paris.lutece.portal.service.plugin.Plugin plugin) Counts the rows of the given batches by outcome.countAppointmentsByFiles(List<Integer> listFileIds, fr.paris.lutece.portal.service.plugin.Plugin plugin) Counts the rows of the given files by outcome.voiddeleteAppointmentsByBatch(int nBatchId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Deletes the rows of a batch.voiddeleteFingerprintByAppointment(int nAppointmentId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Deletes the fingerprint of a row.voiddeleteFingerprintsBefore(LocalDate dateBefore, fr.paris.lutece.portal.service.plugin.Plugin plugin) Deletes the fingerprints of the appointments before a date: a line in the past is refused anyway.voiddeleteFingerprintsNotCreatedByBatch(int nBatchId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Deletes the fingerprints of the rows of a batch that did not create their appointment, so that their lines can be imported again.booleanexistsDuplicateFile(String strHash, int nFormId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Tells whether a file with the same content was already accepted for the form.booleanfileAllBatchesArchived(int nFileId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Tells whether every batch of the file is archived.booleanfileHasErrors(int nFileId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Tells whether a row of the file is in error.voidinsertAppointments(List<AppointmentImportAppointment> listAppointments, fr.paris.lutece.portal.service.plugin.Plugin plugin) Inserts the rows of an import.intinsertBatch(AppointmentImportBatch batch, fr.paris.lutece.portal.service.plugin.Plugin plugin) Inserts a new batch.intinsertFile(AppointmentImportFile file, fr.paris.lutece.portal.service.plugin.Plugin plugin) Inserts a new import file record.voidinsertFingerprints(List<AppointmentImportFingerprint> listFingerprints, fr.paris.lutece.portal.service.plugin.Plugin plugin) Inserts fingerprints.loadAppointment(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Loads a row.loadBatch(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Loads a batch.loadFile(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Loads an import file.booleanreassignFingerprint(AppointmentImportFingerprint fingerprint, int nFromAppointmentId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Gives a fingerprint to a new row, if it still belongs to the given row.booleanreplaceAppointment(int nId, String strExcludedErrorCode, String strMessage, fr.paris.lutece.portal.service.plugin.Plugin plugin) Marks a row in error as replaced by a row of another file, unless it was interrupted while its appointment was being saved.booleanrequeueBatch(int nBatchId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Puts a completed or pending batch back in the queue of the daemon; a batch being processed or archived is left as it is.voidrequeueErrorRows(int nBatchId, String strExcludedErrorCode, fr.paris.lutece.portal.service.plugin.Plugin plugin) Puts the rows in error of a batch back to pending, except those with the given error code.voidrequeueRow(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Puts a row in error back to pending.selectAppointmentIdsByFile(int nFileId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Gives the ids of the rows of a file, by line.selectAppointmentsByBatch(int nBatchId, String strStatus, fr.paris.lutece.portal.service.plugin.Plugin plugin) Selects the rows of a batch, by source line.selectBatchesByFile(int nFileId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Selects the batches of a file, by starting date.selectBatchesByIds(List<Integer> listIds, fr.paris.lutece.portal.service.plugin.Plugin plugin) Loads the batches with the given ids, in the order of the list.selectBatchesByStatus(String strStatus, fr.paris.lutece.portal.service.plugin.Plugin plugin) Selects the batches with the given status, oldest first.selectBatchIds(List<Integer> listFormIds, String strFormId, String strStatus, String strFileName, String strDate, fr.paris.lutece.portal.service.plugin.Plugin plugin) Selects the ids of the batches matching the filters, newest first.selectBatchIdsToPurge(LocalDateTime dtBefore, fr.paris.lutece.portal.service.plugin.Plugin plugin) Selects the completed batches last updated before the given date.selectFileIds(List<Integer> listFormIds, String strFormId, String strFileName, String strStatus, String strDate, fr.paris.lutece.portal.service.plugin.Plugin plugin) Selects the ids of the files matching the filters, newest first.selectFileIdsToClose(fr.paris.lutece.portal.service.plugin.Plugin plugin) Selects the files still pending whose batches are all done.selectFileNames(List<Integer> listFormIds, fr.paris.lutece.portal.service.plugin.Plugin plugin) Selects the distinct names of the files imported on the given forms.selectFilesByIds(List<Integer> listIds, fr.paris.lutece.portal.service.plugin.Plugin plugin) Loads the files with the given ids, in the order of the list.selectFingerprints(int nFormId, Collection<String> collectionFingerprints, fr.paris.lutece.portal.service.plugin.Plugin plugin) Finds the lines already imported on a form among the given fingerprints, with the file and the row that imported them.selectRejectedFileIdsToPurge(LocalDateTime dtBefore, fr.paris.lutece.portal.service.plugin.Plugin plugin) Selects the files rejected at validation before the given date.voidtouchBatch(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Records that a batch is still being processed.voidupdateAppointment(int nId, String strStatus, String strCode, String strMessage, Integer nAppointmentId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Updates the state of a row.voidupdateAppointmentData(int nId, String strGenericAttributesData, String strFormFieldsData, fr.paris.lutece.portal.service.plugin.Plugin plugin) Replaces the values of a row.voidupdateBatchStatus(int nId, String strStatus, fr.paris.lutece.portal.service.plugin.Plugin plugin) Updates the status of a batch and releases its token.voidupdateFileStatus(int nId, String strStatus, fr.paris.lutece.portal.service.plugin.Plugin plugin) Updates the status of a file.
-
Constructor Details
-
AppointmentImportDAO
public AppointmentImportDAO()
-
-
Method Details
-
insertFile
public int insertFile(AppointmentImportFile file, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOInserts a new import file record.- Specified by:
insertFilein interfaceIAppointmentImportDAO- Parameters:
file- the file to persistplugin- the plugin- Returns:
- the generated
id_import_file
-
loadFile
Description copied from interface:IAppointmentImportDAOLoads an import file.- Specified by:
loadFilein interfaceIAppointmentImportDAO- Parameters:
nId- theid_import_fileplugin- the plugin- Returns:
- the file, or null if not found
-
selectFileIds
public List<Integer> selectFileIds(List<Integer> listFormIds, String strFormId, String strFileName, String strStatus, String strDate, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOSelects the ids of the files matching the filters, newest first.- Specified by:
selectFileIdsin interfaceIAppointmentImportDAO- Parameters:
listFormIds- the forms the files must belong tostrFormId- optional form idstrFileName- optional exact file namestrStatus- optional exact statusstrDate- optional date (yyyy-MM-dd) of a slot of the fileplugin- the plugin- Returns:
- the matching ids
-
selectFilesByIds
public List<AppointmentImportFile> selectFilesByIds(List<Integer> listIds, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOLoads the files with the given ids, in the order of the list.- Specified by:
selectFilesByIdsin interfaceIAppointmentImportDAO- Parameters:
listIds- the idsplugin- the plugin- Returns:
- the files
-
selectFileNames
public List<String> selectFileNames(List<Integer> listFormIds, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOSelects the distinct names of the files imported on the given forms.- Specified by:
selectFileNamesin interfaceIAppointmentImportDAO- Parameters:
listFormIds- the formsplugin- the plugin- Returns:
- the file names, sorted
-
existsDuplicateFile
public boolean existsDuplicateFile(String strHash, int nFormId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOTells whether a file with the same content was already accepted for the form.- Specified by:
existsDuplicateFilein interfaceIAppointmentImportDAO- Parameters:
strHash- the SHA-256 of the contentnFormId- the formplugin- the plugin- Returns:
- true if a duplicate exists
-
updateFileStatus
public void updateFileStatus(int nId, String strStatus, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOUpdates the status of a file.- Specified by:
updateFileStatusin interfaceIAppointmentImportDAO- Parameters:
nId- theid_import_filestrStatus- the new statusplugin- the plugin
-
selectFileIdsToClose
Description copied from interface:IAppointmentImportDAOSelects the files still pending whose batches are all done.- Specified by:
selectFileIdsToClosein interfaceIAppointmentImportDAO- Parameters:
plugin- the plugin- Returns:
- the ids of the files whose status must be computed
-
countAppointmentsByFiles
public Map<Integer,ImportCounts> countAppointmentsByFiles(List<Integer> listFileIds, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOCounts the rows of the given files by outcome.- Specified by:
countAppointmentsByFilesin interfaceIAppointmentImportDAO- Parameters:
listFileIds- the filesplugin- the plugin- Returns:
- the counts of each file that has rows
-
fileHasErrors
public boolean fileHasErrors(int nFileId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOTells whether a row of the file is in error.- Specified by:
fileHasErrorsin interfaceIAppointmentImportDAO- Parameters:
nFileId- theid_import_fileplugin- the plugin- Returns:
- true if at least one row failed
-
fileAllBatchesArchived
public boolean fileAllBatchesArchived(int nFileId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOTells whether every batch of the file is archived.- Specified by:
fileAllBatchesArchivedin interfaceIAppointmentImportDAO- Parameters:
nFileId- theid_import_fileplugin- the plugin- Returns:
- true if no batch is left to archive
-
archiveFile
public void archiveFile(int nFileId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOArchives a file and removes its validation report.- Specified by:
archiveFilein interfaceIAppointmentImportDAO- Parameters:
nFileId- theid_import_fileplugin- the plugin
-
selectRejectedFileIdsToPurge
public List<Integer> selectRejectedFileIdsToPurge(LocalDateTime dtBefore, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOSelects the files rejected at validation before the given date.- Specified by:
selectRejectedFileIdsToPurgein interfaceIAppointmentImportDAO- Parameters:
dtBefore- the thresholdplugin- the plugin- Returns:
- the ids of the files to archive
-
insertBatch
public int insertBatch(AppointmentImportBatch batch, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOInserts a new batch.- Specified by:
insertBatchin interfaceIAppointmentImportDAO- Parameters:
batch- the batchplugin- the plugin- Returns:
- the generated
id_import_batch
-
loadBatch
public AppointmentImportBatch loadBatch(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOLoads a batch.- Specified by:
loadBatchin interfaceIAppointmentImportDAO- Parameters:
nId- theid_import_batchplugin- the plugin- Returns:
- the batch, or null if not found
-
selectBatchesByFile
public List<AppointmentImportBatch> selectBatchesByFile(int nFileId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOSelects the batches of a file, by starting date.- Specified by:
selectBatchesByFilein interfaceIAppointmentImportDAO- Parameters:
nFileId- theid_import_fileplugin- the plugin- Returns:
- the batches
-
selectBatchesByStatus
public List<AppointmentImportBatch> selectBatchesByStatus(String strStatus, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOSelects the batches with the given status, oldest first.- Specified by:
selectBatchesByStatusin interfaceIAppointmentImportDAO- Parameters:
strStatus- the statusplugin- the plugin- Returns:
- the batches
-
selectBatchIds
public List<Integer> selectBatchIds(List<Integer> listFormIds, String strFormId, String strStatus, String strFileName, String strDate, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOSelects the ids of the batches matching the filters, newest first.- Specified by:
selectBatchIdsin interfaceIAppointmentImportDAO- Parameters:
listFormIds- the forms the batches must belong tostrFormId- optional form idstrStatus- optional statusstrFileName- optional file namestrDate- optional starting date (yyyy-MM-dd)plugin- the plugin- Returns:
- the ids
-
selectBatchesByIds
public List<AppointmentImportBatch> selectBatchesByIds(List<Integer> listIds, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOLoads the batches with the given ids, in the order of the list.- Specified by:
selectBatchesByIdsin interfaceIAppointmentImportDAO- Parameters:
listIds- the idsplugin- the plugin- Returns:
- the batches
-
claimBatch
public boolean claimBatch(int nId, String strFromStatus, LocalDateTime dtLastExecBefore, String strToken, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOTakes a batch for processing: moves it fromstrFromStatustoPROCESSINGwith the given token, unless another process took it first.- Specified by:
claimBatchin interfaceIAppointmentImportDAO- Parameters:
nId- theid_import_batchstrFromStatus- the status the batch must still havedtLastExecBefore- if not null, the batch must not have been touched since this datestrToken- the token identifying the callerplugin- the plugin- Returns:
- true if the caller now owns the batch
-
touchBatch
public void touchBatch(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAORecords that a batch is still being processed.- Specified by:
touchBatchin interfaceIAppointmentImportDAO- Parameters:
nId- theid_import_batchplugin- the plugin
-
updateBatchStatus
public void updateBatchStatus(int nId, String strStatus, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOUpdates the status of a batch and releases its token.- Specified by:
updateBatchStatusin interfaceIAppointmentImportDAO- Parameters:
nId- theid_import_batchstrStatus- the new statusplugin- the plugin
-
requeueBatch
public boolean requeueBatch(int nBatchId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOPuts a completed or pending batch back in the queue of the daemon; a batch being processed or archived is left as it is.- Specified by:
requeueBatchin interfaceIAppointmentImportDAO- Parameters:
nBatchId- theid_import_batchplugin- the plugin- Returns:
- true if the batch is now pending, false if it is being processed or archived
-
countAppointmentsByBatches
public Map<Integer,ImportCounts> countAppointmentsByBatches(List<Integer> listBatchIds, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOCounts the rows of the given batches by outcome.- Specified by:
countAppointmentsByBatchesin interfaceIAppointmentImportDAO- Parameters:
listBatchIds- the batchesplugin- the plugin- Returns:
- the counts of each batch that has rows
-
batchHasErrors
public boolean batchHasErrors(int nBatchId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOTells whether a row of the batch is in error.- Specified by:
batchHasErrorsin interfaceIAppointmentImportDAO- Parameters:
nBatchId- theid_import_batchplugin- the plugin- Returns:
- true if at least one row failed
-
selectBatchIdsToPurge
public List<Integer> selectBatchIdsToPurge(LocalDateTime dtBefore, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOSelects the completed batches last updated before the given date.- Specified by:
selectBatchIdsToPurgein interfaceIAppointmentImportDAO- Parameters:
dtBefore- the thresholdplugin- the plugin- Returns:
- the ids
-
archiveBatch
public boolean archiveBatch(int nBatchId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOArchives a batch, if it is still completed.- Specified by:
archiveBatchin interfaceIAppointmentImportDAO- Parameters:
nBatchId- theid_import_batchplugin- the plugin- Returns:
- true if the batch is archived, false if it was retried meanwhile
-
insertAppointments
public void insertAppointments(List<AppointmentImportAppointment> listAppointments, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOInserts the rows of an import.- Specified by:
insertAppointmentsin interfaceIAppointmentImportDAO- Parameters:
listAppointments- the rowsplugin- the plugin
-
selectAppointmentsByBatch
public List<AppointmentImportAppointment> selectAppointmentsByBatch(int nBatchId, String strStatus, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOSelects the rows of a batch, by source line.- Specified by:
selectAppointmentsByBatchin interfaceIAppointmentImportDAO- Parameters:
nBatchId- theid_import_batchstrStatus- optional statusplugin- the plugin- Returns:
- the rows
-
countAppointmentsByBatch
public int countAppointmentsByBatch(int nBatchId, boolean bProcessedOnly, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOCounts the rows of a batch.- Specified by:
countAppointmentsByBatchin interfaceIAppointmentImportDAO- Parameters:
nBatchId- theid_import_batchbProcessedOnly- true to count only the rows created or in errorplugin- the plugin- Returns:
- the count
-
updateAppointment
public void updateAppointment(int nId, String strStatus, String strCode, String strMessage, Integer nAppointmentId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOUpdates the state of a row.- Specified by:
updateAppointmentin interfaceIAppointmentImportDAO- Parameters:
nId- theid_import_appointmentstrStatus- the new statusstrCode- the error code, or nullstrMessage- the error message, or nullnAppointmentId- the created appointment, or nullplugin- the plugin
-
loadAppointment
public AppointmentImportAppointment loadAppointment(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOLoads a row.- Specified by:
loadAppointmentin interfaceIAppointmentImportDAO- Parameters:
nId- theid_import_appointmentplugin- the plugin- Returns:
- the row, or null
-
updateAppointmentData
public void updateAppointmentData(int nId, String strGenericAttributesData, String strFormFieldsData, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOReplaces the values of a row.- Specified by:
updateAppointmentDatain interfaceIAppointmentImportDAO- Parameters:
nId- theid_import_appointmentstrGenericAttributesData- the values of the standard columns, as JSONstrFormFieldsData- the values of the form fields, as JSONplugin- the plugin
-
requeueErrorRows
public void requeueErrorRows(int nBatchId, String strExcludedErrorCode, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOPuts the rows in error of a batch back to pending, except those with the given error code.- Specified by:
requeueErrorRowsin interfaceIAppointmentImportDAO- Parameters:
nBatchId- theid_import_batchstrExcludedErrorCode- the error code of the rows to leave in errorplugin- the plugin
-
requeueRow
public void requeueRow(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOPuts a row in error back to pending.- Specified by:
requeueRowin interfaceIAppointmentImportDAO- Parameters:
nId- theid_import_appointmentplugin- the plugin
-
deleteAppointmentsByBatch
public void deleteAppointmentsByBatch(int nBatchId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAODeletes the rows of a batch.- Specified by:
deleteAppointmentsByBatchin interfaceIAppointmentImportDAO- Parameters:
nBatchId- theid_import_batchplugin- the plugin
-
selectAppointmentIdsByFile
public Map<Integer,Integer> selectAppointmentIdsByFile(int nFileId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOGives the ids of the rows of a file, by line.- Specified by:
selectAppointmentIdsByFilein interfaceIAppointmentImportDAO- Parameters:
nFileId- theid_import_fileplugin- the plugin- Returns:
- the
id_import_appointmentof each line
-
replaceAppointment
public boolean replaceAppointment(int nId, String strExcludedErrorCode, String strMessage, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOMarks a row in error as replaced by a row of another file, unless it was interrupted while its appointment was being saved.- Specified by:
replaceAppointmentin interfaceIAppointmentImportDAO- Parameters:
nId- theid_import_appointmentstrExcludedErrorCode- the error code of the rows that cannot be replacedstrMessage- what replaced the rowplugin- the plugin- Returns:
- true if the row is replaced
-
completeBatchWithoutErrors
public void completeBatchWithoutErrors(int nBatchId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOCompletes a batch completed with errors that has no row in error any more.- Specified by:
completeBatchWithoutErrorsin interfaceIAppointmentImportDAO- Parameters:
nBatchId- theid_import_batchplugin- the plugin
-
completeFileWithoutErrors
public void completeFileWithoutErrors(int nFileId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOCompletes a file completed with errors that has no row in error any more.- Specified by:
completeFileWithoutErrorsin interfaceIAppointmentImportDAO- Parameters:
nFileId- theid_import_fileplugin- the plugin
-
selectFingerprints
public List<AppointmentImportFingerprint> selectFingerprints(int nFormId, Collection<String> collectionFingerprints, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOFinds the lines already imported on a form among the given fingerprints, with the file and the row that imported them.- Specified by:
selectFingerprintsin interfaceIAppointmentImportDAO- Parameters:
nFormId- the formcollectionFingerprints- the fingerprintsplugin- the plugin- Returns:
- the fingerprints found
-
insertFingerprints
public void insertFingerprints(List<AppointmentImportFingerprint> listFingerprints, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOInserts fingerprints. One already there for its form fails: the line was imported meanwhile.- Specified by:
insertFingerprintsin interfaceIAppointmentImportDAO- Parameters:
listFingerprints- the fingerprintsplugin- the plugin
-
reassignFingerprint
public boolean reassignFingerprint(AppointmentImportFingerprint fingerprint, int nFromAppointmentId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAOGives a fingerprint to a new row, if it still belongs to the given row.- Specified by:
reassignFingerprintin interfaceIAppointmentImportDAO- Parameters:
fingerprint- the fingerprint with its new rownFromAppointmentId- theid_import_appointmentof the row it belongs toplugin- the plugin- Returns:
- true if the fingerprint belongs to the new row
-
deleteFingerprintByAppointment
public void deleteFingerprintByAppointment(int nAppointmentId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAODeletes the fingerprint of a row.- Specified by:
deleteFingerprintByAppointmentin interfaceIAppointmentImportDAO- Parameters:
nAppointmentId- theid_import_appointmentplugin- the plugin
-
deleteFingerprintsNotCreatedByBatch
public void deleteFingerprintsNotCreatedByBatch(int nBatchId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAODeletes the fingerprints of the rows of a batch that did not create their appointment, so that their lines can be imported again.- Specified by:
deleteFingerprintsNotCreatedByBatchin interfaceIAppointmentImportDAO- Parameters:
nBatchId- theid_import_batchplugin- the plugin
-
deleteFingerprintsBefore
public void deleteFingerprintsBefore(LocalDate dateBefore, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IAppointmentImportDAODeletes the fingerprints of the appointments before a date: a line in the past is refused anyway.- Specified by:
deleteFingerprintsBeforein interfaceIAppointmentImportDAO- Parameters:
dateBefore- the first date keptplugin- the plugin
-