001package org.apache.turbine.services.schedule;
002
003import java.sql.Connection;
004import java.util.Collection;
005import java.util.List;
006import java.util.Map;
007import java.util.stream.Stream;
008
009import org.apache.torque.NoRowsException;
010import org.apache.torque.TooManyRowsException;
011import org.apache.torque.Column;
012import org.apache.torque.Torque;
013import org.apache.torque.TorqueException;
014import org.apache.torque.adapter.IDMethod;
015import org.apache.torque.criteria.Criteria;
016import org.apache.torque.map.DatabaseMap;
017import org.apache.torque.map.TableMap;
018import org.apache.torque.map.ColumnMap;
019import org.apache.torque.om.mapper.RecordMapper;
020import org.apache.torque.om.ObjectKey;
021import org.apache.torque.util.ColumnValues;
022import org.apache.torque.util.JdbcTypedValue;
023
024
025
026/**
027 * The skeleton for this class was autogenerated by Torque on:
028 *
029 * [Tue Dec 14 09:51:09 CET 2021]
030 *
031 * You should not use this class directly.  It should not even be
032 * extended; all references should be to JobEntryTorquePeer
033 */
034
035@SuppressWarnings("unused")
036public abstract class BaseJobEntryTorquePeer
037{
038    /** The default database name for this class. */
039    public static final String DATABASE_NAME;
040
041     /** The table name for this class. */
042    public static final String TABLE_NAME;
043
044     /** The table map for this class. */
045    public static final TableMap TABLE;
046    /** The column for the JOB_ID field */
047    public static final ColumnMap JOB_ID;
048    /** The column for the SECOND field */
049    public static final ColumnMap SECOND;
050    /** The column for the MINUTE field */
051    public static final ColumnMap MINUTE;
052    /** The column for the HOUR field */
053    public static final ColumnMap HOUR;
054    /** The column for the WEEK_DAY field */
055    public static final ColumnMap WEEK_DAY;
056    /** The column for the DAY_OF_MONTH field */
057    public static final ColumnMap DAY_OF_MONTH;
058    /** The column for the TASK field */
059    public static final ColumnMap TASK;
060    /** The column for the EMAIL field */
061    public static final ColumnMap EMAIL;
062    /** The column for the PROPERTY field */
063    public static final ColumnMap PROPERTY;
064
065    /** number of columns for this peer */
066    public static final int numColumns = 9;
067
068
069    /** The implementation of the peer. */
070    private static JobEntryTorquePeerImpl jobEntryTorquePeerImpl;
071
072
073    static
074    {
075        DatabaseMap dbMap = Torque.getOrCreateDatabase("default")
076                .getDatabaseMap();
077        if (dbMap.getTable("TURBINE_SCHEDULED_JOB") == null)
078        {
079            dbMap.addTable("TURBINE_SCHEDULED_JOB");
080        }
081        DATABASE_NAME = "default";
082        TABLE_NAME = "TURBINE_SCHEDULED_JOB";
083
084        TABLE = dbMap.getTable("TURBINE_SCHEDULED_JOB");
085        TABLE.setJavaName("JobEntryTorque");
086        TABLE.setOMClass(org.apache.turbine.services.schedule.JobEntryTorque.class);
087        TABLE.setPeerClass(org.apache.turbine.services.schedule.JobEntryTorquePeer.class);
088        TABLE.setPrimaryKeyMethod(IDMethod.ID_BROKER);
089        TABLE.setPrimaryKeyMethodInfo(IDMethod.ID_BROKER, TABLE.getName());
090        TABLE.setPrimaryKeyMethodInfo(IDMethod.SEQUENCE, "$sequenceName");
091        TABLE.setPrimaryKeyMethodInfo(IDMethod.AUTO_INCREMENT, "TURBINE_SCHEDULED_JOB");
092        TABLE.setUseInheritance(true);
093
094
095    // ------------- Column: JOB_ID --------------------
096        JOB_ID = new ColumnMap("JOB_ID", TABLE);
097        JOB_ID.setType(Integer.valueOf(0));
098        JOB_ID.setTorqueType("INTEGER");
099        JOB_ID.setUsePrimitive(true);
100        JOB_ID.setPrimaryKey(true);
101        JOB_ID.setNotNull(true);
102        JOB_ID.setJavaName("JobId");
103        JOB_ID.setAutoIncrement(true);
104        JOB_ID.setProtected(false);
105        JOB_ID.setJavaType( "int" );
106        JOB_ID.setPosition(1);
107        TABLE.addColumn(JOB_ID);
108    // ------------- Column: SECOND --------------------
109        SECOND = new ColumnMap("SECOND", TABLE);
110        SECOND.setType(Integer.valueOf(0));
111        SECOND.setTorqueType("INTEGER");
112        SECOND.setUsePrimitive(true);
113        SECOND.setPrimaryKey(false);
114        SECOND.setNotNull(true);
115        SECOND.setJavaName("Second");
116        SECOND.setAutoIncrement(true);
117        SECOND.setProtected(false);
118        SECOND.setJavaType( "int" );
119        SECOND.setDefault("-1");
120        SECOND.setPosition(2);
121        TABLE.addColumn(SECOND);
122    // ------------- Column: MINUTE --------------------
123        MINUTE = new ColumnMap("MINUTE", TABLE);
124        MINUTE.setType(Integer.valueOf(0));
125        MINUTE.setTorqueType("INTEGER");
126        MINUTE.setUsePrimitive(true);
127        MINUTE.setPrimaryKey(false);
128        MINUTE.setNotNull(true);
129        MINUTE.setJavaName("Minute");
130        MINUTE.setAutoIncrement(true);
131        MINUTE.setProtected(false);
132        MINUTE.setJavaType( "int" );
133        MINUTE.setDefault("-1");
134        MINUTE.setPosition(3);
135        TABLE.addColumn(MINUTE);
136    // ------------- Column: HOUR --------------------
137        HOUR = new ColumnMap("HOUR", TABLE);
138        HOUR.setType(Integer.valueOf(0));
139        HOUR.setTorqueType("INTEGER");
140        HOUR.setUsePrimitive(true);
141        HOUR.setPrimaryKey(false);
142        HOUR.setNotNull(true);
143        HOUR.setJavaName("Hour");
144        HOUR.setAutoIncrement(true);
145        HOUR.setProtected(false);
146        HOUR.setJavaType( "int" );
147        HOUR.setDefault("-1");
148        HOUR.setPosition(4);
149        TABLE.addColumn(HOUR);
150    // ------------- Column: WEEK_DAY --------------------
151        WEEK_DAY = new ColumnMap("WEEK_DAY", TABLE);
152        WEEK_DAY.setType(Integer.valueOf(0));
153        WEEK_DAY.setTorqueType("INTEGER");
154        WEEK_DAY.setUsePrimitive(true);
155        WEEK_DAY.setPrimaryKey(false);
156        WEEK_DAY.setNotNull(true);
157        WEEK_DAY.setJavaName("WeekDay");
158        WEEK_DAY.setAutoIncrement(true);
159        WEEK_DAY.setProtected(false);
160        WEEK_DAY.setJavaType( "int" );
161        WEEK_DAY.setDefault("-1");
162        WEEK_DAY.setPosition(5);
163        TABLE.addColumn(WEEK_DAY);
164    // ------------- Column: DAY_OF_MONTH --------------------
165        DAY_OF_MONTH = new ColumnMap("DAY_OF_MONTH", TABLE);
166        DAY_OF_MONTH.setType(Integer.valueOf(0));
167        DAY_OF_MONTH.setTorqueType("INTEGER");
168        DAY_OF_MONTH.setUsePrimitive(true);
169        DAY_OF_MONTH.setPrimaryKey(false);
170        DAY_OF_MONTH.setNotNull(true);
171        DAY_OF_MONTH.setJavaName("DayOfMonth");
172        DAY_OF_MONTH.setAutoIncrement(true);
173        DAY_OF_MONTH.setProtected(false);
174        DAY_OF_MONTH.setJavaType( "int" );
175        DAY_OF_MONTH.setDefault("-1");
176        DAY_OF_MONTH.setPosition(6);
177        TABLE.addColumn(DAY_OF_MONTH);
178    // ------------- Column: TASK --------------------
179        TASK = new ColumnMap("TASK", TABLE);
180        TASK.setType("");
181        TASK.setTorqueType("VARCHAR");
182        TASK.setUsePrimitive(false);
183        TASK.setPrimaryKey(false);
184        TASK.setNotNull(true);
185        TASK.setJavaName("Task");
186        TASK.setAutoIncrement(true);
187        TASK.setProtected(false);
188        TASK.setJavaType( "String" );
189        TASK.setSize(99);
190        TASK.setPosition(7);
191        TABLE.addColumn(TASK);
192    // ------------- Column: EMAIL --------------------
193        EMAIL = new ColumnMap("EMAIL", TABLE);
194        EMAIL.setType("");
195        EMAIL.setTorqueType("VARCHAR");
196        EMAIL.setUsePrimitive(false);
197        EMAIL.setPrimaryKey(false);
198        EMAIL.setNotNull(false);
199        EMAIL.setJavaName("Email");
200        EMAIL.setAutoIncrement(true);
201        EMAIL.setProtected(false);
202        EMAIL.setJavaType( "String" );
203        EMAIL.setSize(99);
204        EMAIL.setPosition(8);
205        TABLE.addColumn(EMAIL);
206    // ------------- Column: PROPERTY --------------------
207        PROPERTY = new ColumnMap("PROPERTY", TABLE);
208        PROPERTY.setType(new Object());
209        PROPERTY.setTorqueType("VARBINARY");
210        PROPERTY.setUsePrimitive(false);
211        PROPERTY.setPrimaryKey(false);
212        PROPERTY.setNotNull(false);
213        PROPERTY.setJavaName("Property");
214        PROPERTY.setAutoIncrement(true);
215        PROPERTY.setProtected(false);
216        PROPERTY.setJavaType( "byte[]" );
217        PROPERTY.setPosition(9);
218        TABLE.addColumn(PROPERTY);
219
220
221
222        initDatabaseMap();
223    }
224
225    /**
226     * Creates a new instance of the  implementation of the peer.
227     *
228     * @return the new instance.
229     */
230    protected static JobEntryTorquePeerImpl createJobEntryTorquePeerImpl()
231    {
232        JobEntryTorquePeerImpl instance = new JobEntryTorquePeerImpl();
233        return instance;
234    }
235
236
237    /**
238     * Returns an instance of the implementation of the peer.
239     * If no instance is currently cached, a new instance is created and cached.
240     *
241     * @return an instance of the implementation of the peer, not null.
242     */
243    public static JobEntryTorquePeerImpl getJobEntryTorquePeerImpl()
244    {
245        JobEntryTorquePeerImpl peerImplInstance = jobEntryTorquePeerImpl;
246        if (peerImplInstance == null)
247        {
248            peerImplInstance = JobEntryTorquePeer.createJobEntryTorquePeerImpl();
249            jobEntryTorquePeerImpl = peerImplInstance;
250            Torque.registerPeerInstance(JobEntryTorque.class, peerImplInstance);
251        }
252        return peerImplInstance;
253    }
254
255
256
257    /**
258     * Sets the instance of the implementation of the peer.
259     *
260     * @param peerImplInstance an instance of the implementation of the peer, or null
261     *        if a new instance should be created automatically.
262     */
263    public static void setJobEntryTorquePeerImpl(JobEntryTorquePeerImpl peerImplInstance)
264    {
265        jobEntryTorquePeerImpl = peerImplInstance;
266    }
267
268
269    /**
270     * Add all the columns needed to create a new object.
271     *
272     * @param criteria object containing the columns to add.
273     */
274    public static void addSelectColumns(Criteria criteria)
275    {
276        getJobEntryTorquePeerImpl().addSelectColumns(criteria);
277    }
278
279    /**
280     * changes the boolean values in the criteria to the appropriate type,
281     * whenever a booleanchar or booleanint column is involved.
282     * This enables the user to create criteria using Boolean values
283     * for booleanchar or booleanint columns.
284     *
285     * @param criteria the criteria in which the boolean values
286     *        should be corrected.
287     *
288     * @throws TorqueException if the database map for the criteria cannot be 
289               obtained.
290     */
291    public static void correctBooleans(Criteria criteria) throws TorqueException
292    {
293        getJobEntryTorquePeerImpl().correctBooleans(criteria);
294    }
295
296    /**
297     * Checks all columns in the criteria to see whether
298     * booleanchar and booleanint columns are queried with a boolean.
299     * If yes, the query values are mapped onto values the database
300     * does understand, i.e. 0 and 1 for booleanints and N and Y for
301     * booleanchar columns.
302     *
303     * @param columnValues The value to be checked for booleanint
304     *        and booleanchar columns.
305     * @throws TorqueException if the database map for the criteria cannot be
306     *         retrieved.
307     */
308    public static void correctBooleans(
309            ColumnValues columnValues)
310        throws TorqueException
311    {
312        getJobEntryTorquePeerImpl().correctBooleans(columnValues);
313    }
314    
315    /**
316     * Selects JobEntryTorque objects from a database.
317     *
318     * @param criteria object used to create the SELECT statement.
319     *
320     * @return the list of selected objects, not null.
321     *
322     * @throws TorqueException Any exceptions caught during processing will be
323     *         rethrown wrapped into a TorqueException.
324     */
325    public static List<JobEntryTorque> doSelect(Criteria criteria)
326            throws TorqueException
327    {
328        return getJobEntryTorquePeerImpl().doSelect(criteria);
329    }
330
331    /**
332     * Selects JobEntryTorque objects from a database
333     * within a transaction.
334     *
335     * @param criteria object used to create the SELECT statement.
336     * @param connection the connection holding the transaction, not null.
337     *
338     * @return The list of selected objects, not null.
339     *
340     * @throws TorqueException Any exceptions caught during processing will be
341     *         rethrown wrapped into a TorqueException.
342     */
343    public static List<JobEntryTorque> doSelect(
344                Criteria criteria,
345                Connection connection)
346            throws TorqueException
347    {
348        return getJobEntryTorquePeerImpl().doSelect(criteria, connection);
349    }
350
351    /**
352     * Selects JobEntryTorque objects from a database
353     * within a transaction.
354     *
355     * This method returns a stream that <b>must</b> be closed after use.
356     * All resources used by this method will be closed when the stream is
357     * closed.
358     *
359     * @param criteria object used to create the SELECT statement.
360     * @param connection the connection holding the transaction, not null.
361     *
362     * @return The results of the query as a Stream, not null.
363     *
364     * @throws TorqueException Any exceptions caught during processing will be
365     *         rethrown wrapped into a TorqueException.
366     */
367    public static Stream<JobEntryTorque> doSelectAsStream(
368                Criteria criteria,
369                Connection connection)
370            throws TorqueException
371    {
372        return getJobEntryTorquePeerImpl().doSelectAsStream(criteria, connection);
373    }
374
375    /**
376     * Selects rows from a database an maps them to objects.
377     *
378     * @param criteria A Criteria specifying the records to select, not null.
379     * @param mapper The mapper creating the objects from the resultSet,
380     *        not null.
381     *
382     * @return The results of the query, not null.
383     *
384     * @throws TorqueException if querying the database fails.
385     */
386    public static <T> List<T> doSelect(
387                Criteria criteria,
388                RecordMapper<T> mapper)
389            throws TorqueException
390    {
391        return getJobEntryTorquePeerImpl().doSelect(criteria, mapper);
392    }
393
394    /**
395     * Selects rows from a database an maps them to objects.
396     *
397     * @param criteria A Criteria specifying the records to select, not null.
398     * @param mapper The mapper creating the objects from the resultSet,
399     *        not null.
400     * @param connection the database connection for selecting records,
401     *        not null.
402     *
403     * @return The results of the query, not null.
404     *
405     * @throws TorqueException Error performing database query.
406     */
407    public static <T> List<T> doSelect(
408            Criteria criteria,
409            RecordMapper<T> mapper,
410            Connection connection)
411        throws TorqueException
412    {
413        return getJobEntryTorquePeerImpl().doSelect(
414                criteria,
415                mapper,
416                connection);
417    }
418
419    /**
420     * Selects rows from a database an maps them to objects.
421     *
422     * This method returns a stream that <b>must</b> be closed after use.
423     * All resources used by this method will be closed when the stream is
424     * closed.
425     *
426     * @param criteria A Criteria specifying the records to select, not null.
427     * @param mapper The mapper creating the objects from the resultSet,
428     *        not null.
429     * @param connection the database connection for selecting records,
430     *        not null.
431     *
432     * @return The results of the query as a Stream, not null.
433     *
434     * @throws TorqueException Error performing database query.
435     */
436    public static <T> Stream<T> doSelectAsStream(
437            Criteria criteria,
438            RecordMapper<T> mapper,
439            Connection connection)
440        throws TorqueException
441    {
442        return getJobEntryTorquePeerImpl().doSelectAsStream(
443                criteria,
444                mapper,
445                connection);
446    }
447
448    /**
449     * Selects rows from a database an maps them to objects.
450     *
451     * @param query the sql query to execute, not null.
452     * @param mapper The mapper creating the objects from the resultSet,
453     *        not null.
454     * @param dbName The name of the database to create the connection for,
455     *        or null for the default SDB.
456     *
457     * @return The results of the query, not null.
458     *
459     * @throws TorqueException if querying the database fails.
460     */
461    public static <T> List<T> doSelect(
462                String query,
463                RecordMapper<T> mapper,
464                String dbName)
465            throws TorqueException
466    {
467        return getJobEntryTorquePeerImpl().doSelect(
468                query,
469                mapper,
470                dbName);
471    }
472
473    /**
474     * Selects rows from a database an maps them to objects.
475     *
476     * @param query the SQL Query to execute, not null.
477     * @param mapper The mapper creating the objects from the resultSet,
478     *        not null.
479     * @param connection the database connection, not null.
480     *
481     * @return The results of the query, not null.
482     *
483     * @throws TorqueException if querying the database fails.
484     */
485    public static <T> List<T> doSelect(
486                String query,
487                RecordMapper<T> mapper,
488                Connection connection)
489            throws TorqueException
490    {
491        return getJobEntryTorquePeerImpl().doSelect(
492                query,
493                mapper,
494                connection);
495    }
496
497    /**
498     * Selects rows from a database an maps them to objects.
499     *
500     * This method returns a stream that <b>must</b> be closed after use.
501     * All resources used by this method will be closed when the stream is
502     * closed.
503     *
504     * @param query the SQL Query to execute, not null.
505     * @param mapper The mapper creating the objects from the resultSet,
506     *        not null.
507     * @param connection the database connection, not null.
508     *
509     * @return The results of the query as a Stream, not null.
510     *
511     * @throws TorqueException if querying the database fails.
512     */
513    public static <T> Stream<T> doSelectAsStream(
514                String query,
515                RecordMapper<T> mapper,
516                Connection connection)
517            throws TorqueException
518    {
519        return getJobEntryTorquePeerImpl().doSelectAsStream(
520                query,
521                mapper,
522                connection);
523    }
524
525    /**
526     * Selects JobEntryTorque objects from the database which have
527     * the same content as the passed object.
528     *
529     * @return The list of selected objects, not null.
530     *
531     * @throws TorqueException Any exceptions caught during processing will be
532     *         rethrown wrapped into a TorqueException.
533     */
534    public static List<JobEntryTorque> doSelect(JobEntryTorque obj)
535            throws TorqueException
536    {
537        return getJobEntryTorquePeerImpl().doSelect(obj);
538    }
539
540    /**
541     * Selects at most one JobEntryTorque object from a database.
542     *
543     * @param criteria object used to create the SELECT statement.
544     *
545     * @return the selected Object, or null if no object was selected.
546     *
547     * @throws TorqueException If more than one record is selected or if
548     *         an error occurs when processing the query.
549     */
550    public static JobEntryTorque doSelectSingleRecord(
551                Criteria criteria)
552            throws TorqueException
553    {
554        return getJobEntryTorquePeerImpl().doSelectSingleRecord(criteria);
555    }
556
557    /**
558     * Selects at most one JobEntryTorque object from a database
559     * within a transaction.
560     *
561     * @param criteria object used to create the SELECT statement.
562     * @param connection the connection holding the transaction, not null.
563     *
564     * @return the selected Object, or null if no object was selected.
565     *
566     * @throws TorqueException If more than one record is selected or if
567     *         an error occurs when processing the query.
568     */
569    public static JobEntryTorque doSelectSingleRecord(
570                Criteria criteria,
571                Connection connection)
572            throws TorqueException
573    {
574        return getJobEntryTorquePeerImpl().doSelectSingleRecord(criteria, connection);
575    }
576
577    /**
578     * Selects at most a single row from a database an maps them to objects.
579     *
580     * @param criteria A Criteria specifying the records to select, not null.
581     * @param mapper The mapper creating the objects from the resultSet,
582     *        not null.
583     *
584     * @return The selected row, or null if no records was selected.
585     *
586     * @throws TorqueException if querying the database fails.
587     */
588    public static <T> T doSelectSingleRecord(
589                org.apache.torque.criteria.Criteria criteria,
590                RecordMapper<T> mapper)
591            throws TorqueException
592    {
593        return getJobEntryTorquePeerImpl().doSelectSingleRecord(
594                criteria,
595                mapper);
596    }
597
598    /**
599     * Selects at most a single row from a database an maps them to objects.
600     *
601     * @param criteria A Criteria specifying the records to select, not null.
602     * @param mapper The mapper creating the objects from the resultSet,
603     *        not null.
604     * @param connection the database connection, not null.
605     *
606     * @return The selected row, or null if no records was selected.
607     *
608     * @throws TorqueException if querying the database fails.
609     */
610    public static <T> T doSelectSingleRecord(
611                org.apache.torque.criteria.Criteria criteria,
612                RecordMapper<T> mapper,
613                Connection connection)
614            throws TorqueException
615    {
616        return getJobEntryTorquePeerImpl().doSelectSingleRecord(
617                criteria,
618                mapper,
619                connection);
620    }
621
622    /**
623     * Selects at most one JobEntryTorque object from the database
624     * which has the same content as the passed object.
625     *
626     * @return the selected Object, or null if no object was selected.
627     *
628     * @throws TorqueException If more than one record is selected or if
629     *         an error occurs when processing the query.
630     */
631    public static JobEntryTorque doSelectSingleRecord(
632                JobEntryTorque obj)
633            throws TorqueException
634    {
635        return getJobEntryTorquePeerImpl().doSelectSingleRecord(obj);
636    }
637
638
639    /**
640     * Returns a new instance of the Data object class
641     */
642    public static JobEntryTorque getDbObjectInstance()
643    {
644        return getJobEntryTorquePeerImpl().getDbObjectInstance();
645    }
646
647
648    /**
649     * Method to do inserts.
650     *
651     * @param columnValues the values to insert.
652     *
653     * @return the primary key of the inserted row.
654     *
655     * @throws TorqueException Any exceptions caught during processing will be
656     *         rethrown wrapped into a TorqueException.
657     */
658    public static ObjectKey<?> doInsert(ColumnValues columnValues) 
659            throws TorqueException
660    {
661        return getJobEntryTorquePeerImpl().doInsert(columnValues);
662    }
663
664    /**
665     * Method to do inserts.  This method is to be used during a transaction,
666     * otherwise use the doInsert(Criteria) method.
667     *
668     * @param columnValues the values to insert.
669     * @param con the connection to use, not null.
670     *
671     * @return the primary key of the inserted row.
672     *
673     * @throws TorqueException Any exceptions caught during processing will be
674     *         rethrown wrapped into a TorqueException.
675     */
676    public static ObjectKey<?> doInsert(ColumnValues columnValues, Connection con)
677            throws TorqueException
678    {
679        return getJobEntryTorquePeerImpl().doInsert(columnValues, con);
680    }
681    /**
682     * Method to do inserts
683     *
684     * @throws TorqueException Any exceptions caught during processing will be
685     *         rethrown wrapped into a TorqueException.
686     */
687    public static void doInsert(JobEntryTorque obj)
688            throws TorqueException
689    {
690        getJobEntryTorquePeerImpl().doInsert(obj);
691    }
692
693    /**
694     * Method to do inserts.  This method is to be used during a transaction,
695     * otherwise use the doInsert(JobEntryTorque) method.  It will take
696     * care of the connection details internally.
697     *
698     * @param obj the data object to insert into the database.
699     * @param con the connection to use
700     * @throws TorqueException Any exceptions caught during processing will be
701     *         rethrown wrapped into a TorqueException.
702     */
703    public static void doInsert(JobEntryTorque obj, Connection con)
704            throws TorqueException
705    {
706        getJobEntryTorquePeerImpl().doInsert(obj, con);
707    }
708
709    /**
710     * Executes a insert into...select statement.
711     *
712     * @param toInsertInto the columns in which to insert, not null.
713     * @param criteria the criteria which selects the values to insert,
714     *        not null.
715     *
716     * @return the number of inserted rows.
717     *
718     * @throws TorqueException if a database error occurs.
719     */
720    public static int doInsert(
721                final Column[] toInsertInto,
722                final Criteria criteria)
723            throws TorqueException
724    {
725        return getJobEntryTorquePeerImpl().doInsert(toInsertInto, criteria);
726    }
727
728    /**
729     * Executes a insert into...select statement.
730     *
731     * @param toInsertInto the columns in which to insert, not null.
732     * @param criteria the criteria which selects the values to insert,
733     *        not null.
734     * @param dbName the database name, or null to take the database name
735     *        from getDatabaseName().
736     *
737     * @return the number of inserted rows.
738     *
739     * @throws TorqueException if a database error occurs.
740     */
741    public static int doInsert(
742                final Column[] toInsertInto,
743                final Criteria criteria,
744                final String dbName)
745            throws TorqueException
746    {
747        return getJobEntryTorquePeerImpl().doInsert(toInsertInto, criteria, dbName);
748    }
749
750    /**
751     * Executes a insert into...select statement.
752     *
753     * @param toInsertInto the columns in which to insert, not null.
754     * @param criteria the criteria which selects the values to insert,
755     *        not null.
756     * @param connection the database connection to use, not null.
757     *
758     * @return the number of inserted rows.
759     *
760     * @throws TorqueException if a database error occurs.
761     */
762    public static int doInsert(
763                final Column[] toInsertInto,
764                final Criteria criteria,
765                final Connection connection)
766            throws TorqueException
767    {
768        return getJobEntryTorquePeerImpl().doInsert(toInsertInto, criteria, connection);
769    }
770
771    /**
772     * Executes a insert into...select statement.
773     *
774     * @param toInsertInto the columns in which to insert, not null.
775     * @param criteria the criteria which selects the values to insert,
776     *        not null.
777     * @param dbName the database name, or null to take the database name
778     *        from getDatabaseName().
779     * @param connection the database connection to use, not null.
780     *
781     * @return the number of inserted rows.
782     *
783     * @throws TorqueException if a database error occurs.
784     */
785    public static int doInsert(
786                final Column[] toInsertInto,
787                final Criteria criteria,
788                String dbName,
789                final Connection connection)
790            throws TorqueException
791    {
792        return getJobEntryTorquePeerImpl().doInsert(
793                 toInsertInto,
794                 criteria,
795                 dbName,
796                 connection);
797    }
798
799    /**
800     * Method to do updates.
801     *
802     * @param columnValues the values to update plus the primary key
803     *        identifying the row to update.
804     *
805     * @throws TorqueException Any exceptions caught during processing will be
806     *         rethrown wrapped into a TorqueException.
807     */
808    public static int doUpdate(ColumnValues columnValues) throws TorqueException
809    {
810        return getJobEntryTorquePeerImpl().doUpdate(columnValues);
811    }
812
813    /**
814     * Method to do updates.  This method is to be used during a transaction,
815     * otherwise use the doUpdate(Criteria) method.  It will take care of
816     * the connection details internally.
817     *
818     * @param columnValues the values to update plus the primary key
819     *        identifying the row to update.
820     * @param con the connection to use, not null.
821     *
822     * @return the number of affected rows.
823     *
824     * @throws TorqueException Any exceptions caught during processing will be
825     *         rethrown wrapped into a TorqueException.
826     */
827    public static int doUpdate(ColumnValues columnValues, Connection con)
828        throws TorqueException
829    {
830        return getJobEntryTorquePeerImpl().doUpdate(columnValues, con);
831    }
832
833    /**
834     * Executes an update against the database. The rows to be updated
835     * are selected using <code>criteria</code> and updated using the values
836     * in <code>updateValues</code>.
837     *
838     * @param selectCriteria selects which rows of which table should be updated.
839     * @param updateValues Which columns to update with which values, not null.
840     *
841     * @return the number of affected rows.
842     *
843     * @throws TorqueException if updating fails.
844     */
845    public static int doUpdate(
846                Criteria selectCriteria,
847                ColumnValues updateValues)
848            throws TorqueException
849    {
850        return getJobEntryTorquePeerImpl().doUpdate(
851            selectCriteria,
852            updateValues);
853    }
854
855    /**
856     * Executes an update against the database. The rows to be updated
857     * are selected using <code>criteria</code> and updated using the values
858     * in <code>updateValues</code>.
859     *
860     * @param criteria selects which rows of which table should be updated.
861     * @param updateValues Which columns to update with which values, not null.
862     * @param connection the database connection to use, not null.
863     *
864     * @return the number of affected rows.
865     *
866     * @throws TorqueException if updating fails.
867     */
868    public static int doUpdate(
869                Criteria criteria,
870                ColumnValues updateValues,
871                Connection connection)
872            throws TorqueException
873    {
874        return getJobEntryTorquePeerImpl().doUpdate(
875            criteria,
876             updateValues,
877              connection);
878    }
879
880    /**
881     * Updates an JobEntryTorque in the database.
882     * The primary key is used to identify the object to update.
883     *
884     * @param obj the data object to update in the database.
885     *
886     * @return the number of affected rows.
887     *
888     * @throws TorqueException Any exceptions caught during processing will be
889     *         rethrown wrapped into a TorqueException.
890     */
891    public static int doUpdate(JobEntryTorque obj) throws TorqueException
892    {
893        return getJobEntryTorquePeerImpl().doUpdate(obj);
894    }
895
896    /**
897     * Updates a JobEntryTorque in the database.
898     * The primary key is used to identify the object to update.
899     * This method is to be used during a transaction,
900     * otherwise the doUpdate(JobEntryTorque) method can be used.
901     *
902     * @param obj the data object to update in the database.
903     * @param con the connection to use, not null.
904     
905     * @throws TorqueException Any exceptions caught during processing will be
906     *         rethrown wrapped into a TorqueException.
907     */
908    public static int doUpdate(JobEntryTorque obj, Connection con)
909        throws TorqueException
910    {
911        return getJobEntryTorquePeerImpl().doUpdate(obj, con);
912    }
913
914    /**
915     * Utility method which executes a given sql statement
916     * as prepared statement.
917     * This method should be used for update, insert, and delete statements.
918     * Use executeQuery() for selects.
919     *
920     * @param statementString A String with the sql statement to execute.
921     *
922     * @return The number of rows affected.
923     *
924     * @throws TorqueException if executing the statement fails
925     *         or no database connection can be established.
926     */
927    public static int executeStatement(String statementString) 
928            throws TorqueException
929    {
930        return getJobEntryTorquePeerImpl().executeStatement(statementString);
931    }
932
933    /**
934     * Utility method which executes a given sql statement
935     * as prepared statement.
936     * This method should be used for update, insert, and delete statements.
937     * Use executeQuery() for selects.
938     *
939     * @param statementString A String with the sql statement to execute.
940     * @param replacementValues values to use as placeholders in the query.
941     *        or null or empty if no placeholders need to be filled.
942     *
943     * @return The number of rows affected.
944     *
945     * @throws TorqueException if executing the statement fails
946     *         or no database connection can be established.
947     */
948    public static int executeStatement(
949                String statementString,
950                List<JdbcTypedValue> replacementValues)
951            throws TorqueException
952    {
953        return getJobEntryTorquePeerImpl().executeStatement(
954                statementString, 
955                replacementValues);
956    }
957
958    /**
959     * Utility method which executes a given sql statement
960     * as prepared statement.
961     * This method should be used for update, insert, and delete statements.
962     * Use executeQuery() for selects.
963     *
964     * @param statementString A String with the sql statement to execute.
965     * @param dbName The name of the database to execute the statement against,
966     *        or null for the default DB.
967     * @param replacementValues values to use as placeholders in the query.
968     *        or null or empty if no placeholders need to be filled.
969     *
970     * @return The number of rows affected.
971     *
972     * @throws TorqueException if executing the statement fails
973     *         or no database connection can be established.
974     */
975    public static int executeStatement(
976            String statementString,
977            String dbName,
978            List<JdbcTypedValue> replacementValues)
979        throws TorqueException
980    {
981        return getJobEntryTorquePeerImpl().executeStatement(
982                statementString, 
983                dbName,
984                replacementValues);
985    }
986
987    /**
988     * Utility method which executes a given sql statement
989     * as prepared statement.
990     * This method should be used for update, insert, and delete statements.
991     * Use executeQuery() for selects.
992     *
993     * @param statementString A String with the sql statement to execute.
994     * @param con The database connection to use.
995     * @param replacementValues values to use as placeholders in the query.
996     *        or null or empty if no placeholders need to be filled.
997     *
998     * @return The number of rows affected.
999     *
1000     * @throws TorqueException if executing the statement fails.
1001     */
1002    public static int executeStatement(
1003            String statementString,
1004            Connection con,
1005            List<JdbcTypedValue> replacementValues)
1006        throws TorqueException
1007    {
1008        return getJobEntryTorquePeerImpl().executeStatement(
1009                statementString, 
1010                con,
1011                replacementValues);
1012    }
1013
1014    /**
1015     * Utility method which executes a given sql statement
1016     * as prepared statement.
1017     * This method should be used for update, insert, and delete statements.
1018     * Use executeQuery() for selects.
1019     *
1020     * @param statementString A String with the sql statement to execute,
1021     *        containing placeholders of the form ":${placeholderName}".
1022     *        ${placeholderName} must contain only letters, digits and the underscore
1023     *        Each placeholder must be followed by a space, except when it is at the end of the statement.
1024     * @param replacementValues a map mapping the placeholder names to values
1025     *        to use as placeholders in the query.
1026     *        Can be null or empty if no placeholders need to be filled.
1027     *
1028     * @return The number of rows affected.
1029     *
1030     * @throws TorqueException if executing the statement fails.
1031     */
1032    public static int executeStatement(
1033            final String statementString,
1034            final Map<String, JdbcTypedValue> replacementValues)
1035        throws TorqueException
1036    {
1037        return getJobEntryTorquePeerImpl().executeStatement(
1038                statementString,
1039                replacementValues);
1040    }
1041
1042    /**
1043     * Utility method which executes a given sql statement
1044     * as prepared statement.
1045     * This method should be used for update, insert, and delete statements.
1046     * Use executeQuery() for selects.
1047     *
1048     * @param statementString A String with the sql statement to execute,
1049     *        containing placeholders of the form ":${placeholderName}".
1050     *        ${placeholderName} must contain only letters, digits and the underscore
1051     *        Each placeholder must be followed by a space, except when it is at the end of the statement.
1052     * @param dbName The name of the database to execute the statement against,
1053     *        or null for the default DB.
1054     * @param replacementValues a map mapping the placeholder names to values
1055     *        to use as placeholders in the query.
1056     *        Can be null or empty if no placeholders need to be filled.
1057     *
1058     * @return The number of rows affected.
1059     *
1060     * @throws TorqueException if executing the statement fails.
1061     */
1062    public static int executeStatement(
1063                final String statementString,
1064                final String dbName,
1065                final Map<String, JdbcTypedValue> replacementValues)
1066            throws TorqueException
1067        {
1068        return getJobEntryTorquePeerImpl().executeStatement(
1069                statementString,
1070                dbName,
1071                replacementValues);
1072        }
1073
1074        /**
1075     * Utility method which executes a given sql statement
1076     * as prepared statement.
1077     * This method should be used for update, insert, and delete statements.
1078     * Use executeQuery() for selects.
1079     *
1080     * @param statementString A String with the sql statement to execute,
1081     *        containing placeholders of the form ":${placeholderName}".
1082     *        ${placeholderName} must contain only letters, digits and the underscore
1083     *        Each placeholder must be followed by a space, except when it is at the end of the statement.
1084     * @param con The database connection to use.
1085     * @param replacementValues a map mapping the placeholder names (without leading colons)
1086     *        to values to use as placeholders in the query.
1087     *        Can be null or empty if no placeholders need to be filled.
1088     *
1089     * @return The number of rows affected.
1090     *
1091     * @throws TorqueException if executing the statement fails.
1092     */
1093    public static int executeStatement(
1094                final String statementString,
1095                final Connection con,
1096                final Map<String, JdbcTypedValue> replacementValues)
1097            throws TorqueException
1098    {
1099        return getJobEntryTorquePeerImpl().executeStatement(
1100                statementString,
1101                con,
1102                replacementValues);
1103    }
1104
1105    
1106    /**
1107     * Deletes rows from a database table.
1108     *
1109     * @param criteria defines the rows to be deleted, not null.
1110     *
1111     * @return the number of deleted rows.
1112     *
1113     * @throws TorqueException Any exceptions caught during processing will be
1114     *         rethrown wrapped into a TorqueException.
1115     */
1116     public static int doDelete(Criteria criteria) throws TorqueException
1117     {
1118        return getJobEntryTorquePeerImpl().doDelete(criteria);
1119     }
1120
1121    /**
1122     * Deletes rows from a table.
1123     * This method uses the passed connection to delete the rows;
1124     * if a transaction is open in the connection, the deletion happens inside
1125     * this transaction.
1126    *
1127     * @param criteria defines the rows to be deleted, not null.
1128     * @param con the connection to use, not null.
1129     *
1130     * @return the number of deleted rows.
1131     *
1132     * @throws TorqueException Any exceptions caught during processing will be
1133     *         rethrown wrapped into a TorqueException.
1134     */
1135     public static int doDelete(Criteria criteria, Connection con)
1136        throws TorqueException
1137     {
1138        return getJobEntryTorquePeerImpl().doDelete(criteria, con);
1139     }
1140
1141    /**
1142     * Deletes a data object, i.e. a row in a table, in the database.
1143     *
1144     * @param obj the data object to delete in the database, not null.
1145     *
1146     * @return the number of deleted rows.
1147     *
1148     * @throws TorqueException Any exceptions caught during processing will be
1149     *         rethrown wrapped into a TorqueException.
1150     */
1151    public static int doDelete(JobEntryTorque obj) throws TorqueException
1152    {
1153        return getJobEntryTorquePeerImpl().doDelete(obj);
1154    }
1155
1156    /**
1157     * Deletes a data object, i.e. a row in a table, in the database.
1158     * This method uses the passed connection to delete the rows;
1159     * if a transaction is open in the connection, the deletion happens inside
1160     * this transaction.
1161     *
1162     * @param obj the data object to delete in the database, not null.
1163     * @param con the connection to use, not null.
1164     *
1165     * @return the number of deleted rows.
1166     *
1167     * @throws TorqueException Any exceptions caught during processing will be
1168     *         rethrown wrapped into a TorqueException.
1169     */
1170    public static int doDelete(JobEntryTorque obj, Connection con)
1171        throws TorqueException
1172    {
1173        return getJobEntryTorquePeerImpl().doDelete(obj, con);
1174    }
1175
1176    /**
1177     * Deletes data objects, i.e. rows in a table, in the database.
1178     *
1179     * @param objects the datas object to delete in the database, not null,
1180     *        may not contain null.
1181     *
1182     * @return the number of deleted rows.
1183     *
1184     * @throws TorqueException Any exceptions caught during processing will be
1185     *         rethrown wrapped into a TorqueException.
1186     */
1187    public static int doDelete(Collection<JobEntryTorque> objects)
1188            throws TorqueException
1189    {
1190        return getJobEntryTorquePeerImpl().doDelete(objects);
1191    }
1192
1193    /**
1194     * Deletes data objects, i.e. rows in a table, in the database.
1195     * This method uses the passed connection to delete the rows;
1196     * if a transaction is open in the connection, the deletion happens inside
1197     * this transaction.
1198     *
1199     * @param objects the datas object to delete in the database, not null,
1200     *        may not contain null.
1201     * @param con the connection to use for deleting, not null.
1202     *
1203     * @return the number of deleted rows.
1204     *
1205     * @throws TorqueException Any exceptions caught during processing will be
1206     *         rethrown wrapped into a TorqueException.
1207     */
1208    public static int doDelete(
1209            Collection<JobEntryTorque> objects,
1210            Connection con)
1211        throws TorqueException
1212    {
1213        return getJobEntryTorquePeerImpl().doDelete(objects, con);
1214    }
1215
1216    /**
1217     * Deletes a row in the database.
1218     *
1219     * @param pk the ObjectKey that identifies the row to delete.
1220     *
1221     * @return the number of deleted rows.
1222     *
1223     * @throws TorqueException Any exceptions caught during processing will be
1224     *         rethrown wrapped into a TorqueException.
1225     */
1226    public static int doDelete(ObjectKey<?> pk) throws TorqueException
1227    {
1228        return getJobEntryTorquePeerImpl().doDelete(pk);
1229    }
1230
1231    /**
1232     * Deletes a row in the database.
1233     * This method uses the passed connection to delete the rows;
1234     * if a transaction is open in the connection, the deletion happens inside
1235     * this transaction.
1236     *
1237     * @param pk the ObjectKey that identifies the row to delete.
1238     * @param con the connection to use for deleting, not null.
1239     *
1240     * @return the number of deleted rows.
1241     *
1242     * @throws TorqueException Any exceptions caught during processing will be
1243     *         rethrown wrapped into a TorqueException.
1244     */
1245    public static int doDelete(ObjectKey<?> pk, Connection con)
1246        throws TorqueException
1247    {
1248        return getJobEntryTorquePeerImpl().doDelete(pk, con);
1249    }
1250
1251    /** 
1252     * Build a Criteria object which selects all objects which have a given
1253     * primary key.
1254     *
1255     * @param pk the primary key value to build the criteria from, not null.
1256     */
1257    public static Criteria buildCriteria(ObjectKey<?> pk)
1258    {
1259        return getJobEntryTorquePeerImpl().buildCriteria(pk);
1260    }
1261
1262    /** 
1263     * Build a Criteria object which selects all objects which primary keys
1264     * are contained in the passed collection.
1265     *
1266     * @param pks the primary key values to build the criteria from, not null,
1267     *        may not contain null.
1268     */
1269    public static Criteria buildCriteria(Collection<ObjectKey<?>> pks)
1270    {
1271        return getJobEntryTorquePeerImpl().buildCriteria(pks);
1272    }
1273
1274    /** 
1275     * Build a Criteria object which selects all passed objects using their
1276     * primary key. Objects which do not yet have a primary key are ignored.
1277     *
1278     * @param objects the objects to build the criteria from, not null,
1279     *        may not contain null.
1280     */
1281    public static Criteria buildPkCriteria(
1282            Collection<JobEntryTorque> objects)
1283    {
1284        return getJobEntryTorquePeerImpl().buildPkCriteria(objects);
1285    }
1286
1287    /** 
1288     * Build a Criteria object from the data object for this peer.
1289     *
1290     * @param obj the object to build the criteria from, not null.
1291     */
1292    public static Criteria buildCriteria(JobEntryTorque obj)
1293    {
1294        return getJobEntryTorquePeerImpl().buildCriteria(obj);
1295    }
1296
1297    /** 
1298     * Build a Criteria object from the data object for this peer,
1299     * skipping all binary columns.
1300     *
1301     * @param obj the object to build the criteria from, not null.
1302     */
1303    public static Criteria buildSelectCriteria(JobEntryTorque obj)
1304    {
1305        return getJobEntryTorquePeerImpl().buildSelectCriteria(obj);
1306    }
1307
1308    /** 
1309     * Returns the contents of the object as ColumnValues object
1310     *
1311     * @throws TorqueException if the table map cannot be retrieved
1312     *         (should not happen).
1313     */
1314    public static ColumnValues buildColumnValues(JobEntryTorque jobEntryTorque)
1315            throws TorqueException
1316    {
1317        
1318        return getJobEntryTorquePeerImpl().buildColumnValues(jobEntryTorque);
1319    }
1320
1321    /**
1322     * Retrieve a single object by pk
1323     *
1324     * @param pk the primary key
1325     * @throws TorqueException Any exceptions caught during processing will be
1326     *         rethrown wrapped into a TorqueException.
1327     * @throws NoRowsException Primary key was not found in database.
1328     * @throws TooManyRowsException Primary key was not found in database.
1329     */
1330    public static JobEntryTorque retrieveByPK(int pk)
1331        throws TorqueException, NoRowsException, TooManyRowsException
1332    {
1333        return getJobEntryTorquePeerImpl().retrieveByPK(pk);
1334    }
1335
1336    /**
1337     * Retrieve a single object by pk
1338     *
1339     * @param pk the primary key
1340     * @param con the connection to use
1341     * @throws TorqueException Any exceptions caught during processing will be
1342     *         rethrown wrapped into a TorqueException.
1343     * @throws NoRowsException Primary key was not found in database.
1344     * @throws TooManyRowsException Primary key was not found in database.
1345     */
1346    public static JobEntryTorque retrieveByPK(int pk, Connection con)
1347        throws TorqueException, NoRowsException, TooManyRowsException
1348    {
1349        return getJobEntryTorquePeerImpl().retrieveByPK(pk, con);
1350    }
1351    
1352    
1353    
1354
1355    /**
1356     * Retrieve a single object by pk
1357     *
1358     * @param pk the primary key
1359     * @throws TorqueException Any exceptions caught during processing will be
1360     *         rethrown wrapped into a TorqueException.
1361     * @throws NoRowsException Primary key was not found in database.
1362     * @throws TooManyRowsException Primary key was not found in database.
1363     */
1364    public static JobEntryTorque retrieveByPK(ObjectKey<?> pk)
1365        throws TorqueException, NoRowsException, TooManyRowsException
1366    {
1367        return getJobEntryTorquePeerImpl().retrieveByPK(pk);
1368    }
1369
1370    /**
1371     * Retrieve a single object by pk
1372     *
1373     * @param pk the primary key
1374     * @param con the connection to use
1375     * @throws TorqueException Any exceptions caught during processing will be
1376     *         rethrown wrapped into a TorqueException.
1377     * @throws NoRowsException Primary key was not found in database.
1378     * @throws TooManyRowsException Primary key was not found in database.
1379     */
1380    public static JobEntryTorque retrieveByPK(ObjectKey<?> pk, Connection con)
1381        throws TorqueException, NoRowsException, TooManyRowsException
1382    {
1383        return getJobEntryTorquePeerImpl().retrieveByPK(pk, con);
1384    }
1385
1386
1387    /**
1388     * Retrieve multiple objects by pk.
1389     *
1390     * @param pks List of primary keys
1391     *
1392     * @return the list of matching objects, not null.
1393     *
1394     * @throws TorqueException Any exceptions caught during processing will be
1395     *         rethrown wrapped into a TorqueException.
1396     */
1397    public static List<JobEntryTorque> retrieveByTypedPKs(Collection<Integer> pks)
1398        throws TorqueException
1399    {
1400        return getJobEntryTorquePeerImpl().retrieveByTypedPKs(pks);
1401    }
1402
1403    /**
1404     * Retrieve multiple objects by pk.
1405     *
1406     * @param pks List of primary keys
1407     * @param dbcon the connection to use
1408     *
1409     * @return the list of matching objects, not null.
1410     *
1411     * @throws TorqueException Any exceptions caught during processing will be
1412     *         rethrown wrapped into a TorqueException.
1413     */
1414    public static List<JobEntryTorque> retrieveByTypedPKs(
1415                Collection<Integer> pks,
1416                Connection dbcon)
1417            throws TorqueException
1418    {
1419        return getJobEntryTorquePeerImpl().retrieveByTypedPKs(pks, dbcon);
1420    }
1421
1422    /**
1423     * Retrieve a multiple objects by pk.
1424     *
1425     * @param pks List of primary keys
1426     *
1427     * @return the list of matching objects, not null.
1428     *
1429     * @throws TorqueException Any exceptions caught during processing will be
1430     *         rethrown wrapped into a TorqueException.
1431     */
1432    public static List<JobEntryTorque> retrieveByObjectKeys(Collection<ObjectKey<?>> pks)
1433        throws TorqueException
1434    {
1435        return getJobEntryTorquePeerImpl().retrieveByObjectKeys(pks);
1436    }
1437
1438    /**
1439     * Retrieve multiple objects by pk.
1440     *
1441     * @param pks List of primary keys
1442     * @param con the connection to use
1443     *
1444     * @return the list of matching objects, not null.
1445     *
1446     * @throws TorqueException Any exceptions caught during processing will be
1447     *         rethrown wrapped into a TorqueException.
1448     */
1449    public static List<JobEntryTorque> retrieveByObjectKeys(Collection<ObjectKey<?>> pks, Connection con)
1450        throws TorqueException
1451    {
1452        return getJobEntryTorquePeerImpl().retrieveByObjectKeys(pks, con);
1453    }
1454
1455
1456
1457
1458
1459    /**
1460     * Returns the TableMap related to this peer.
1461     *
1462     * @return the table map, not null.
1463     *
1464     * @throws TorqueException if the Peer instance does not hold a Table map.
1465     */
1466    public static TableMap getTableMap()
1467        throws TorqueException
1468    {
1469        return getJobEntryTorquePeerImpl().getTableMap();
1470    }
1471
1472    public static void initDatabaseMap()
1473    {
1474    }
1475
1476
1477}