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;
10:
11: import com.completex.objective.components.persistency.OdalPersistencyException;
12: import com.completex.objective.components.persistency.Persistency;
13: import com.completex.objective.components.persistency.Record;
14: import com.completex.objective.components.persistency.transact.Transaction;
15:
16: /**
17: * Stand-alone key generator
18: *
19: * @author Gennady Krizhevsky
20: */
21: public interface KeyGenerator {
22:
23: /**
24: * Generate next key value
25: *
26: * @param transaction transaction
27: * @param persistency persistency
28: * @param record record
29: * @return next key value
30: * @throws OdalPersistencyException
31: */
32: Object getNextKey(Transaction transaction, Persistency persistency,
33: Record record) throws OdalPersistencyException;
34:
35: /**
36: * Generate next key value
37: *
38: * @param transaction
39: * @param persistency
40: * @param record
41: * @param dynamicParameters
42: * @return next key value
43: * @throws OdalPersistencyException
44: */
45: Object getNextKey(Transaction transaction, Persistency persistency,
46: Record record, Object dynamicParameters)
47: throws OdalPersistencyException;
48:
49: }
|