Thursday, 14 April 2011

Spring : Create a class equivalent to entity

Entity corresponding to database shown in this post :
package entity;

public class Flight {

private String flightNo;
private String carrier;
private String from;
private String to;

public String getFlightNo() {
return flightNo;
}
public void setFlightNo(String flightNo) {
this.flightNo = flightNo;
}
public String getCarrier() {
return carrier;
}
public void setCarrier(String carrier) {
this.carrier = carrier;
}
public String getFrom() {
return from;
}
public void setFrom(String from) {
this.from = from;
}
public String getTo() {
return to;
}
public void setTo(String to
package entity;

public class Flight {

private String flightNo;
private String carrier;
private String from;
private String to;

public String getFlightNo() {
return flightNo;
}
public void setFlightNo(String flightNo) {
this.flightNo = flightNo;
}
public String getCarrier() {
return carrier;
}
public void setCarrier(String carrier) {
this.carrier = carrier;
}
public String getFrom() {
return from;
}
public void setFrom(String from) {
this.from = from;
}
public String getTo() {
return to;
}
public void setTo(String to) {
this.to = to;
}


}
)
{ this.to = to; } }

No comments:

Post a Comment