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