~ubuntu-branches/ubuntu/wily/apgdiff/wily

« back to all changes in this revision

Viewing changes to src/main/java/cz/startnet/utils/pgdiff/schema/PgSequence.java

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2009-12-02 11:11:33 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20091202111133-k5wrh3zb2pzmbv8c
Tags: 1.4-1
* New upstream version. (Without changelog, I am afraid.)
* Test suite still not enabled as it needs network access. (The junit
  version in Debian needs upgrading.)
* Optimize rules files a bit so debhelper doesn't clean twice, and quilt's
  patch target doesn't prevent build-stamp from working.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * $Id: PgSequence.java 94 2008-09-30 11:07:28Z fordfrog $
3
 
 */
4
1
package cz.startnet.utils.pgdiff.schema;
5
2
 
6
3
import cz.startnet.utils.pgdiff.PgDiffUtils;
7
4
 
8
 
 
9
5
/**
10
6
 * Stores sequence information.
11
7
 *
12
8
 * @author fordfrog
13
 
 * @version $Id: PgSequence.java 94 2008-09-30 11:07:28Z fordfrog $
14
9
 */
15
10
public class PgSequence {
 
11
 
16
12
    /**
17
13
     * Value for CACHE or null if no value is specified.
18
14
     */
19
15
    private String cache;
20
 
 
21
16
    /**
22
17
     * Value for INCREMENT BY or null if no value is specified.
23
18
     */
24
19
    private String increment;
25
 
 
26
20
    /**
27
21
     * Value for MAXVALUE or null if no value is specified.
28
22
     */
29
23
    private String maxValue;
30
 
 
31
24
    /**
32
25
     * Value for MINVALUE or null if no value is specified.
33
26
     */
34
27
    private String minValue;
35
 
 
36
28
    /**
37
29
     * Name of the sequence.
38
30
     */
39
31
    private String name;
40
 
 
41
32
    /**
42
33
     * Value for START WITH or null if no value is specified.
43
34
     */
44
35
    private String startWith;
45
 
 
46
36
    /**
47
37
     * True if CYCLE, false if NO CYCLE.
48
38
     */
156
146
     */
157
147
    public String getDropSQL(final boolean quoteNames) {
158
148
        return "DROP SEQUENCE "
159
 
        + PgDiffUtils.getQuotedName(getName(), quoteNames) + ";";
 
149
                + PgDiffUtils.getQuotedName(getName(), quoteNames) + ";";
160
150
    }
161
151
 
162
152
    /**