Coverage Report - org.apache.turbine.services.schedule.BaseJobEntry
 
Classes in this File Line Coverage Branch Coverage Complexity
BaseJobEntry
14%
39/277
4%
8/174
4,619
 
 1  
 package org.apache.turbine.services.schedule;
 2  
 
 3  
 
 4  
 import java.math.BigDecimal;
 5  
 import java.sql.Connection;
 6  
 import java.util.ArrayList;
 7  
 import java.util.Collections;
 8  
 import java.util.Date;
 9  
 import java.util.List;
 10  
 
 11  
 import org.apache.commons.lang.ObjectUtils;
 12  
 import org.apache.torque.TorqueException;
 13  
 import org.apache.torque.map.TableMap;
 14  
 import org.apache.torque.om.BaseObject;
 15  
 import org.apache.torque.om.ComboKey;
 16  
 import org.apache.torque.om.DateKey;
 17  
 import org.apache.torque.om.NumberKey;
 18  
 import org.apache.torque.om.ObjectKey;
 19  
 import org.apache.torque.om.SimpleKey;
 20  
 import org.apache.torque.om.StringKey;
 21  
 import org.apache.torque.om.Persistent;
 22  
 import org.apache.torque.util.Criteria;
 23  
 import org.apache.torque.util.Transaction;
 24  
 
 25  
 
 26  
 
 27  
 
 28  
 
 29  
 /**
 30  
  * This class was autogenerated by Torque on:
 31  
  *
 32  
  * [Thu Jun 23 17:25:46 CEST 2011]
 33  
  *
 34  
  * You should not use this class directly.  It should not even be
 35  
  * extended all references should be to JobEntry
 36  
  */
 37  10
 public abstract class BaseJobEntry extends BaseObject
 38  
 {
 39  
     /** Serial version */
 40  
     private static final long serialVersionUID = 1308842746584L;
 41  
 
 42  
     /** The Peer class */
 43  4
     private static final JobEntryPeer peer =
 44  
         new JobEntryPeer();
 45  
 
 46  
 
 47  
     /** The value for the jobId field */
 48  
     private int jobId;
 49  
 
 50  
     /** The value for the second field */
 51  10
     private int second = -1;
 52  
 
 53  
     /** The value for the minute field */
 54  10
     private int minute = -1;
 55  
 
 56  
     /** The value for the hour field */
 57  10
     private int hour = -1;
 58  
 
 59  
     /** The value for the weekDay field */
 60  10
     private int weekDay = -1;
 61  
 
 62  
     /** The value for the dayOfMonth field */
 63  10
     private int dayOfMonth = -1;
 64  
 
 65  
     /** The value for the task field */
 66  
     private String task;
 67  
 
 68  
     /** The value for the email field */
 69  
     private String email;
 70  
 
 71  
     /** The value for the property field */
 72  
     private byte[] property;
 73  
 
 74  
 
 75  
     /**
 76  
      * Get the JobId
 77  
      *
 78  
      * @return int
 79  
      */
 80  
     public int getJobId()
 81  
     {
 82  44
         return jobId;
 83  
     }
 84  
 
 85  
 
 86  
     /**
 87  
      * Set the value of JobId
 88  
      *
 89  
      * @param v new value
 90  
      */
 91  
     public void setJobId(int v) 
 92  
     {
 93  
 
 94  12
         if (this.jobId != v)
 95  
         {
 96  12
             this.jobId = v;
 97  12
             setModified(true);
 98  
         }
 99  
 
 100  
 
 101  12
     }
 102  
 
 103  
     /**
 104  
      * Get the Second
 105  
      *
 106  
      * @return int
 107  
      */
 108  
     public int getSecond()
 109  
     {
 110  14
         return second;
 111  
     }
 112  
 
 113  
 
 114  
     /**
 115  
      * Set the value of Second
 116  
      *
 117  
      * @param v new value
 118  
      */
 119  
     public void setSecond(int v) 
 120  
     {
 121  
 
 122  8
         if (this.second != v)
 123  
         {
 124  8
             this.second = v;
 125  8
             setModified(true);
 126  
         }
 127  
 
 128  
 
 129  8
     }
 130  
 
 131  
     /**
 132  
      * Get the Minute
 133  
      *
 134  
      * @return int
 135  
      */
 136  
     public int getMinute()
 137  
     {
 138  16
         return minute;
 139  
     }
 140  
 
 141  
 
 142  
     /**
 143  
      * Set the value of Minute
 144  
      *
 145  
      * @param v new value
 146  
      */
 147  
     public void setMinute(int v) 
 148  
     {
 149  
 
 150  8
         if (this.minute != v)
 151  
         {
 152  6
             this.minute = v;
 153  6
             setModified(true);
 154  
         }
 155  
 
 156  
 
 157  8
     }
 158  
 
 159  
     /**
 160  
      * Get the Hour
 161  
      *
 162  
      * @return int
 163  
      */
 164  
     public int getHour()
 165  
     {
 166  8
         return hour;
 167  
     }
 168  
 
 169  
 
 170  
     /**
 171  
      * Set the value of Hour
 172  
      *
 173  
      * @param v new value
 174  
      */
 175  
     public void setHour(int v) 
 176  
     {
 177  
 
 178  8
         if (this.hour != v)
 179  
         {
 180  0
             this.hour = v;
 181  0
             setModified(true);
 182  
         }
 183  
 
 184  
 
 185  8
     }
 186  
 
 187  
     /**
 188  
      * Get the WeekDay
 189  
      *
 190  
      * @return int
 191  
      */
 192  
     public int getWeekDay()
 193  
     {
 194  8
         return weekDay;
 195  
     }
 196  
 
 197  
 
 198  
     /**
 199  
      * Set the value of WeekDay
 200  
      *
 201  
      * @param v new value
 202  
      */
 203  
     public void setWeekDay(int v) 
 204  
     {
 205  
 
 206  8
         if (this.weekDay != v)
 207  
         {
 208  0
             this.weekDay = v;
 209  0
             setModified(true);
 210  
         }
 211  
 
 212  
 
 213  8
     }
 214  
 
 215  
     /**
 216  
      * Get the DayOfMonth
 217  
      *
 218  
      * @return int
 219  
      */
 220  
     public int getDayOfMonth()
 221  
     {
 222  8
         return dayOfMonth;
 223  
     }
 224  
 
 225  
 
 226  
     /**
 227  
      * Set the value of DayOfMonth
 228  
      *
 229  
      * @param v new value
 230  
      */
 231  
     public void setDayOfMonth(int v) 
 232  
     {
 233  
 
 234  8
         if (this.dayOfMonth != v)
 235  
         {
 236  0
             this.dayOfMonth = v;
 237  0
             setModified(true);
 238  
         }
 239  
 
 240  
 
 241  8
     }
 242  
 
 243  
     /**
 244  
      * Get the Task
 245  
      *
 246  
      * @return String
 247  
      */
 248  
     public String getTask()
 249  
     {
 250  8
         return task;
 251  
     }
 252  
 
 253  
 
 254  
     /**
 255  
      * Set the value of Task
 256  
      *
 257  
      * @param v new value
 258  
      */
 259  
     public void setTask(String v) 
 260  
     {
 261  
 
 262  8
         if (!ObjectUtils.equals(this.task, v))
 263  
         {
 264  8
             this.task = v;
 265  8
             setModified(true);
 266  
         }
 267  
 
 268  
 
 269  8
     }
 270  
 
 271  
     /**
 272  
      * Get the Email
 273  
      *
 274  
      * @return String
 275  
      */
 276  
     public String getEmail()
 277  
     {
 278  0
         return email;
 279  
     }
 280  
 
 281  
 
 282  
     /**
 283  
      * Set the value of Email
 284  
      *
 285  
      * @param v new value
 286  
      */
 287  
     public void setEmail(String v) 
 288  
     {
 289  
 
 290  0
         if (!ObjectUtils.equals(this.email, v))
 291  
         {
 292  0
             this.email = v;
 293  0
             setModified(true);
 294  
         }
 295  
 
 296  
 
 297  0
     }
 298  
 
 299  
     /**
 300  
      * Get the Property
 301  
      *
 302  
      * @return byte[]
 303  
      */
 304  
     public byte[] getProperty()
 305  
     {
 306  0
         return property;
 307  
     }
 308  
 
 309  
 
 310  
     /**
 311  
      * Set the value of Property
 312  
      *
 313  
      * @param v new value
 314  
      */
 315  
     public void setProperty(byte[] v) 
 316  
     {
 317  
 
 318  0
         if (!ObjectUtils.equals(this.property, v))
 319  
         {
 320  0
             this.property = v;
 321  0
             setModified(true);
 322  
         }
 323  
 
 324  
 
 325  0
     }
 326  
 
 327  
        
 328  
         
 329  4
     private static List<String> fieldNames = null;
 330  
 
 331  
     /**
 332  
      * Generate a list of field names.
 333  
      *
 334  
      * @return a list of field names
 335  
      */
 336  
     public static synchronized List<String> getFieldNames()
 337  
     {
 338  0
         if (fieldNames == null)
 339  
         {
 340  0
             fieldNames = new ArrayList<String>();
 341  0
             fieldNames.add("JobId");
 342  0
             fieldNames.add("Second");
 343  0
             fieldNames.add("Minute");
 344  0
             fieldNames.add("Hour");
 345  0
             fieldNames.add("WeekDay");
 346  0
             fieldNames.add("DayOfMonth");
 347  0
             fieldNames.add("Task");
 348  0
             fieldNames.add("Email");
 349  0
             fieldNames.add("Property");
 350  0
             fieldNames = Collections.unmodifiableList(fieldNames);
 351  
         }
 352  0
         return fieldNames;
 353  
     }
 354  
 
 355  
     /**
 356  
      * Retrieves a field from the object by field (Java) name passed in as a String.
 357  
      *
 358  
      * @param name field name
 359  
      * @return value
 360  
      */
 361  
     public Object getByName(String name)
 362  
     {
 363  0
         if (name.equals("JobId"))
 364  
         {
 365  0
             return new Integer(getJobId());
 366  
         }
 367  0
         if (name.equals("Second"))
 368  
         {
 369  0
             return new Integer(getSecond());
 370  
         }
 371  0
         if (name.equals("Minute"))
 372  
         {
 373  0
             return new Integer(getMinute());
 374  
         }
 375  0
         if (name.equals("Hour"))
 376  
         {
 377  0
             return new Integer(getHour());
 378  
         }
 379  0
         if (name.equals("WeekDay"))
 380  
         {
 381  0
             return new Integer(getWeekDay());
 382  
         }
 383  0
         if (name.equals("DayOfMonth"))
 384  
         {
 385  0
             return new Integer(getDayOfMonth());
 386  
         }
 387  0
         if (name.equals("Task"))
 388  
         {
 389  0
             return getTask();
 390  
         }
 391  0
         if (name.equals("Email"))
 392  
         {
 393  0
             return getEmail();
 394  
         }
 395  0
         if (name.equals("Property"))
 396  
         {
 397  0
             return getProperty();
 398  
         }
 399  0
         return null;
 400  
     }
 401  
 
 402  
     /**
 403  
      * Set a field in the object by field (Java) name.
 404  
      *
 405  
      * @param name field name
 406  
      * @param value field value
 407  
      * @return True if value was set, false if not (invalid name / protected field).
 408  
      * @throws IllegalArgumentException if object type of value does not match field object type.
 409  
      * @throws TorqueException If a problem occurs with the set[Field] method.
 410  
      */
 411  
     public boolean setByName(String name, Object value )
 412  
         throws TorqueException, IllegalArgumentException
 413  
     {
 414  0
         if (name.equals("JobId"))
 415  
         {
 416  0
             if (value == null || ! (Integer.class.isInstance(value)))
 417  
             {
 418  0
                 throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
 419  
             }
 420  0
             setJobId(((Integer) value).intValue());
 421  0
             return true;
 422  
         }
 423  0
         if (name.equals("Second"))
 424  
         {
 425  0
             if (value == null || ! (Integer.class.isInstance(value)))
 426  
             {
 427  0
                 throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
 428  
             }
 429  0
             setSecond(((Integer) value).intValue());
 430  0
             return true;
 431  
         }
 432  0
         if (name.equals("Minute"))
 433  
         {
 434  0
             if (value == null || ! (Integer.class.isInstance(value)))
 435  
             {
 436  0
                 throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
 437  
             }
 438  0
             setMinute(((Integer) value).intValue());
 439  0
             return true;
 440  
         }
 441  0
         if (name.equals("Hour"))
 442  
         {
 443  0
             if (value == null || ! (Integer.class.isInstance(value)))
 444  
             {
 445  0
                 throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
 446  
             }
 447  0
             setHour(((Integer) value).intValue());
 448  0
             return true;
 449  
         }
 450  0
         if (name.equals("WeekDay"))
 451  
         {
 452  0
             if (value == null || ! (Integer.class.isInstance(value)))
 453  
             {
 454  0
                 throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
 455  
             }
 456  0
             setWeekDay(((Integer) value).intValue());
 457  0
             return true;
 458  
         }
 459  0
         if (name.equals("DayOfMonth"))
 460  
         {
 461  0
             if (value == null || ! (Integer.class.isInstance(value)))
 462  
             {
 463  0
                 throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
 464  
             }
 465  0
             setDayOfMonth(((Integer) value).intValue());
 466  0
             return true;
 467  
         }
 468  0
         if (name.equals("Task"))
 469  
         {
 470  
             // Object fields can be null
 471  0
             if (value != null && ! String.class.isInstance(value))
 472  
             {
 473  0
                 throw new IllegalArgumentException("Invalid type of object specified for value in setByName");
 474  
             }
 475  0
             setTask((String) value);
 476  0
             return true;
 477  
         }
 478  0
         if (name.equals("Email"))
 479  
         {
 480  
             // Object fields can be null
 481  0
             if (value != null && ! String.class.isInstance(value))
 482  
             {
 483  0
                 throw new IllegalArgumentException("Invalid type of object specified for value in setByName");
 484  
             }
 485  0
             setEmail((String) value);
 486  0
             return true;
 487  
         }
 488  0
         if (name.equals("Property"))
 489  
         {
 490  
             // Object fields can be null
 491  0
             if (value != null && ! byte[].class.isInstance(value))
 492  
             {
 493  0
                 throw new IllegalArgumentException("Invalid type of object specified for value in setByName");
 494  
             }
 495  0
             setProperty((byte[]) value);
 496  0
             return true;
 497  
         }
 498  0
         return false;
 499  
     }
 500  
 
 501  
     /**
 502  
      * Retrieves a field from the object by name passed in
 503  
      * as a String.  The String must be one of the static
 504  
      * Strings defined in this Class' Peer.
 505  
      *
 506  
      * @param name peer name
 507  
      * @return value
 508  
      */
 509  
     public Object getByPeerName(String name)
 510  
     {
 511  0
         if (name.equals(JobEntryPeer.JOB_ID))
 512  
         {
 513  0
             return new Integer(getJobId());
 514  
         }
 515  0
         if (name.equals(JobEntryPeer.SECOND))
 516  
         {
 517  0
             return new Integer(getSecond());
 518  
         }
 519  0
         if (name.equals(JobEntryPeer.MINUTE))
 520  
         {
 521  0
             return new Integer(getMinute());
 522  
         }
 523  0
         if (name.equals(JobEntryPeer.HOUR))
 524  
         {
 525  0
             return new Integer(getHour());
 526  
         }
 527  0
         if (name.equals(JobEntryPeer.WEEK_DAY))
 528  
         {
 529  0
             return new Integer(getWeekDay());
 530  
         }
 531  0
         if (name.equals(JobEntryPeer.DAY_OF_MONTH))
 532  
         {
 533  0
             return new Integer(getDayOfMonth());
 534  
         }
 535  0
         if (name.equals(JobEntryPeer.TASK))
 536  
         {
 537  0
             return getTask();
 538  
         }
 539  0
         if (name.equals(JobEntryPeer.EMAIL))
 540  
         {
 541  0
             return getEmail();
 542  
         }
 543  0
         if (name.equals(JobEntryPeer.PROPERTY))
 544  
         {
 545  0
             return getProperty();
 546  
         }
 547  0
         return null;
 548  
     }
 549  
 
 550  
     /**
 551  
      * Set field values by Peer Field Name
 552  
      *
 553  
      * @param name field name
 554  
      * @param value field value
 555  
      * @return True if value was set, false if not (invalid name / protected field).
 556  
      * @throws IllegalArgumentException if object type of value does not match field object type.
 557  
      * @throws TorqueException If a problem occurs with the set[Field] method.
 558  
      */
 559  
     public boolean setByPeerName(String name, Object value)
 560  
         throws TorqueException, IllegalArgumentException
 561  
     {
 562  0
       if (JobEntryPeer.JOB_ID.equals(name))
 563  
         {
 564  0
             return setByName("JobId", value);
 565  
         }
 566  0
       if (JobEntryPeer.SECOND.equals(name))
 567  
         {
 568  0
             return setByName("Second", value);
 569  
         }
 570  0
       if (JobEntryPeer.MINUTE.equals(name))
 571  
         {
 572  0
             return setByName("Minute", value);
 573  
         }
 574  0
       if (JobEntryPeer.HOUR.equals(name))
 575  
         {
 576  0
             return setByName("Hour", value);
 577  
         }
 578  0
       if (JobEntryPeer.WEEK_DAY.equals(name))
 579  
         {
 580  0
             return setByName("WeekDay", value);
 581  
         }
 582  0
       if (JobEntryPeer.DAY_OF_MONTH.equals(name))
 583  
         {
 584  0
             return setByName("DayOfMonth", value);
 585  
         }
 586  0
       if (JobEntryPeer.TASK.equals(name))
 587  
         {
 588  0
             return setByName("Task", value);
 589  
         }
 590  0
       if (JobEntryPeer.EMAIL.equals(name))
 591  
         {
 592  0
             return setByName("Email", value);
 593  
         }
 594  0
       if (JobEntryPeer.PROPERTY.equals(name))
 595  
         {
 596  0
             return setByName("Property", value);
 597  
         }
 598  0
         return false;
 599  
     }
 600  
 
 601  
     /**
 602  
      * Retrieves a field from the object by Position as specified
 603  
      * in the xml schema.  Zero-based.
 604  
      *
 605  
      * @param pos position in xml schema
 606  
      * @return value
 607  
      */
 608  
     public Object getByPosition(int pos)
 609  
     {
 610  0
         if (pos == 0)
 611  
         {
 612  0
             return new Integer(getJobId());
 613  
         }
 614  0
         if (pos == 1)
 615  
         {
 616  0
             return new Integer(getSecond());
 617  
         }
 618  0
         if (pos == 2)
 619  
         {
 620  0
             return new Integer(getMinute());
 621  
         }
 622  0
         if (pos == 3)
 623  
         {
 624  0
             return new Integer(getHour());
 625  
         }
 626  0
         if (pos == 4)
 627  
         {
 628  0
             return new Integer(getWeekDay());
 629  
         }
 630  0
         if (pos == 5)
 631  
         {
 632  0
             return new Integer(getDayOfMonth());
 633  
         }
 634  0
         if (pos == 6)
 635  
         {
 636  0
             return getTask();
 637  
         }
 638  0
         if (pos == 7)
 639  
         {
 640  0
             return getEmail();
 641  
         }
 642  0
         if (pos == 8)
 643  
         {
 644  0
             return getProperty();
 645  
         }
 646  0
         return null;
 647  
     }
 648  
 
 649  
     /**
 650  
      * Set field values by its position (zero based) in the XML schema.
 651  
      *
 652  
      * @param position The field position
 653  
      * @param value field value
 654  
      * @return True if value was set, false if not (invalid position / protected field).
 655  
      * @throws IllegalArgumentException if object type of value does not match field object type.
 656  
      * @throws TorqueException If a problem occurs with the set[Field] method.
 657  
      */
 658  
     public boolean setByPosition(int position, Object value)
 659  
         throws TorqueException, IllegalArgumentException
 660  
     {
 661  0
     if (position == 0)
 662  
         {
 663  0
             return setByName("JobId", value);
 664  
         }
 665  0
     if (position == 1)
 666  
         {
 667  0
             return setByName("Second", value);
 668  
         }
 669  0
     if (position == 2)
 670  
         {
 671  0
             return setByName("Minute", value);
 672  
         }
 673  0
     if (position == 3)
 674  
         {
 675  0
             return setByName("Hour", value);
 676  
         }
 677  0
     if (position == 4)
 678  
         {
 679  0
             return setByName("WeekDay", value);
 680  
         }
 681  0
     if (position == 5)
 682  
         {
 683  0
             return setByName("DayOfMonth", value);
 684  
         }
 685  0
     if (position == 6)
 686  
         {
 687  0
             return setByName("Task", value);
 688  
         }
 689  0
     if (position == 7)
 690  
         {
 691  0
             return setByName("Email", value);
 692  
         }
 693  0
     if (position == 8)
 694  
         {
 695  0
             return setByName("Property", value);
 696  
         }
 697  0
         return false;
 698  
     }
 699  
      
 700  
     /**
 701  
      * Stores the object in the database.  If the object is new,
 702  
      * it inserts it; otherwise an update is performed.
 703  
      *
 704  
      * @throws Exception
 705  
      */
 706  
     public void save() throws Exception
 707  
     {
 708  0
         save(JobEntryPeer.DATABASE_NAME);
 709  0
     }
 710  
 
 711  
     /**
 712  
      * Stores the object in the database.  If the object is new,
 713  
      * it inserts it; otherwise an update is performed.
 714  
      * Note: this code is here because the method body is
 715  
      * auto-generated conditionally and therefore needs to be
 716  
      * in this file instead of in the super class, BaseObject.
 717  
      *
 718  
      * @param dbName
 719  
      * @throws TorqueException
 720  
      */
 721  
     public void save(String dbName) throws TorqueException
 722  
     {
 723  0
         Connection con = null;
 724  
         try
 725  
         {
 726  0
             con = Transaction.begin(dbName);
 727  0
             save(con);
 728  0
             Transaction.commit(con);
 729  
         }
 730  0
         catch(TorqueException e)
 731  
         {
 732  0
             Transaction.safeRollback(con);
 733  0
             throw e;
 734  0
         }
 735  0
     }
 736  
 
 737  
     /** flag to prevent endless save loop, if this object is referenced
 738  
         by another object which falls in this transaction. */
 739  10
     private boolean alreadyInSave = false;
 740  
     /**
 741  
      * Stores the object in the database.  If the object is new,
 742  
      * it inserts it; otherwise an update is performed.  This method
 743  
      * is meant to be used as part of a transaction, otherwise use
 744  
      * the save() method and the connection details will be handled
 745  
      * internally
 746  
      *
 747  
      * @param con
 748  
      * @throws TorqueException
 749  
      */
 750  
     public void save(Connection con) throws TorqueException
 751  
     {
 752  0
         if (!alreadyInSave)
 753  
         {
 754  0
             alreadyInSave = true;
 755  
 
 756  
 
 757  
 
 758  
             // If this object has been modified, then save it to the database.
 759  0
             if (isModified())
 760  
             {
 761  0
                 if (isNew())
 762  
                 {
 763  0
                     JobEntryPeer.doInsert((JobEntry) this, con);
 764  0
                     setNew(false);
 765  
                 }
 766  
                 else
 767  
                 {
 768  0
                     JobEntryPeer.doUpdate((JobEntry) this, con);
 769  
                 }
 770  
             }
 771  
 
 772  0
             alreadyInSave = false;
 773  
         }
 774  0
     }
 775  
 
 776  
 
 777  
     /**
 778  
      * Set the PrimaryKey using ObjectKey.
 779  
      *
 780  
      * @param key jobId ObjectKey
 781  
      */
 782  
     public void setPrimaryKey(ObjectKey key)
 783  
         
 784  
     {
 785  0
         setJobId(((NumberKey) key).intValue());
 786  0
     }
 787  
 
 788  
     /**
 789  
      * Set the PrimaryKey using a String.
 790  
      *
 791  
      * @param key
 792  
      */
 793  
     public void setPrimaryKey(String key) 
 794  
     {
 795  0
         setJobId(Integer.parseInt(key));
 796  0
     }
 797  
 
 798  
 
 799  
     /**
 800  
      * returns an id that differentiates this object from others
 801  
      * of its class.
 802  
      */
 803  
     public ObjectKey getPrimaryKey()
 804  
     {
 805  40
         return SimpleKey.keyFor(getJobId());
 806  
     }
 807  
  
 808  
 
 809  
     /**
 810  
      * Makes a copy of this object.
 811  
      * It creates a new object filling in the simple attributes.
 812  
      * It then fills all the association collections and sets the
 813  
      * related objects to isNew=true.
 814  
      */
 815  
     public JobEntry copy() throws TorqueException
 816  
     {
 817  0
         return copy(true);
 818  
     }
 819  
 
 820  
     /**
 821  
      * Makes a copy of this object using connection.
 822  
      * It creates a new object filling in the simple attributes.
 823  
      * It then fills all the association collections and sets the
 824  
      * related objects to isNew=true.
 825  
      *
 826  
      * @param con the database connection to read associated objects.
 827  
      */
 828  
     public JobEntry copy(Connection con) throws TorqueException
 829  
     {
 830  0
         return copy(true, con);
 831  
     }
 832  
 
 833  
     /**
 834  
      * Makes a copy of this object.
 835  
      * It creates a new object filling in the simple attributes.
 836  
      * If the parameter deepcopy is true, it then fills all the
 837  
      * association collections and sets the related objects to
 838  
      * isNew=true.
 839  
      *
 840  
      * @param deepcopy whether to copy the associated objects.
 841  
      */
 842  
     public JobEntry copy(boolean deepcopy) throws TorqueException
 843  
     {
 844  0
         return copyInto(new JobEntry(), deepcopy);
 845  
     }
 846  
 
 847  
     /**
 848  
      * Makes a copy of this object using connection.
 849  
      * It creates a new object filling in the simple attributes.
 850  
      * If the parameter deepcopy is true, it then fills all the
 851  
      * association collections and sets the related objects to
 852  
      * isNew=true.
 853  
      *
 854  
      * @param deepcopy whether to copy the associated objects.
 855  
      * @param con the database connection to read associated objects.
 856  
      */
 857  
     public JobEntry copy(boolean deepcopy, Connection con) throws TorqueException
 858  
     {
 859  0
         return copyInto(new JobEntry(), deepcopy, con);
 860  
     }
 861  
   
 862  
     /**
 863  
      * Fills the copyObj with the contents of this object.
 864  
      * The associated objects are also copied and treated as new objects.
 865  
      *
 866  
      * @param copyObj the object to fill.
 867  
      */
 868  
     protected JobEntry copyInto(JobEntry copyObj) throws TorqueException
 869  
     {
 870  0
         return copyInto(copyObj, true);
 871  
     }
 872  
 
 873  
   
 874  
     /**
 875  
      * Fills the copyObj with the contents of this object using connection.
 876  
      * The associated objects are also copied and treated as new objects.
 877  
      *
 878  
      * @param copyObj the object to fill.
 879  
      * @param con the database connection to read associated objects.
 880  
      */
 881  
     protected JobEntry copyInto(JobEntry copyObj, Connection con) throws TorqueException
 882  
     {
 883  0
         return copyInto(copyObj, true, con);
 884  
     }
 885  
   
 886  
     /**
 887  
      * Fills the copyObj with the contents of this object.
 888  
      * If deepcopy is true, The associated objects are also copied
 889  
      * and treated as new objects.
 890  
      *
 891  
      * @param copyObj the object to fill.
 892  
      * @param deepcopy whether the associated objects should be copied.
 893  
      */
 894  
     protected JobEntry copyInto(JobEntry copyObj, boolean deepcopy) throws TorqueException
 895  
     {
 896  0
         copyObj.setJobId(jobId);
 897  0
         copyObj.setSecond(second);
 898  0
         copyObj.setMinute(minute);
 899  0
         copyObj.setHour(hour);
 900  0
         copyObj.setWeekDay(weekDay);
 901  0
         copyObj.setDayOfMonth(dayOfMonth);
 902  0
         copyObj.setTask(task);
 903  0
         copyObj.setEmail(email);
 904  0
         copyObj.setProperty(property);
 905  
 
 906  0
         copyObj.setJobId( 0);
 907  
 
 908  0
         if (deepcopy)
 909  
         {
 910  
         }
 911  0
         return copyObj;
 912  
     }
 913  
         
 914  
     
 915  
     /**
 916  
      * Fills the copyObj with the contents of this object using connection.
 917  
      * If deepcopy is true, The associated objects are also copied
 918  
      * and treated as new objects.
 919  
      *
 920  
      * @param copyObj the object to fill.
 921  
      * @param deepcopy whether the associated objects should be copied.
 922  
      * @param con the database connection to read associated objects.
 923  
      */
 924  
     protected JobEntry copyInto(JobEntry copyObj, boolean deepcopy, Connection con) throws TorqueException
 925  
     {
 926  0
         copyObj.setJobId(jobId);
 927  0
         copyObj.setSecond(second);
 928  0
         copyObj.setMinute(minute);
 929  0
         copyObj.setHour(hour);
 930  0
         copyObj.setWeekDay(weekDay);
 931  0
         copyObj.setDayOfMonth(dayOfMonth);
 932  0
         copyObj.setTask(task);
 933  0
         copyObj.setEmail(email);
 934  0
         copyObj.setProperty(property);
 935  
 
 936  0
         copyObj.setJobId( 0);
 937  
 
 938  0
         if (deepcopy)
 939  
         {
 940  
         }
 941  0
         return copyObj;
 942  
     }
 943  
     
 944  
     
 945  
 
 946  
     /**
 947  
      * returns a peer instance associated with this om.  Since Peer classes
 948  
      * are not to have any instance attributes, this method returns the
 949  
      * same instance for all member of this class. The method could therefore
 950  
      * be static, but this would prevent one from overriding the behavior.
 951  
      */
 952  
     public JobEntryPeer getPeer()
 953  
     {
 954  0
         return peer;
 955  
     }
 956  
 
 957  
     /**
 958  
      * Retrieves the TableMap object related to this Table data without
 959  
      * compiler warnings of using getPeer().getTableMap().
 960  
      *
 961  
      * @return The associated TableMap object.
 962  
      */
 963  
     public TableMap getTableMap() throws TorqueException
 964  
     {
 965  0
         return JobEntryPeer.getTableMap();
 966  
     }
 967  
 
 968  
 
 969  
     public String toString()
 970  
     {
 971  0
         StringBuffer str = new StringBuffer();
 972  0
         str.append("JobEntry:\n");
 973  0
         str.append("JobId = ")
 974  
            .append(getJobId())
 975  
            .append("\n");
 976  0
         str.append("Second = ")
 977  
            .append(getSecond())
 978  
            .append("\n");
 979  0
         str.append("Minute = ")
 980  
            .append(getMinute())
 981  
            .append("\n");
 982  0
         str.append("Hour = ")
 983  
            .append(getHour())
 984  
            .append("\n");
 985  0
         str.append("WeekDay = ")
 986  
            .append(getWeekDay())
 987  
            .append("\n");
 988  0
         str.append("DayOfMonth = ")
 989  
            .append(getDayOfMonth())
 990  
            .append("\n");
 991  0
         str.append("Task = ")
 992  
            .append(getTask())
 993  
            .append("\n");
 994  0
         str.append("Email = ")
 995  
            .append(getEmail())
 996  
            .append("\n");
 997  0
         str.append("Property = ")
 998  
            .append("<binary>")
 999  
            .append("\n");
 1000  0
         return(str.toString());
 1001  
     }
 1002  
 }