Package net.solarnetwork.node.job
Class DatumDaoBulkUploadJob
java.lang.Object
net.solarnetwork.service.support.BasicIdentifiable
net.solarnetwork.node.service.support.BaseIdentifiable
net.solarnetwork.node.job.DatumDaoBulkUploadJob
- All Implemented Interfaces:
JobService,net.solarnetwork.service.Identifiable,net.solarnetwork.settings.SettingSpecifierProvider
Job to query a
DatumDao for datum to upload via a
BulkUploadService.
This job will call DatumDao.getDatumNotUploaded(String) for datum to
upload and pass them to
BulkUploadService.uploadBulkDatum(java.util.Collection). For each
non-null BulkUploadResult.getId() tracking ID returned, the
associated BulkUploadResult.getDatum() will be passed to
DatumDao.setDatumUploaded(NodeDatum, Instant, String, String) method
so it can be marked as uploaded.
- Version:
- 3.0
- Author:
- matt
-
Field Summary
Fields inherited from class net.solarnetwork.node.service.support.BaseIdentifiable
logFields inherited from interface net.solarnetwork.service.Identifiable
GROUP_UID_PROPERTY, UID_PROPERTY -
Constructor Summary
ConstructorsConstructorDescriptionDatumDaoBulkUploadJob(DatumDao dao, BulkUploadService uploadService) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidExecute the service job.List<net.solarnetwork.settings.SettingSpecifier>Methods inherited from class net.solarnetwork.node.service.support.BaseIdentifiable
baseIdentifiableSettings, baseIdentifiableSettings, getExpressionServices, getPlaceholderService, populateExpressionDatumProperties, resolvePlaceholders, resolvePlaceholders, setExpressionServices, setPlaceholderServiceMethods inherited from class net.solarnetwork.service.support.BasicIdentifiable
basicIdentifiableMetadataSettings, basicIdentifiableSettings, basicIdentifiableSettings, basicIdentifiableSettings, doubleMetadataValue, getDisplayName, getGroupUid, getGroupUID, getMessageSource, getMetadata, getMetadataCount, getUid, getUID, integerMetadataValue, metadataValue, numberMetadataValue, saveMetadataValue, saveMetadataValue, setDisplayName, setGroupUid, setGroupUID, setMessageSource, setMetadata, setMetadataCount, setUid, setUID, smartMetadataValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.solarnetwork.service.Identifiable
getDisplayName, getGroupUid, getUidMethods inherited from interface net.solarnetwork.settings.SettingSpecifierProvider
getDisplayName, getMessageSource
-
Constructor Details
-
DatumDaoBulkUploadJob
Constructor.- Parameters:
dao- the DAO to useuploadService- the upload service to use- Throws:
IllegalArgumentException- if any argument is null
-
-
Method Details
-
getSettingUid
- Specified by:
getSettingUidin interfacenet.solarnetwork.settings.SettingSpecifierProvider
-
getSettingSpecifiers
- Specified by:
getSettingSpecifiersin interfacenet.solarnetwork.settings.SettingSpecifierProvider
-
executeJobService
Description copied from interface:JobServiceExecute the service job.- Specified by:
executeJobServicein interfaceJobService- Throws:
Exception- if anything goes wrong
-