01: /*
02: * Helma License Notice
03: *
04: * The contents of this file are subject to the Helma License
05: * Version 2.0 (the "License"). You may not use this file except in
06: * compliance with the License. A copy of the License is available at
07: * http://adele.helma.org/download/helma/license.txt
08: *
09: * Copyright 1998-2003 Helma Software. All Rights Reserved.
10: *
11: * $RCSfile$
12: * $Author: root $
13: * $Revision: 8604 $
14: * $Date: 2007-09-28 15:16:38 +0200 (Fre, 28 Sep 2007) $
15: */
16:
17: package helma.objectmodel.db;
18:
19: import helma.framework.core.Application;
20:
21: /**
22: * An interface for objects that generate IDs (Strings) that are
23: * unique for a specific type.
24: */
25: public interface IDGenerator {
26:
27: /**
28: * Init the ID generator for the given application.
29: *
30: * @param app
31: */
32: public void init(Application app);
33:
34: /**
35: * Shut down the ID generator.
36: */
37: public void shutdown();
38:
39: /**
40: * Generate a new ID for a specific type.
41: *
42: * @param dbmap
43: * @return
44: */
45: public String generateID(DbMapping dbmap) throws Exception;
46:
47: }
|