Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.io.datastore.idgenerator
Class IdGenerator

    java.lang.Object
      org.deegree.io.datastore.idgenerator.IdGenerator

Direct Known Subclasses:
  DBMaxIdGenerator, DBSeqIdGenerator, ParentIDGenerator, UUIDGenerator

    public abstract class IdGenerator

extends Object

Abstract base class for generators that are used to create primary keys (especially `FeatureId`s).

Version:
  $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
  Markus Schneider , last edited by: $Author: mschneider $

Field Summary
`protected MappedFeatureType` | `ft` `MappedFeatureType` that this generator is bound to.
`protected Properties` | `params` Configuration properties.
`static String` | `TYPE_UUID` Default generator type based on UUIDs.

Constructor Summary
`protected` | `IdGenerator(Properties params)` Creates a new `IdGenerator` instance.

Method Summary
`static IdGenerator` | `getInstance(String type, Properties params)` Returns a concrete `IdGenerator` instance which is identified by the given type code.
`abstract Object` | `getNewId(DatastoreTransaction ta)` Returns a new primary key.
`abstract FeatureId` | `getNewId(MappedFeatureType ft, DatastoreTransaction ta)` Returns a new id for a feature of the given type.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TYPE_UUID

    public static String TYPE_UUID

  Default generator type based on UUIDs.

### params

    protected Properties params

  Configuration properties.

### ft

    protected MappedFeatureType ft

  `MappedFeatureType` that this generator is bound to.

Constructor Detail

### IdGenerator

    protected IdGenerator(Properties params)

  Creates a new `IdGenerator` instance.

  Parameters:
    `params` - configuration parameters

Method Detail

### getNewId

    public abstract Object getNewId(DatastoreTransaction ta)
                             throws IdGenerationException

  Returns a new primary key.

  Parameters:
    `ta` - datastore transaction (context)
  Returns:
    a new primary key.
  Throws:
    `IdGenerationException` - if the generation of the id could not be performed

### getNewId

    public abstract FeatureId getNewId(MappedFeatureType ft,
                                       DatastoreTransaction ta)
                                throws IdGenerationException

  Returns a new id for a feature of the given type.

  Parameters:
    `ft` - feature type
    `ta` - datastore transaction (context)
  Returns:
    a new feature id.
  Throws:
    `IdGenerationException`

### getInstance

    public static final IdGenerator getInstance(String type,
                                                Properties params)

  Returns a concrete `IdGenerator` instance which is identified by the given type code.

  Parameters:
    `type` - type code
    `params` - initialization parameters for the IdGenerator
  Returns:
    concrete IdGenerator instance

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org