data
Class Data

java.lang.Object
  extended by data.Data

public class Data
extends Object

A data encapsulates the information of each line in the file


Constructor Summary
Data()
          Initialize the default properties of a data
 
Method Summary
 void addInsuranceCoverType(String insuranceCoverType)
          Add a new insurance cover type to the company
 double getBrokerPercentage()
          Access to the broker percentage property
 String getCompanyName()
          Access to the company name property
 String getGeneralDescription()
          Access to the general description property
 int getID()
          Access to the ID property of the data
 ArrayList<String> getInsuranceCoverTypes()
          Access to the insurance cover types property
 String getTelephoneNumber()
          Access to the telephone number property
 String getWebAddress()
          Access to the web address property
 void setBrokerPercentage(double brokerPercentage)
          Initialize the broker percentage
 void setCompanyName(String companyName)
          Initialize the company name
 void setGeneralDescription(String generalDescription)
          Initialize the general description
 void setTelephoneNumber(String telephoneNumber)
          Initialize the company's telephone number
 void setWebAddress(String webAddress)
          Initialize the web address
 String toString()
          Return a string representation of the data ready for storing to the database
 String toStringWithoutID()
          Return a string representation but without the ID included
 
Methods inherited from class
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Data

public Data()
Initialize the default properties of a data

Method Detail

addInsuranceCoverType

public void addInsuranceCoverType(String insuranceCoverType)
Add a new insurance cover type to the company

Parameters:
insuranceCoverType - insurance cover type

getBrokerPercentage

public double getBrokerPercentage()
Access to the broker percentage property

Returns:
broker percentage

getCompanyName

public String getCompanyName()
Access to the company name property

Returns:
company name

getGeneralDescription

public String getGeneralDescription()
Access to the general description property

Returns:
general description

getID

public int getID()
Access to the ID property of the data

Returns:
id

getInsuranceCoverTypes

public ArrayList<String> getInsuranceCoverTypes()
Access to the insurance cover types property

Returns:
insurance cover types

getTelephoneNumber

public String getTelephoneNumber()
Access to the telephone number property

Returns:
telephone number

getWebAddress

public String getWebAddress()
Access to the web address property

Returns:
web address

setBrokerPercentage

public void setBrokerPercentage(double brokerPercentage)
Initialize the broker percentage

Parameters:
brokerPercentage - broker percentage

setCompanyName

public void setCompanyName(String companyName)
Initialize the company name

Parameters:
companyName - company name

setGeneralDescription

public void setGeneralDescription(String generalDescription)
Initialize the general description

Parameters:
generalDescription - general description

setTelephoneNumber

public void setTelephoneNumber(String telephoneNumber)
Initialize the company's telephone number

Parameters:
telephoneNumber -

setWebAddress

public void setWebAddress(String webAddress)
Initialize the web address

Parameters:
webAddress - company's web address

toString

public String toString()
Return a string representation of the data ready for storing to the database

Overrides:
toString in class Object
Returns:
string for persistence

toStringWithoutID

public String toStringWithoutID()
Return a string representation but without the ID included

Returns:
string for persistence