All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.elephantdrummer.executor.base.JobData Maven / Gradle / Ivy

There is a newer version: 1.2.5
Show newest version
package com.elephantdrummer.executor.base;

import java.math.BigDecimal;
import java.util.Date;
import java.util.UUID;

import com.elephantdrummer.executor.base.structure.DrummerJobProvider;
import com.elephantdrummer.model.PtJob;
import com.elephantdrummer.model.PtJobApplication;
import com.elephantdrummer.trigger.base.DrumTrigger;

/**
 * Copyright 2018 Elephant Software Klaudiusz Wojtkowiak e-mail: [email protected]
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 * 
 *  http://www.apache.org/licenses/LICENSE-2.0 
 *  
 *  Unless required by applicable law or agreed to in writing, software 
 *  distributed under the License is distributed on an "AS IS" BASIS, 
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 *  See the License for the specific language governing permissions and 
 *  limitations under the License. 
 */
public class JobData {
	
	private String name;
	private Date startDate;
	private Date finishDate;
	private String id;
	private String parentId;
	private JobType taskType;
	private Class clazz;
	private PtJob ptJob; 
	private PtJobApplication ptJobPlatform;
	private Integer poolSize;
	private Boolean silent;
	private DrumTrigger trigger;
	private String finishInformation;
	private String executionComment;
	private int status;
	private BigDecimal ptExecutorId;
	
	public JobData(){
		
	}
	
	
	public String getName() {
		return name;
	}
	public JobData setName(String name) {
		this.name = name;
		return this;
	}
	public Date getStartDate() {
		return startDate;
	}
	public JobData setStartDate(Date startDate) {
		this.startDate = startDate;
		return this;
	}
	public Date getFinishDate() {
		return finishDate;
	}
	public JobData setFinishDate(Date finishDate) {
		this.finishDate = finishDate;
		return this;
	}
	
	public JobData start(){
		setId(UUID.randomUUID().toString().toUpperCase());
		return setStartDate(new Date());
	}
	
	public JobData finish(){
		return setFinishDate(new Date());
	}

	public String getId() {
		return id;
	}
	private void setId(String id) {
		this.id = id;
	}


	public String getParentId() {
		return parentId;
	}


	public JobData setParentId(String parentId) {
		this.parentId = parentId;
		return this;
	}


	public JobType getType() {
		return taskType;
	}


	public JobData setType(JobType taskType) {
		this.taskType = taskType;
		return this;
	}


	public Class getClazz() {
		return clazz;
	}


	public JobData setClazz(Class clazz) {
		this.clazz = clazz;
		return this;
	}


	public PtJob getPtJob() {
		return ptJob;
	}


	public void setPtJob(PtJob ptJob) {
		this.ptJob = ptJob;
	}



	public Integer getPoolSize() {
		return poolSize;
	}


	public void setPoolSize(Integer poolSize) {
		this.poolSize = poolSize;
	}




	public PtJobApplication getPtJobPlatform() {
		return ptJobPlatform;
	}


	public void setPtJobPlatform(PtJobApplication ptJobPlatform) {
		this.ptJobPlatform = ptJobPlatform;
	}


	public Boolean getSilent() {
		return silent;
	}


	public void setSilent(Boolean silent) {
		this.silent = silent;
	}


	public DrumTrigger getTrigger() {
		return trigger;
	}


	public void setTrigger(DrumTrigger trigger) {
		this.trigger = trigger;
	}


	public String getFinishInformation() {
		return finishInformation;
	}


	public void setFinishInformation(String finishInformation) {
		this.finishInformation = finishInformation;
	}


	public String getExecutionComment() {
		return executionComment;
	}


	public void setExecutionComment(String executionComment) {
		this.executionComment = executionComment;
	}


	public int getStatus() {
		return status;
	}


	public void setStatus(int status) {
		this.status = status;
	}


	public BigDecimal getPtExecutorId() {
		return ptExecutorId;
	}


	public void setPtExecutorId(BigDecimal ptExecutorId) {
		this.ptExecutorId = ptExecutorId;
	}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy