I have a problem while reading value of a List. I have this block of code:
Query<User> qr=ds.createQuery(User.class).field("UserID").equal(52005);
List<User> l=qr.asList();
Iterator i=l.iterator();
System.out.println(i.next().toString());
I have a list l
this list is populated with a query on a database (return a record with the UserID 52005). If I print the size of l
I can see the correct value (1) because there is a UserID with the value of 52005, but my problem is now I cant read the content of this list. If I use the above code I see something else what I expect i.e Untersuchungsraum.User@88c615
It seems that it is encoded, Untersuchungsraum
is the name of the package and User
is the name of my POJO class.
Here is my Pojo:
@Entity("Users")
public class User {
@Id private String id;
private String City;
private int UserID;
/**
* @return the city
*/
public String getCity() {
return City;
}
/**
* @param city the city to set
*/
public void setCity(String city) {
this.City = City;
}
...
How can I access to value of my list in this sitaution How can I see the City value in the list l