I'm fairly new to Java and having a hard time understanding how to access the methodss and setting variables to a specific value that are in my Bean class. I am creating new instances of the Bean class and wanting to set the variables to a specific value. I also want to store these all in a List. Here is the code I have: public class ReportBean { //instance variables
private String inventoryFulfillmentSpecialist;
private String inventoryFulfillmentManager;
private String poNumber;
private String poReferenceNumber;
private String shipToLoc;
private String poStatus;
private String importStatus;
private String orderType;
private String item;
private String mismatchFields;
private String tValue;
private String hValue;
/**
* Getter method for variable 'inventoryFulfillmentSpecialist'.
* @return String
*/
public String getInventoryFulfillmentManager() {
return inventoryFulfillmentManager;
}
/**
* Getter method for variable 'inventoryFulfillmentSpecialist'.
* @return String
*/
public String getInventoryFulfillmentSpecialist() {
return inventoryFulfillmentSpecialist;
}
/**
* Getter method for variable 'poNumber'.
* @return String
*/
public String getPoNumber() {
return poNumber;
}
/**
* Getter method for variable 'poReferenceNumber'.
* @return String
*/
public String getPoReferenceNumber() {
return poReferenceNumber;
}
/**
* Getter method for variable 'shipToLoc'.
* @return String
*/
public String getShipToLoc() {
return shipToLoc;
}
/**
* Getter method for variable 'poStatus'.
* @return String
*/
public String getPoStatus() {
return poStatus;
}
/**
* Getter method for variable 'importStatus'.
* @return String
*/
public String getImportStatus() {
return importStatus;
}
/**
* Getter method for variable 'orderType'.
* @return String
*/
public String getOrderType() {
return orderType;
}
/**
* Getter method for variable 'item'.
* @return String
*/
public String getItem() {
return item;
}
/**
* Getter method for variable 'tssVsPoMisMatchFields'.
* @return String
*/
public String getTssVsPODirectMisMatchFields() {
return tssVsPODirectMisMatchFields;
}
/**
* Getter method for variable 'tradeStoneValue'.
* @return String
*/
public String getTradeStoneValue() {
return tradeStoneValue;
}
/**
* Getter method for variable 'hostValue'.
* @return String
*/
public String getHostValue() {
return hostValue;
}
/**
* Setter method for variable 'inventoryFullfilmentManager'.
* @param inventoryFulfillmentManager String
*/
public void setInventoryFulfillmentManager(String inventoryFulfillmentManager) {
this.inventoryFulfillmentManager = inventoryFulfillmentManager;
}
/**
* Setter method for variable 'inventoryFulfillmentSpecialist'.
* @param inventoryFulfillmentSpecialist String
*/
public void setInventoryFulfillmentSpecialist(
String inventoryFulfillmentSpecialist) {
this.inventoryFulfillmentSpecialist = inventoryFulfillmentSpecialist;
}
/**
* Setter method for variable 'poNumber'.
* @param poNumber String
*/
public void setPoNumber(String poNumber) {
this.poNumber = poNumber;
}
/**
* Setter method for variable 'poReferenceNumber'.
* @param poReferenceNumber String
*/
public void setPoReferenceNumber(String poReferenceNumber) {
this.poReferenceNumber = poReferenceNumber;
}
/**
* Setter method for variable 'shipToLoc'.
* @param shipToLoc String
*/
public void setShipToLoc(String shipToLoc) {
this.shipToLoc = shipToLoc;
}
/**
* Setter method for variable 'poStatus'.
* @param poStatus String
*/
public void setPoStatus(String poStatus) {
this.poStatus = poStatus;
}
/**
* Setter method for variable 'importStatus'.
* @param importStatus String
*/
public void setImportStatus(String importStatus) {
this.importStatus = importStatus;
}
/**
* Setter method for variable 'orderType'.
* @param orderType String
*/
public void setOrderType(String orderType) {
this.orderType = orderType;
}
/**
* Setter method for variable 'item'.
* @param item String
*/
public void setItem(String item) {
this.item = item;
}
/**
* Setter method for variable 'tssVsPODirectMisMatchFields'.
* @param tssVsPODirectMisMatchFields String
*/
public void setTssVsPODirectMisMatchFields(String tssVsPODirectMisMatchFields) {
this.tssVsPODirectMisMatchFields = tssVsPODirectMisMatchFields;
}
/**
* Setter method for variable 'tradeStoneValue'.
* @param tradeStoneValue String
*/
public void setTradeStoneValue(String tradeStoneValue) {
this.tradeStoneValue = tradeStoneValue;
}
/**
* Setter method for variable 'hostValue'.
* @param hostValue String
*/
public void setHostValue(String hostValue) {
this.hostValue = hostValue;
}
List<ReportBean> reportData = new ArrayList<ReportBean>();
ReportBean bean1 = new ReportBean();
ReportBean bean2 = new ReportBean();
ReportBean bean3 = new ReportBean();
bean1.setInventoryFulfillmentManager("Jackie Luffman");
bean1.setInventoryFulfillmentSpecialist("Phillip Smith");
bean1.setPoNumber("348794798");
bean1.setPoReferenceNumber("140629700");
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("ReportBean: ");
sb.append("inventoryFulfillmentManager = " + getInventoryFulfillmentManager() + " ");
sb.append("inventoryFulfillmentSpecialist = " + getInventoryFulfillmentSpecialist() + " ");
sb.append("poNumber = " + getPoNumber() + " ");
sb.append("poReferenceNumber = " + getPoReferenceNumber() + " ");
sb.append("shipToLoc = " + getShipToLoc() + " ");
sb.append("poStatus = " + getPoStatus() + " ");
sb.append("importStatus = " + getImportStatus() + " ");
sb.append("orderType = + " + getOrderType() + " ");
sb.append("item = " + getItem() + " ");
sb.append("tssVsPODirectMisMatchFields = " + getTssVsPODirectMisMatchFields() + " ");
sb.append("tradeStoneValue = " + getTradeStoneValue() + " ");
sb.append("hostValue = " + getHostValue() + " ");
return sb.toString();
}
}
I get errors and when I try to say bean1.setxxxx I get the red squiggly line and it's says "syntax error on token(s), misplaced construct(s)". If anyone could help it would be much appreciated, thanks.