~ubuntu-branches/ubuntu/wily/libhibernate3-java/wily-proposed

« back to all changes in this revision

Viewing changes to src/org/hibernate/id/enhanced/DatabaseStructure.java

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-10-14 14:43:34 UTC
  • Revision ID: james.westby@ubuntu.com-20071014144334-eamc8i0q10gs1aro
Tags: upstream-3.2.5
ImportĀ upstreamĀ versionĀ 3.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.hibernate.id.enhanced;
 
2
 
 
3
import org.hibernate.engine.SessionImplementor;
 
4
import org.hibernate.dialect.Dialect;
 
5
 
 
6
/**
 
7
 * Encapsulates definition of the underlying data structure backing a
 
8
 * sequence-style generator.
 
9
 *
 
10
 * @author Steve Ebersole
 
11
 */
 
12
public interface DatabaseStructure {
 
13
        /**
 
14
         * The name of the database structure (table or sequence).
 
15
         * @return The structure name.
 
16
         */
 
17
        public String getName();
 
18
 
 
19
        /**
 
20
         * How many times has this structure been accessed through this reference?
 
21
         * @return The number of accesses.
 
22
         */
 
23
        public int getTimesAccessed();
 
24
 
 
25
        /**
 
26
         * The configured increment size
 
27
         * @return The configured increment size
 
28
         */
 
29
        public int getIncrementSize();
 
30
 
 
31
        /**
 
32
         * A callback to be able to get the next value from the underlying
 
33
         * structure as needed.
 
34
         *
 
35
         * @param session The session.
 
36
         * @return The next value.
 
37
         */
 
38
        public AccessCallback buildCallback(SessionImplementor session);
 
39
 
 
40
        /**
 
41
         * Prepare this structure for use.  Called sometime after instantiation,
 
42
         * but before first use.
 
43
         *
 
44
         * @param optimizer The optimizer being applied to the generator.
 
45
         */
 
46
        public void prepare(Optimizer optimizer);
 
47
 
 
48
        /**
 
49
         * Commands needed to create the underlying structures.
 
50
         * @param dialect The database dialect being used.
 
51
         * @return The creation commands.
 
52
         */
 
53
        public String[] sqlCreateStrings(Dialect dialect);
 
54
 
 
55
        /**
 
56
         * Commands needed to drop the underlying structures.
 
57
         * @param dialect The database dialect being used.
 
58
         * @return The drop commands.
 
59
         */
 
60
        public String[] sqlDropStrings(Dialect dialect);
 
61
}
 
 
b'\\ No newline at end of file'