[Java] Form data transition into entity beans to persist them by the server side ORM
- by cscsaba242
Hello guys,
Is there any good explanation or tutorial which describes the common way how can we create entity beans from the received data of the form ?
The main reason of my question the treating the received ids (e.g id of country,city and so forth) which is the way from the id to entity ?
Example:
................Client side form
username:String
countryid:Integer (could be a drop down)
................Server side entities
public class UserBean
{
String username;
CountryBean Country;
}
public class CountryBean
{
String cityname;
Integer id;
}
............................................
Maybe the question is dependent of the used technology, but I guess there is a very common way.
I would like to comprehend the conventional approach of this problem.
(For the sake of the completeness I would like to save the form data (received by Stripes) by JPA)
Thanks advance.
cscsaba242