package AllWidgets_with_Mapping;
import DisplayProject.DisplayNode;
import DisplayProject.binding.beans.Observable;
import Framework.DateTimeData;
import Framework.File;
import Framework.GenericException;
import Framework.IntegerData;
import Framework.RuntimeProperties;
import Framework.TextData;
import java.io.Serializable;
import java.lang.RuntimeException;
/**
* FileNode<p>
* <p>
* @author Generated from Forte
* @since 19-Nov-2008
*/
@RuntimeProperties(isDistributed=false, isAnchored=false, isShared=false, isTransactional=false)
@SuppressWarnings("serial")
public class FileNode
extends DisplayNode
implements Serializable, Observable
{
// ----------
// Attributes
// ----------
private DateTimeData accessDate;
private TextData extension;
private DateTimeData modDate;
private IntegerData size;
// ------------
// Constructors
// ------------
public FileNode() {
// Explicitly call the superclass constructor to prevent the implicit call
super();
this.setModDate(new DateTimeData());
this.setAccessDate(new DateTimeData());
}
// ----------------------
// Accessors and Mutators
// ----------------------
public void setAccessDate(DateTimeData accessDate) {
DateTimeData oldValue = this.accessDate;
this.accessDate = accessDate;
// this.qq_Listeners.firePropertyChange("accessDate", oldValue, this.accessDate);
}
public DateTimeData getAccessDate() {
return this.accessDate;
}
public void setExtension(TextData extension) {
TextData oldValue = this.extension;
this.extension = extension;
// this.qq_Listeners.firePropertyChange("extension", oldValue, this.extension);
}
public TextData getExtension() {
return this.extension;
}
public void setModDate(DateTimeData modDate) {
DateTimeData oldValue = this.modDate;
this.modDate = modDate;
// this.qq_Listeners.firePropertyChange("modDate", oldValue, this.modDate);
}
public DateTimeData getModDate() {
return this.modDate;
}
public void setSize(IntegerData size) {
IntegerData oldValue = this.size;
this.size = size;
// this.qq_Listeners.firePropertyChange("size", oldValue, this.size);
}
public IntegerData getSize() {
return this.size;
}
// -------
// Methods
// -------
/**
* construct<p>
* <p>
* @param aFile Type: File
* @return FileNode
*/
public FileNode construct(File aFile) {
this.setDVNodeText(aFile.getPrefix());
this.setExtension(aFile.getSuffix());
this.setRelated(aFile);
try {
aFile.getUsageTime(this.getAccessDate(), this.getModDate());
this.setSize(new IntegerData(aFile.size()));
}
catch (RuntimeException qq_e) {
GenericException e = GenericException.transformToGenericException(qq_e);
}
return this;
}
} // end class FileNode
// c Pass 2 Conversion Time: 94 milliseconds