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.core.DatabasePolicy;
13:
14: /**
15: * Bulk Sequence Key Generator with bulk size 100
16: * Uses SimpleSequenceKeyGeneratorImpl as a delegate one
17: * @see BulkSequenceKeyGeneratorImpl
18: * @see SimpleSequenceKeyGeneratorImpl
19: *
20: * @author Gennady Krizhevsky
21: */
22: public class BulkSequenceKeyGenerator100 extends
23: BulkSequenceKeyGeneratorImpl {
24: private static final int BULK_SIZE = 100;
25:
26: public BulkSequenceKeyGenerator100(DatabasePolicy databasePolicy,
27: Log log) {
28: super (new SimpleSequenceKeyGeneratorImpl(databasePolicy, null,
29: log), databasePolicy, BULK_SIZE, 0, log);
30: }
31:
32: public BulkSequenceKeyGenerator100() {
33: delegateKeyGenerator = new SimpleSequenceKeyGeneratorImpl();
34: setBulkSize(BULK_SIZE);
35: }
36:
37: }
|