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.PersistentObject;
12:
13: /**
14: * Factory of SimpleNaturalKey objects
15: *
16: * @see SimpleNaturalKey
17: *
18: * @author Gennady Krizhevsky
19: */
20: public interface SimpleNaturalKeyFactory {
21:
22: /**
23: * Creates SimpleNaturalKey based on PersistentObject and its key column indeces
24: *
25: * @param persistent parent PersistentObject
26: * @param keyIndeces key column indeces used to create this key
27: * @return key new key instance
28: */
29: SimpleNaturalKey newSimpleNaturalKey(PersistentObject persistent,
30: int[] keyIndeces);
31:
32: /**
33: * Creates SimpleNaturalKey based on class name and array of values
34: *
35: * @param className class name
36: * @param values array of values
37: * @return key new key instance
38: */
39: SimpleNaturalKey newSimpleNaturalKey(String className,
40: Object[] values);
41: }
|