package isip.java.bullyse.bullydb; // This file simply holds the class type Offers. // Offers stores transaction offers for buying and selling. import java.io.*; import java.util.*; import java.sql.*; import java.text.*; public class Offers { private String Symbol; private String Type; private double offerValue; private int numShares; private Timestamp setAt; private String AcId; public Offers () { this.Symbol = (String)null; this.Type = (String)null; this.offerValue = 0.00; this.numShares = 0; this.setAt = null; this.AcId = (String)null; } public Offers (String Symbol, String Type, double offerValue, int numShares, Timestamp setAt, String ActId) { this.Symbol = Symbol; this.Type = Type; this.offerValue = offerValue; this.numShares = numShares; this.setAt = setAt; this.AcId = ActId; } public String getSymbol() { return Symbol; } public String getType() { return Type; } public double getValue() { return offerValue; } public int getShares() { return numShares; } public Timestamp getTimestamp() { return setAt; } public String getAccountId() { return AcId; } public void setSymbol(String Sym) { Symbol = Sym; } public void setType (String Typ) { Type = Typ; } public void setValue(double Value) { offerValue = Value; } public void setShares(int Shares) { numShares = Shares; } public void setTimestamp(Timestamp When) { setAt = When; } public void setAccountId(String acId) { AcId = acId; } public boolean compareOffers(Offers Previous) { Timestamp prevTime = Previous.getTimestamp(); if (setAt.before(prevTime) || setAt.equals(prevTime)) { return true; } else { return false; } } }