Mapping a row from a SQL data to a Java object

前端 未结 9 1187
悲哀的现实
悲哀的现实 2021-02-06 02:34

I have a Java class with instance fields (and matching setter methods) that match the column names of a SQL database table. I would like to elegantly fetch a row from the table

9条回答
  •  别那么骄傲
    2021-02-06 02:58

    You could use an ORM like one of the JPA providers e.g. Hibernate. This lets you set up mappings between your objects and your tables.

提交回复
热议问题