1   /*
2    * Copyright 2003 - 2013 The eFaps Team
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   *
16   * Revision:        $Rev$
17   * Last Changed:    $Date$
18   * Last Changed By: $Author$
19   */
20  
21  package org.efaps.update;
22  
23  /**
24   * All steps used within update life cycle.
25   *
26   * @author The eFaps Team
27   * @version $Id$
28   */
29  public enum UpdateLifecycle
30  {
31      /**
32       * SQL tables are created.
33       */
34      SQL_CREATE_TABLE(1),
35  
36      /**
37       * The ID of the SQL tables are correct defined (auto increment or as
38       * foreign key to another SQL table).
39       */
40      SQL_UPDATE_ID(2),
41  
42      /**
43       * SQL tables are updated (with columns, foreign keys etc.).
44       */
45      SQL_UPDATE_TABLE(3),
46  
47      /**
48       * Embedded SQL scripts are executed.
49       */
50      SQL_RUN_SCRIPT(4),
51  
52      /**
53       * The Types for the Status Groups are created.
54       */
55      STATUSGROUP_CREATE(5),
56  
57      /**
58       * The Status Groups are updated (e.g. Parent-Child relation).
59       */
60      STATUSGROUP_UPDATE(6),
61  
62      /**
63       * The Stati for the Status Groups are created.
64       */
65      STATUS_CREATE(7),
66  
67      /**
68       * eFaps data model is created.
69       */
70      EFAPS_CREATE(8),
71  
72      /**
73       * eFaps data model is updated.
74       */
75      EFAPS_UPDATE(9),
76  
77      /**
78       * DBProperties are updated.
79       */
80      DBPROPERTIES_UPDATE(10);
81  
82      /**
83       * Number representing the order of this UpdateLifecycle.
84       */
85      private final int order;
86  
87      /**
88       * @param _order value for the order
89       */
90      UpdateLifecycle(final int _order)
91      {
92          this.order = _order;
93      }
94  
95      /**
96       * Getter method for instance variable {@link #order}.
97       *
98       * @return value of instance variable {@link #order}
99       */
100     public Integer getOrder()
101     {
102         return this.order;
103     }
104 }