org.deegree.io.datastore.sql.idgenerator
Class DBMaxIdGenerator
java.lang.Object
org.deegree.io.datastore.idgenerator.IdGenerator
org.deegree.io.datastore.sql.idgenerator.DBMaxIdGenerator
public class DBMaxIdGenerator
- extends IdGenerator
Feature id generator that produces successive (+1) values and retrieves its start value from the
specified table value (the maximum stored in the field).
Please note that aborted transactions will also increase ids, so feature ids may be skipped.
- Version:
- $Revision: 6588 $, $Date: 2007-04-11 17:31:29 +0200 (Mi, 11 Apr 2007) $
- Author:
- Christoph Pollmann, Markus Schneider, last edited by: $Author: mschneider $
Constructor Summary |
DBMaxIdGenerator(java.util.Properties params)
Creates a new DBMaxIdGenerator instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBMaxIdGenerator
public DBMaxIdGenerator(java.util.Properties params)
throws IdGenerationException
- Creates a new
DBMaxIdGenerator
instance.
Supported configuration parameters:
Name |
optional? |
Usage |
table |
no |
name of the table where the id field is stored |
column |
no |
name of the id field |
- Parameters:
params
- configuration parameters
- Throws:
IdGenerationException
getNewId
public java.lang.Object getNewId(DatastoreTransaction ta)
throws IdGenerationException
- Returns a new primary key.
- Specified by:
getNewId
in class IdGenerator
- Parameters:
ta
- datastore transaction (context)
- Returns:
- a new primary key.
- Throws:
IdGenerationException
- if the generation of the id could not be performed
getNewId
public FeatureId getNewId(MappedFeatureType ft,
DatastoreTransaction ta)
throws IdGenerationException
- Returns a new id for a feature of the given type.
- Specified by:
getNewId
in class IdGenerator
- Parameters:
ft
- (mapped) feature typeta
- datastore transaction (context)
- Returns:
- a new feature id.
- Throws:
IdGenerationException
- if the generation of the id could not be performed
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org