Java Reference
In-Depth Information
Listing 9.3
PendingOrderDTO
public class PendingOrderDTO {
private String pendingOrderId;
private int state;
private Address deliveryAddress;
private Date deliveryTime;
private RestaurantDTO restaurant;
private List lineItems = new ArrayList();
public PendingOrderDTO() {
}
public String getPendingOrderId() {
return pendingOrderId;
}
public RestaurantDTO getRestaurant() {
return restaurant;
}
public int getState() {
return state;
}
public Address getDeliveryAddress() {
return deliveryAddress;
}
public Date getDeliveryTime() {
return deliveryTime;
}
}
It is a simple class that defines some fields and some getters and setters. Let's now
look at the DAO s that are used by the transaction scripts to access the database.
9.4 Implementing the DAOs with iBATIS and Spring
The phrase “it's turtles all the way down” refers to a myth (or perhaps an urban
legend) about the nature of the universe that says that the earth is on the back of
a turtle that is standing on the back of a larger turtle, and so on. I sometimes feel
the same way about software: one layer after another without end. Fortunately,
this really isn't true and in the case of business logic that is designed using the
 
 
 
 
Search WWH ::




Custom Search