##### Coverage Report - org.apache.turbine.services.schedule.map.JobEntryMapBuilder

Classes in this File | Line Coverage | Branch Coverage | Complexity
JobEntryMapBuilder |
0% | 0/132
0% | 0/4
| 1.6666666666666667;1,667

1 |  |
     package org.apache.turbine.services.schedule.map;
2 |  |
3 |  |
     import java.util.Date;
4 |  |
     import java.math.BigDecimal;
5 |  |
6 |  |
     import org.apache.torque.Torque;
7 |  |
     import org.apache.torque.TorqueException;
8 |  |
     import org.apache.torque.map.MapBuilder;
9 |  |
     import org.apache.torque.map.DatabaseMap;
10 |  |
     import org.apache.torque.map.TableMap;
11 |  |
     import org.apache.torque.map.ColumnMap;
12 |  |
     import org.apache.torque.map.InheritanceMap;
13 |  |
14 |  |
     /**
15 |  |
       *  This class was autogenerated by Torque on:
16 |  |
       *
17 |  |
       * [Thu Jun 23 17:25:46 CEST 2011]
18 |  |
       *
19 |  |
       */
20 | 0 |
     public class JobEntryMapBuilder implements MapBuilder
21 |  |
     {
22 |  |
         /**
23 |  |
          * The name of this class
24 |  |
          */
25 |  |
         public static final String CLASS_NAME =
26 |  |
             "org.apache.turbine.services.schedule.map.JobEntryMapBuilder";
27 |  |
28 |  |
         /**
29 |  |
          * The database map.
30 |  |
          */
31 | 0 |
         private DatabaseMap dbMap = null;
32 |  |
33 |  |
         /**
34 |  |
          * Tells us if this DatabaseMapBuilder is built so that we
35 |  |
          * don't have to re-build it every time.
36 |  |
          *
37 |  |
          * @return true if this DatabaseMapBuilder is built
38 |  |
          */
39 |  |
         public boolean isBuilt()
40 |  |
         {
41 | 0 |
             return (dbMap != null);
42 |  |
         }
43 |  |
44 |  |
         /**
45 |  |
          * Gets the databasemap this map builder built.
46 |  |
          *
47 |  |
          * @return the databasemap
48 |  |
          */
49 |  |
         public DatabaseMap getDatabaseMap()
50 |  |
         {
51 | 0 |
             return this.dbMap;
52 |  |
         }
53 |  |
54 |  |
         /**
55 |  |
          * The doBuild() method builds the DatabaseMap
56 |  |
          *
57 |  |
          * @throws TorqueException
58 |  |
          */
59 |  |
         public synchronized void doBuild() throws TorqueException
60 |  |
         {
61 | 0 |
             if ( isBuilt() ) {
62 | 0 |
                 return;
63 |  |
             }
64 | 0 |
             dbMap = Torque.getDatabaseMap("default");
65 |  |
66 | 0 |
             dbMap.addTable("TURBINE_SCHEDULED_JOB");
67 | 0 |
             TableMap tMap = dbMap.getTable("TURBINE_SCHEDULED_JOB");
68 | 0 |
             tMap.setJavaName("JobEntry");
69 | 0 |
             tMap.setOMClass( org.apache.turbine.services.schedule.JobEntry.class );
70 | 0 |
             tMap.setPeerClass( org.apache.turbine.services.schedule.JobEntryPeer.class );
71 | 0 |
             tMap.setPrimaryKeyMethod(TableMap.ID_BROKER);
72 | 0 |
             tMap.setPrimaryKeyMethodInfo(tMap.getName());
73 |  |
74 | 0 |
             ColumnMap cMap = null;
75 |  |
76 |  |
77 |  |
       // ------------- Column: JOB_ID --------------------
78 | 0 |
             cMap = new ColumnMap( "JOB_ID", tMap);
79 | 0 |
             cMap.setType( new Integer(0) );
80 | 0 |
             cMap.setTorqueType( "INTEGER" );
81 | 0 |
             cMap.setUsePrimitive(true);
82 | 0 |
             cMap.setPrimaryKey(true);
83 | 0 |
             cMap.setNotNull(true);
84 | 0 |
             cMap.setJavaName( "JobId" );
85 | 0 |
             cMap.setAutoIncrement(false);
86 | 0 |
             cMap.setProtected(false);
87 | 0 |
             cMap.setInheritance("false");
88 | 0 |
             cMap.setPosition(1);
89 | 0 |
             tMap.addColumn(cMap);
90 |  |
       // ------------- Column: SECOND --------------------
91 | 0 |
             cMap = new ColumnMap( "SECOND", tMap);
92 | 0 |
             cMap.setType( new Integer(0) );
93 | 0 |
             cMap.setTorqueType( "INTEGER" );
94 | 0 |
             cMap.setUsePrimitive(true);
95 | 0 |
             cMap.setPrimaryKey(false);
96 | 0 |
             cMap.setNotNull(true);
97 | 0 |
             cMap.setJavaName( "Second" );
98 | 0 |
             cMap.setAutoIncrement(false);
99 | 0 |
             cMap.setProtected(false);
100 | 0 |
             cMap.setDefault("-1");
101 | 0 |
             cMap.setInheritance("false");
102 | 0 |
             cMap.setPosition(2);
103 | 0 |
             tMap.addColumn(cMap);
104 |  |
       // ------------- Column: MINUTE --------------------
105 | 0 |
             cMap = new ColumnMap( "MINUTE", tMap);
106 | 0 |
             cMap.setType( new Integer(0) );
107 | 0 |
             cMap.setTorqueType( "INTEGER" );
108 | 0 |
             cMap.setUsePrimitive(true);
109 | 0 |
             cMap.setPrimaryKey(false);
110 | 0 |
             cMap.setNotNull(true);
111 | 0 |
             cMap.setJavaName( "Minute" );
112 | 0 |
             cMap.setAutoIncrement(false);
113 | 0 |
             cMap.setProtected(false);
114 | 0 |
             cMap.setDefault("-1");
115 | 0 |
             cMap.setInheritance("false");
116 | 0 |
             cMap.setPosition(3);
117 | 0 |
             tMap.addColumn(cMap);
118 |  |
       // ------------- Column: HOUR --------------------
119 | 0 |
             cMap = new ColumnMap( "HOUR", tMap);
120 | 0 |
             cMap.setType( new Integer(0) );
121 | 0 |
             cMap.setTorqueType( "INTEGER" );
122 | 0 |
             cMap.setUsePrimitive(true);
123 | 0 |
             cMap.setPrimaryKey(false);
124 | 0 |
             cMap.setNotNull(true);
125 | 0 |
             cMap.setJavaName( "Hour" );
126 | 0 |
             cMap.setAutoIncrement(false);
127 | 0 |
             cMap.setProtected(false);
128 | 0 |
             cMap.setDefault("-1");
129 | 0 |
             cMap.setInheritance("false");
130 | 0 |
             cMap.setPosition(4);
131 | 0 |
             tMap.addColumn(cMap);
132 |  |
       // ------------- Column: WEEK_DAY --------------------
133 | 0 |
             cMap = new ColumnMap( "WEEK_DAY", tMap);
134 | 0 |
             cMap.setType( new Integer(0) );
135 | 0 |
             cMap.setTorqueType( "INTEGER" );
136 | 0 |
             cMap.setUsePrimitive(true);
137 | 0 |
             cMap.setPrimaryKey(false);
138 | 0 |
             cMap.setNotNull(true);
139 | 0 |
             cMap.setJavaName( "WeekDay" );
140 | 0 |
             cMap.setAutoIncrement(false);
141 | 0 |
             cMap.setProtected(false);
142 | 0 |
             cMap.setDefault("-1");
143 | 0 |
             cMap.setInheritance("false");
144 | 0 |
             cMap.setPosition(5);
145 | 0 |
             tMap.addColumn(cMap);
146 |  |
       // ------------- Column: DAY_OF_MONTH --------------------
147 | 0 |
             cMap = new ColumnMap( "DAY_OF_MONTH", tMap);
148 | 0 |
             cMap.setType( new Integer(0) );
149 | 0 |
             cMap.setTorqueType( "INTEGER" );
150 | 0 |
             cMap.setUsePrimitive(true);
151 | 0 |
             cMap.setPrimaryKey(false);
152 | 0 |
             cMap.setNotNull(true);
153 | 0 |
             cMap.setJavaName( "DayOfMonth" );
154 | 0 |
             cMap.setAutoIncrement(false);
155 | 0 |
             cMap.setProtected(false);
156 | 0 |
             cMap.setDefault("-1");
157 | 0 |
             cMap.setInheritance("false");
158 | 0 |
             cMap.setPosition(6);
159 | 0 |
             tMap.addColumn(cMap);
160 |  |
       // ------------- Column: TASK --------------------
161 | 0 |
             cMap = new ColumnMap( "TASK", tMap);
162 | 0 |
             cMap.setType( "" );
163 | 0 |
             cMap.setTorqueType( "VARCHAR" );
164 | 0 |
             cMap.setUsePrimitive(true);
165 | 0 |
             cMap.setPrimaryKey(false);
166 | 0 |
             cMap.setNotNull(true);
167 | 0 |
             cMap.setJavaName( "Task" );
168 | 0 |
             cMap.setAutoIncrement(false);
169 | 0 |
             cMap.setProtected(false);
170 | 0 |
             cMap.setInheritance("false");
171 | 0 |
             cMap.setSize( 99 );
172 | 0 |
             cMap.setPosition(7);
173 | 0 |
             tMap.addColumn(cMap);
174 |  |
       // ------------- Column: EMAIL --------------------
175 | 0 |
             cMap = new ColumnMap( "EMAIL", tMap);
176 | 0 |
             cMap.setType( "" );
177 | 0 |
             cMap.setTorqueType( "VARCHAR" );
178 | 0 |
             cMap.setUsePrimitive(true);
179 | 0 |
             cMap.setPrimaryKey(false);
180 | 0 |
             cMap.setNotNull(false);
181 | 0 |
             cMap.setJavaName( "Email" );
182 | 0 |
             cMap.setAutoIncrement(false);
183 | 0 |
             cMap.setProtected(false);
184 | 0 |
             cMap.setInheritance("false");
185 | 0 |
             cMap.setSize( 99 );
186 | 0 |
             cMap.setPosition(8);
187 | 0 |
             tMap.addColumn(cMap);
188 |  |
       // ------------- Column: PROPERTY --------------------
189 | 0 |
             cMap = new ColumnMap( "PROPERTY", tMap);
190 | 0 |
             cMap.setType( new Object() );
191 | 0 |
             cMap.setTorqueType( "VARBINARY" );
192 | 0 |
             cMap.setUsePrimitive(true);
193 | 0 |
             cMap.setPrimaryKey(false);
194 | 0 |
             cMap.setNotNull(false);
195 | 0 |
             cMap.setJavaName( "Property" );
196 | 0 |
             cMap.setAutoIncrement(false);
197 | 0 |
             cMap.setProtected(false);
198 | 0 |
             cMap.setInheritance("false");
199 | 0 |
             cMap.setPosition(9);
200 | 0 |
             tMap.addColumn(cMap);
201 | 0 |
             tMap.setUseInheritance(false);
202 | 0 |
         }
203 |  |
     }