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 * [Tue Nov 04 15:53:50 CET 2008]
18 *
19 */
20 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 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 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 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 if ( isBuilt() ) {
62 return;
63 }
64 dbMap = Torque.getDatabaseMap("default");
65
66 dbMap.addTable("TURBINE_SCHEDULED_JOB");
67 TableMap tMap = dbMap.getTable("TURBINE_SCHEDULED_JOB");
68 tMap.setJavaName("JobEntry");
69 tMap.setOMClass( org.apache.turbine.services.schedule.JobEntry.class );
70 tMap.setPeerClass( org.apache.turbine.services.schedule.JobEntryPeer.class );
71 tMap.setPrimaryKeyMethod(TableMap.ID_BROKER);
72 tMap.setPrimaryKeyMethodInfo(tMap.getName());
73
74 ColumnMap cMap = null;
75
76
77
78 cMap = new ColumnMap( "JOB_ID", tMap);
79 cMap.setType( new Integer(0) );
80 cMap.setTorqueType( "INTEGER" );
81 cMap.setUsePrimitive(true);
82 cMap.setPrimaryKey(true);
83 cMap.setNotNull(true);
84 cMap.setJavaName( "JobId" );
85 cMap.setAutoIncrement(false);
86 cMap.setProtected(false);
87 cMap.setInheritance("false");
88 cMap.setPosition(1);
89 tMap.addColumn(cMap);
90
91 cMap = new ColumnMap( "SECOND", tMap);
92 cMap.setType( new Integer(0) );
93 cMap.setTorqueType( "INTEGER" );
94 cMap.setUsePrimitive(true);
95 cMap.setPrimaryKey(false);
96 cMap.setNotNull(true);
97 cMap.setJavaName( "Second" );
98 cMap.setAutoIncrement(false);
99 cMap.setProtected(false);
100 cMap.setDefault("-1");
101 cMap.setInheritance("false");
102 cMap.setPosition(2);
103 tMap.addColumn(cMap);
104
105 cMap = new ColumnMap( "MINUTE", tMap);
106 cMap.setType( new Integer(0) );
107 cMap.setTorqueType( "INTEGER" );
108 cMap.setUsePrimitive(true);
109 cMap.setPrimaryKey(false);
110 cMap.setNotNull(true);
111 cMap.setJavaName( "Minute" );
112 cMap.setAutoIncrement(false);
113 cMap.setProtected(false);
114 cMap.setDefault("-1");
115 cMap.setInheritance("false");
116 cMap.setPosition(3);
117 tMap.addColumn(cMap);
118
119 cMap = new ColumnMap( "HOUR", tMap);
120 cMap.setType( new Integer(0) );
121 cMap.setTorqueType( "INTEGER" );
122 cMap.setUsePrimitive(true);
123 cMap.setPrimaryKey(false);
124 cMap.setNotNull(true);
125 cMap.setJavaName( "Hour" );
126 cMap.setAutoIncrement(false);
127 cMap.setProtected(false);
128 cMap.setDefault("-1");
129 cMap.setInheritance("false");
130 cMap.setPosition(4);
131 tMap.addColumn(cMap);
132
133 cMap = new ColumnMap( "WEEK_DAY", tMap);
134 cMap.setType( new Integer(0) );
135 cMap.setTorqueType( "INTEGER" );
136 cMap.setUsePrimitive(true);
137 cMap.setPrimaryKey(false);
138 cMap.setNotNull(true);
139 cMap.setJavaName( "WeekDay" );
140 cMap.setAutoIncrement(false);
141 cMap.setProtected(false);
142 cMap.setDefault("-1");
143 cMap.setInheritance("false");
144 cMap.setPosition(5);
145 tMap.addColumn(cMap);
146
147 cMap = new ColumnMap( "DAY_OF_MONTH", tMap);
148 cMap.setType( new Integer(0) );
149 cMap.setTorqueType( "INTEGER" );
150 cMap.setUsePrimitive(true);
151 cMap.setPrimaryKey(false);
152 cMap.setNotNull(true);
153 cMap.setJavaName( "DayOfMonth" );
154 cMap.setAutoIncrement(false);
155 cMap.setProtected(false);
156 cMap.setDefault("-1");
157 cMap.setInheritance("false");
158 cMap.setPosition(6);
159 tMap.addColumn(cMap);
160
161 cMap = new ColumnMap( "TASK", tMap);
162 cMap.setType( "" );
163 cMap.setTorqueType( "VARCHAR" );
164 cMap.setUsePrimitive(true);
165 cMap.setPrimaryKey(false);
166 cMap.setNotNull(true);
167 cMap.setJavaName( "Task" );
168 cMap.setAutoIncrement(false);
169 cMap.setProtected(false);
170 cMap.setInheritance("false");
171 cMap.setSize( 99 );
172 cMap.setPosition(7);
173 tMap.addColumn(cMap);
174
175 cMap = new ColumnMap( "EMAIL", tMap);
176 cMap.setType( "" );
177 cMap.setTorqueType( "VARCHAR" );
178 cMap.setUsePrimitive(true);
179 cMap.setPrimaryKey(false);
180 cMap.setNotNull(false);
181 cMap.setJavaName( "Email" );
182 cMap.setAutoIncrement(false);
183 cMap.setProtected(false);
184 cMap.setInheritance("false");
185 cMap.setSize( 99 );
186 cMap.setPosition(8);
187 tMap.addColumn(cMap);
188
189 cMap = new ColumnMap( "PROPERTY", tMap);
190 cMap.setType( new Object() );
191 cMap.setTorqueType( "VARBINARY" );
192 cMap.setUsePrimitive(true);
193 cMap.setPrimaryKey(false);
194 cMap.setNotNull(false);
195 cMap.setJavaName( "Property" );
196 cMap.setAutoIncrement(false);
197 cMap.setProtected(false);
198 cMap.setInheritance("false");
199 cMap.setPosition(9);
200 tMap.addColumn(cMap);
201 tMap.setUseInheritance(false);
202 }
203 }