/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package clips.delegate.job;
import clips.delegate.directory.complex.DirectoryDanger;
import clips.delegate.directory.complex.DirectoryDangerItem;
import cli_fmw.delegate.directory.complex.DirectoryLocator;
import cli_fmw.delegate.lists.DataChunk;
import cli_fmw.main.ClipsException;
import beans.user.job.entity.DangerJobDetails;
import java.io.Serializable;
import java.util.Date;
/**
*
* @author petr
*/
public class DangerExamChunk extends DataChunk<DangerJobDetails> implements Serializable, Cloneable{
public DangerExamChunk(DangerJobDetails details) {
super(details);
}
public DirectoryDangerItem getDanger() throws ClipsException{
DirectoryDanger danger = DirectoryLocator.getDirectory(DirectoryDanger.class, false);
return danger.getItemFromID(getDetails().dangerId);
}
public void setDanger(DirectoryDangerItem item){
this.getDetails().dangerId = item.getID();
}
public Date getLastExam(){
return this.getDetails().lastExam;
}
public void setLastExam(Date d){
this.getDetails().lastExam = d;
this.getDetails().lastExamManually = true;
}
public boolean isLastExamManually(){
return this.getDetails().lastExamManually;
}
}