Class BatchInfo

java.lang.Object
fr.becpg.repo.batch.BatchInfo
All Implemented Interfaces:
Serializable

public class BatchInfo extends Object implements Serializable

BatchInfo class.

Version:
$Id: $Id
Author:
matthieu
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • DEFAULT_BATCH_THREAD

      private static final int DEFAULT_BATCH_THREAD
      Constant BATCH_THREAD=3
      See Also:
    • DEFAULT_BATCH_SIZE

      private static final int DEFAULT_BATCH_SIZE
      Constant BATCH_SIZE=15
      See Also:
    • batchId

      private String batchId
      Will serve as uniq batchId
    • batchDescId

      private String batchDescId
      Id of the batch will be used assign to threadPool
    • batchUser

      private String batchUser
      User that has launch the batch
    • stepDescId

      private String stepDescId
    • currentStep

      private Integer currentStep
    • totalSteps

      private Integer totalSteps
    • currentItem

      private Integer currentItem
    • totalItems

      private Integer totalItems
    • runAsSystem

      private Boolean runAsSystem
    • notifyByMail

      private Boolean notifyByMail
    • mailAction

      private String mailAction
    • mailActionUrl

      private String mailActionUrl
    • entityDescription

      private String entityDescription
    • workerThreads

      private int workerThreads
    • batchSize

      private int batchSize
    • isCompleted

      private Boolean isCompleted
    • tenant

      private String tenant
    • isCancelled

      private boolean isCancelled
    • BATCH_DESC_ID

      public static final String BATCH_DESC_ID
      Constant BATCH_DESC_ID="batchDescId"
      See Also:
    • BATCH_USER

      public static final String BATCH_USER
      Constant BATCH_USER="batchUser"
      See Also:
    • BATCH_ID

      public static final String BATCH_ID
      Constant BATCH_ID="batchId"
      See Also:
    • priority

      private BatchPriority priority
  • Constructor Details

    • BatchInfo

      public BatchInfo(String batchId, String batchDescId)

      Constructor for BatchInfo.

      Parameters:
      batchId - a String object
      batchDescId - a String object
    • BatchInfo

      public BatchInfo(String batchId, String batchDescId, String entityDescription)

      Constructor for BatchInfo.

      Parameters:
      batchId - a String object
      batchDescId - a String object
      entityDescription - a String object
  • Method Details

    • setCancelled

      public void setCancelled(boolean isCancelled)

      setCancelled.

      Parameters:
      isCancelled - a boolean
    • isCancelled

      public boolean isCancelled()

      isCancelled.

      Returns:
      a boolean
    • getCurrentItem

      public Integer getCurrentItem()

      Getter for the field currentItem.

      Returns:
      a Integer object
    • setCurrentItem

      public void setCurrentItem(Integer currentItem)

      Setter for the field currentItem.

      Parameters:
      currentItem - a Integer object
    • getTotalItems

      public Integer getTotalItems()

      Getter for the field totalItems.

      Returns:
      a Integer object
    • setTotalItems

      public void setTotalItems(Integer totalItems)

      Setter for the field totalItems.

      Parameters:
      totalItems - a Integer object
    • getCurrentStep

      public Integer getCurrentStep()

      Getter for the field currentStep.

      Returns:
      a Integer object
    • setCurrentStep

      public void setCurrentStep(Integer currentStep)

      Setter for the field currentStep.

      Parameters:
      currentStep - a Integer object
    • getTotalSteps

      public Integer getTotalSteps()

      Getter for the field totalSteps.

      Returns:
      a Integer object
    • setTotalSteps

      public void setTotalSteps(Integer totalSteps)

      Setter for the field totalSteps.

      Parameters:
      totalSteps - a Integer object
    • getStepDescId

      public String getStepDescId()

      Getter for the field stepDescId.

      Returns:
      a String object
    • setStepDescId

      public void setStepDescId(String stepDescId)

      Setter for the field stepDescId.

      Parameters:
      stepDescId - a String object
    • getPriority

      public int getPriority()

      Getter for the field priority.

      Returns:
      a int
    • setPriority

      public void setPriority(BatchPriority priority)

      Setter for the field priority.

      Parameters:
      priority - a BatchPriority object
    • getTenant

      public String getTenant()

      Getter for the field tenant.

      Returns:
      a String object
    • getBatchId

      public String getBatchId()

      Getter for the field batchId.

      Returns:
      a String object
    • getBatchUser

      public String getBatchUser()

      Getter for the field batchUser.

      Returns:
      a String object
    • getRunAsSystem

      public Boolean getRunAsSystem()

      Getter for the field runAsSystem.

      Returns:
      a Boolean object
    • getNotifyByMail

      public Boolean getNotifyByMail()

      Getter for the field notifyByMail.

      Returns:
      a Boolean object
    • getEntityDescription

      public String getEntityDescription()

      Getter for the field entityDescription.

      Returns:
      a String object
    • enableNotifyByMail

      public void enableNotifyByMail(String mailAction, String mailActionUrl)

      enableNotifyByMail.

      Parameters:
      mailAction - a String object
      mailActionUrl - a String object
    • setBatchId

      public void setBatchId(String batchId)

      Setter for the field batchId.

      Parameters:
      batchId - a String object
    • setBatchUser

      public void setBatchUser(String batchUser)

      Setter for the field batchUser.

      Parameters:
      batchUser - a String object
    • setRunAsSystem

      public void setRunAsSystem(Boolean runAsSystem)

      Setter for the field runAsSystem.

      Parameters:
      runAsSystem - a Boolean object
    • getMailActionUrl

      public String getMailActionUrl()

      Getter for the field mailActionUrl.

      Returns:
      a String object
    • getBatchDescId

      public String getBatchDescId()

      Getter for the field batchDescId.

      Returns:
      a String object
    • getMailAction

      public String getMailAction()

      Getter for the field mailAction.

      Returns:
      a String object
    • getWorkerThreads

      public int getWorkerThreads()

      Getter for the field workerThreads.

      Returns:
      a int
    • setWorkerThreads

      public void setWorkerThreads(int workerThreads)

      Setter for the field workerThreads.

      Parameters:
      workerThreads - a int
    • getBatchSize

      public int getBatchSize()

      Getter for the field batchSize.

      Returns:
      a int
    • setBatchSize

      public void setBatchSize(int batchSize)

      Setter for the field batchSize.

      Parameters:
      batchSize - a int
    • getIsCompleted

      public Boolean getIsCompleted()

      Getter for the field isCompleted.

      Returns:
      a Boolean object
    • setIsCompleted

      public void setIsCompleted(Boolean isCompleted)

      Setter for the field isCompleted.

      Parameters:
      isCompleted - a Boolean object
    • toJson

      public org.json.JSONObject toJson()

      toJson.

      Returns:
      a JSONObject object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object