Hello everyone!
My User class has a field called gender which is 0 or 1 for male or female.
In order to display it as an Icon for "male" or "female" I am using the
following approach and i wonder whether that is good practise and
thread-safe etc...
My hibernate class is called HibernateUser
I have an additional class called User which looks like that:
class User {
private int gender;
private HibernateUser hibernateUser;
public User (HibernateUser hibernateUser){
this.hibernateUser=hibernateUser;
}
public String getIcon(){
if (gender.equals(0)){
return "male.gif";
}
else {
return "female.gif";
}
}
// + setter/getter for the private variables
}
Is that ok ?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]