Class RunGeoLocationBatchJob
java.lang.Object
ch.tocco.nice2.tasks.api.quartz.AbstractJob
ch.tocco.nice2.tasks.api.quartz.AbstractInterruptableJob
ch.tocco.nice2.optional.geolocation.impl.batch.RunGeoLocationBatchJob
- All Implemented Interfaces:
org.quartz.InterruptableJob
,org.quartz.Job
Updates all entities where geographic coordinates should be updated
for a certain address. The entities to taken into account and the
relevant address fields can be defined via a `GeoLocationEntities`
contribution.
- See Also:
-
Field Summary
Fields inherited from class ch.tocco.nice2.tasks.api.quartz.AbstractJob
businessUnitManager, l10N, logger, principalManager, securityManager
-
Constructor Summary
ConstructorDescriptionRunGeoLocationBatchJob
(GeolocListenerService geolocListenerService, CommandExecutor commandExecutor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
doExecute
(org.quartz.JobExecutionContext context, JobDataMapReader jobDataMapReader) void
setAlwaysIncludeCity
(boolean alwaysIncludeCity) Set to true to always include the city of the address in the geolocation query.void
setGeoLocationEntities
(List<GeoLocationEntityContribution> geoLocationEntities) void
setLimit
(int limit) Set limit of entities to process in one job run.void
setTxSize
(int txSize) Set how many entities to process in one transaction.Methods inherited from class ch.tocco.nice2.tasks.api.quartz.AbstractInterruptableJob
interrupt, isCancelled
Methods inherited from class ch.tocco.nice2.tasks.api.quartz.AbstractJob
execute, getProgress, getProgressLog, setBusinessUnitManager, setConverters, setL10N, setLogger, setPrincipalManager, setProgressPersistenceManager, setRuleProviderService, setSecurityManager
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.quartz.Job
execute
-
Constructor Details
-
RunGeoLocationBatchJob
public RunGeoLocationBatchJob(GeolocListenerService geolocListenerService, CommandExecutor commandExecutor)
-
-
Method Details
-
setGeoLocationEntities
@Autowired(required=false) public void setGeoLocationEntities(List<GeoLocationEntityContribution> geoLocationEntities) -
setLimit
@Value("${nice2.optional.geolocation.RunGeoLocationBatchJob.limit}") public void setLimit(int limit) Set limit of entities to process in one job run. -
setTxSize
@Value("${nice2.optional.geolocation.RunGeoLocationBatchJob.txSize}") public void setTxSize(int txSize) Set how many entities to process in one transaction. -
setAlwaysIncludeCity
@Value("${nice2.optional.geolocation.RunGeoLocationBatchJob.alwaysIncludeCity}") public void setAlwaysIncludeCity(boolean alwaysIncludeCity) Set to true to always include the city of the address in the geolocation query. Before, the city was only added, if there was no zip code on the address. However, adding the city too seems to lead to better results. As we need the change in an already released version and we can't just change it for all customer instances (as this would be too risky), this application property was introduced. Also see TOCDEV-8779 and BS-11141 for more details. -
doExecute
- Specified by:
doExecute
in classAbstractJob
-