Well, what really confuses me is that I created a standard pojo class and its dao class for data retrieval purposes. I find it difficult to understand the basic procedure for processing custom request data to the Pojo class.
let's say my user class
public class User{
private int userId;
private String username;
private int addressId;
}
public class Address{
private int addressId;
private String zip;
}
public class UserDAO{
public void getUserDetails(){
String getSql = select u.userId, u.username, a.zipcode from user u, address a where u.addressId = a.addressId;
}
}
now, how should I model this with my pojo class, as if using String to control this, then the concept of object-oriented calling disappears, and the complexity will increase in the future. kind guide!
Update for further clarification.
, pojo, , - , ? .. ? String? .