FileDocCategorySizeDatePackage
ReportEntry.javaAPI DocExample1983Tue Jun 08 11:26:42 BST 2004com.mycompany.expense

ReportEntry

public class ReportEntry extends Object implements Serializable
This class represents an entry in a Report.
author
Hans Bergsten, Gefion Software
version
1.0

Fields Summary
private int
id
private Date
date
private int
type
private double
amount
Constructors Summary
public ReportEntry()
Creates a new, empty instance.


              
      
    
public ReportEntry(ReportEntry src)
Creates an instance that is a copy of the provided instance.

        this.setId(src.getId());
        this.setDate(src.getDate());
        this.setType(src.getType());
        this.setAmount(src.getAmount());
    
Methods Summary
public doublegetAmount()
Returns the entry amount.

        return amount;
    
public java.util.DategetDate()
Returns the entry date.

        if (date == null) {
            date = new Date();
        }
        return date;
    
public intgetId()
Returns the entry ID.

        return id;
    
public intgetType()
Returns the entry type.

        return type;
    
public voidsetAmount(double amount)
Sets the entry amount.

        this.amount = amount;
    
public voidsetDate(java.util.Date date)
Sets the entry date.

        this.date = date;
    
public voidsetId(int id)
Sets the entry ID.

        this.id = id;
    
public voidsetType(int type)
Sets the entry type.

        this.type = type;
    
public java.lang.StringtoString()
Returns a String with all entry properties.

        return "id: " + id + " date: " + date + " type: " + type + 
	    " amount: " + amount;