de.esprit.netsuite.server.batch

## Class ServerBatchTaskConfigEntry

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.netsuite.server.batch.ServerBatchTaskConfigEntry

- All Implemented Interfaces:
    DeepCloneable, Dumpable, java.io.Serializable, java.lang.Cloneable

      public class ServerBatchTaskConfigEntry
      extends TransferableObject

  This class encapsulates an entry in the srv_process.cfg file
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `batchTaskDocType`
    `static java.lang.String` | `batchTaskObject`
    `static java.lang.String` | `batchTaskParams`
    `static java.lang.String` | `commentField`
    `static java.lang.String` | `isEnabledField`
    `static java.lang.String` | `isLogHistoryField`
    `static java.lang.String` | `isSendEmailOnErrorField`
    `static java.lang.String` | `repeatDelayField`
    `static java.lang.String` | `startTimeField`
    `static java.lang.String` | `taskClassField`
    `static java.lang.String` | `taskNameField`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServerBatchTaskConfigEntry(java.lang.String taskName, java.lang.String className, java.sql.Timestamp startTime, Duration repeatDelay, boolean isEnabled, boolean isSendEmailOnError, boolean isLogHistory, java.lang.String comment)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCustomParameter(java.lang.String key, java.lang.String value)` Sets the new value and returns the previous value of the parameter.
    `long` | `calculateInitialDelay()` Calculates the initial delay in seconds by adding repeatDelay until the startTime is in future.
    `ServerBatchTaskConfigEntry` | `clone()`
    `boolean` | `equals(java.lang.Object obj)` Detects equality by processName.
    `java.lang.Class` | `getBatchTaskClass()`
    `java.lang.String` | `getBatchTaskName()`
    `java.lang.String` | `getComment()`
    `PropertyMap` | `getCustomParameters()` Returns the names of optional custom parameters
    `java.sql.Timestamp` | `getLastExecutionTimestamp()` Returns the cached timestamp of the last execution
    `Duration` | `getRepeatDelay()` The period of repetition in milliseconds
    `java.sql.Timestamp` | `getStartTime()`
    `int` | `hashCode()`
    `boolean` | `isEnabled()`
    `boolean` | `isLogHistory()`
    `boolean` | `isSendEmailOnError()`
    `void` | `setEnabled(boolean isEnabled)`
    `void` | `setLastExecutionTimestamp(DBTimestamp lastRunTs)`
    `void` | `setLogHistory(boolean isLogHistory)`
    `void` | `setRepeatDelay(Duration repeatDelay)`
    `void` | `setSendEmailOnError(boolean isSendEmailOnError)`
    `void` | `setStartTime(DBTimestamp startTime)`
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.
    `ToString` | `toString(ToString s)` This method allows subclasses to add values to the existing ToString of the superclass.

    - ### Methods inherited from class de.esprit.common.util.TransferableObject

      `copy`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### batchTaskDocType

          public static final java.lang.String batchTaskDocType

      See Also:
        Constant Field Values

    - #### batchTaskObject

          public static final java.lang.String batchTaskObject

      See Also:
        Constant Field Values

    - #### batchTaskParams

          public static final java.lang.String batchTaskParams

      See Also:
        Constant Field Values

    - #### taskNameField

          public static final java.lang.String taskNameField

      See Also:
        Constant Field Values

    - #### taskClassField

          public static final java.lang.String taskClassField

      See Also:
        Constant Field Values

    - #### startTimeField

          public static final java.lang.String startTimeField

      See Also:
        Constant Field Values

    - #### repeatDelayField

          public static final java.lang.String repeatDelayField

      See Also:
        Constant Field Values

    - #### isEnabledField

          public static final java.lang.String isEnabledField

      See Also:
        Constant Field Values

    - #### isSendEmailOnErrorField

          public static final java.lang.String isSendEmailOnErrorField

      See Also:
        Constant Field Values

    - #### isLogHistoryField

          public static final java.lang.String isLogHistoryField

      See Also:
        Constant Field Values

    - #### commentField

          public static final java.lang.String commentField

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ServerBatchTaskConfigEntry

          public ServerBatchTaskConfigEntry(java.lang.String taskName,
                                    java.lang.String className,
                                    java.sql.Timestamp startTime,
                                    Duration repeatDelay,
                                    boolean isEnabled,
                                    boolean isSendEmailOnError,
                                    boolean isLogHistory,
                                    java.lang.String comment)

  - ### Method Detail

    - #### setLastExecutionTimestamp

          public void setLastExecutionTimestamp(DBTimestamp lastRunTs)

    - #### getLastExecutionTimestamp

          public java.sql.Timestamp getLastExecutionTimestamp()

      Returns the cached timestamp of the last execution

    - #### clone

          public ServerBatchTaskConfigEntry clone()

      Overrides:
        `clone` in class `TransferableObject`

    - #### getCustomParameters

          public PropertyMap getCustomParameters()

      Returns the names of optional custom parameters

    - #### addCustomParameter

          public void addCustomParameter(java.lang.String key,
                                java.lang.String value)

      Sets the new value and returns the previous value of the parameter. If the parameter did not exist it is added and null is returned.

    - #### equals

          public boolean equals(java.lang.Object obj)

      Detects equality by processName. Note that the processName MUST be unique!
      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### getBatchTaskName

          public java.lang.String getBatchTaskName()

    - #### getComment

          public java.lang.String getComment()

    - #### getBatchTaskClass

          public java.lang.Class getBatchTaskClass()

    - #### getRepeatDelay

          public Duration getRepeatDelay()

      The period of repetition in milliseconds

    - #### getStartTime

          public java.sql.Timestamp getStartTime()

    - #### isEnabled

          public boolean isEnabled()

    - #### isSendEmailOnError

          public boolean isSendEmailOnError()

    - #### isLogHistory

          public boolean isLogHistory()

    - #### setLogHistory

          public void setLogHistory(boolean isLogHistory)

    - #### setSendEmailOnError

          public void setSendEmailOnError(boolean isSendEmailOnError)

    - #### setEnabled

          public void setEnabled(boolean isEnabled)

    - #### setRepeatDelay

          public void setRepeatDelay(Duration repeatDelay)

    - #### setStartTime

          public void setStartTime(DBTimestamp startTime)

    - #### calculateInitialDelay

          public long calculateInitialDelay()

      Calculates the initial delay in seconds by adding repeatDelay until the startTime is in future.

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `DumpableObject`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `DumpableObject`

Copyright © 2013 EsprIT-Systems. All Rights Reserved.