org.dbmaintain.script
Class ExecutedScript

java.lang.Object
  extended by org.dbmaintain.script.ExecutedScript
All Implemented Interfaces:
Comparable<ExecutedScript>

public class ExecutedScript
extends Object
implements Comparable<ExecutedScript>

Author:
Filip Neven, Tim Ducheyne

Constructor Summary
ExecutedScript(Script script, Date executedAt, Boolean successful)
           
 
Method Summary
 int compareTo(ExecutedScript other)
           
 boolean equals(Object o)
           
 Date getExecutedAt()
           
 Script getScript()
           
 int hashCode()
           
 Boolean isSuccessful()
           
 void renameTo(Script script)
          Registers the fact that the script that was originally executed has been renamed.
 void setSuccessful(Boolean successful)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExecutedScript

public ExecutedScript(Script script,
                      Date executedAt,
                      Boolean successful)
Method Detail

getScript

public Script getScript()

getExecutedAt

public Date getExecutedAt()

isSuccessful

public Boolean isSuccessful()

setSuccessful

public void setSuccessful(Boolean successful)

renameTo

public void renameTo(Script script)
Registers the fact that the script that was originally executed has been renamed. This means the script is replaced by a new one: the one with the new filename, currently available on the filesystem. Important note: this method breaks the equals and hashcode: after invoking this method, the hashcode changes and the ExecutedScript object is no longer equal to a copy of the object taken before invoking this method. If this object is used in a hashmap or hashset, these collections should be disposed after having invoked this method.

Parameters:
script - The script to which the original script which was executed has been renamed.

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(ExecutedScript other)
Specified by:
compareTo in interface Comparable<ExecutedScript>


Copyright © 2011. All Rights Reserved.