com.gisgraphy.domain.repository
Class IdGenerator
java.lang.Object
com.gisgraphy.domain.repository.IdGenerator
- All Implemented Interfaces:
- IIdGenerator
@Service
public class IdGenerator
- extends Object
- implements IIdGenerator
Convenience class to generate if (for openstreetmap, geonames) when they are
not provided, in case of custom add. this can be used in multithreading
- Author:
- David Masclet
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FEATUREID_INCREMENT_NO_CONFLICT
public static final long FEATUREID_INCREMENT_NO_CONFLICT
- shift value to allow the addition of geonames features after import
- See Also:
- Constant Field Values
OPENSTREETMAP_GID_NO_CONFLICT
public static final long OPENSTREETMAP_GID_NO_CONFLICT
- shift value to allow the addition of openstreetmap features after import
- See Also:
- Constant Field Values
IdGenerator
public IdGenerator()
getNextFeatureId
public long getNextFeatureId()
- Specified by:
getNextFeatureId
in interface IIdGenerator
getNextGId
public long getNextGId()
- Specified by:
getNextGId
in interface IIdGenerator
getFeatureId
public long getFeatureId()
- Specified by:
getFeatureId
in interface IIdGenerator
getGid
public long getGid()
- Specified by:
getGid
in interface IIdGenerator
sync
@PostConstruct
public void sync()
- Description copied from interface:
IIdGenerator
- synchronise the generator with the database
- Specified by:
sync
in interface IIdGenerator
setGisFeatureDao
public void setGisFeatureDao(IGisFeatureDao gisFeatureDao)
- Parameters:
gisFeatureDao
- the gisFeatureDao to set
setOpenStreetMapDao
public void setOpenStreetMapDao(IOpenStreetMapDao openStreetMapDao)
- Parameters:
openStreetMapDao
- the openStreetMapDao to set
Copyright © 2012. All Rights Reserved.