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 java.util.Map;
12:
13: /**
14: * @author Gennady Krizhevsky
15: */
16: public abstract class AbstractSimpleSequenceKeyGenerator extends
17: AbstractSequenceKeyGenerator {
18:
19: /**
20: * @see AbstractKeyGenerator#setStaticParameters(Object)
21: */
22: public void setStaticParameters(Object staticParameters) {
23: super .setStaticParameters(staticParameters);
24: if (staticParameters == null) {
25: throw new NullPointerException(
26: "SimpleBulkSequenceKeyGenerator100::setStaticParameters: parameters == null");
27: }
28: Map parameters = (Map) staticParameters;
29: String seqName = (String) parameters.get(SEQ_KEY);
30: if (seqName == null) {
31: throw new IllegalArgumentException(
32: "Cannot find required parameter by key [" + SEQ_KEY
33: + "]");
34: }
35: setSeqName(seqName);
36: }
37: }
|