Retrieve information from JPA Metamodel

天大地大妈咪最大 提交于 2019-12-08 05:28:40

问题


Jpa 2 metamodel has one known use: type safe criteria query. My question is different: I suppose metamodel can be source of information like length, human friendly description, left-right alligment etc, for example for building pretty GUI table (desktop or web, no matter). I imagine such quasi code:

SomeTable st = buildTable(Person_.class, Person_.surName, Person_.Height)

Tell me, I'm thinking in wrong way? My google research give no result. Or give some info to start reading

EDIT: auto correction, human friendly Column name is not in strict JPA area, but in other annotation family (validation is near to JPA / extension).

来源:https://stackoverflow.com/questions/32284675/retrieve-information-from-jpa-metamodel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!