01: /**
02: * Objective Database Abstraction Layer (ODAL)
03: * Copyright (c) 2004, The ODAL Development Group
04: * All rights reserved.
05: * For definition of the ODAL Development Group please refer to LICENCE.txt file
06: *
07: * Distributable under LGPL license.
08: * See terms of license at gnu.org.
09: */package com.completex.objective.components.persistency.key.impl;
10:
11: import com.completex.objective.components.log.Log;
12: import com.completex.objective.components.persistency.OdalPersistencyException;
13: import com.completex.objective.components.persistency.Persistency;
14: import com.completex.objective.components.persistency.core.DatabasePolicy;
15: import com.completex.objective.components.persistency.key.SimpleKeyGenerator;
16: import com.completex.objective.components.persistency.transact.Transaction;
17:
18: /**
19: * Bulk Sequence Key Generator with bulkSize = 100
20: *
21: * @author Gennady Krizhevsky
22: */
23: public class SimpleBulkSequenceKeyGenerator100 extends
24: BulkSequenceKeyGenerator100 implements SimpleKeyGenerator {
25:
26: public SimpleBulkSequenceKeyGenerator100(
27: DatabasePolicy databasePolicy, String seqName, Log logger) {
28: super (databasePolicy, logger);
29: delegateKeyGenerator.setSeqName(seqName);
30: }
31:
32: public SimpleBulkSequenceKeyGenerator100() {
33: }
34:
35: public Object getNextKey(Transaction transaction,
36: Persistency persistency) throws OdalPersistencyException {
37: return super.getNextKey(transaction, persistency, null,
38: delegateKeyGenerator.getSeqName());
39: }
40:
41: }
|