开发者

Data View Concept/Library/Pattern?

开发者 https://www.devze.com 2023-01-04 22:02 出处:网络
Any application that deals with data, has one screen or more to allow the user to look at data. Usually we dont offer all the 10 million records to look at, but a subset, defined by a filter (or a vie

Any application that deals with data, has one screen or more to allow the user to look at data. Usually we dont offer all the 10 million records to look at, but a subset, defined by a filter (or a view) that the user can create (and save). How to define these views that are translated (behind the scene) into some kind of "select from xxx where a=b and c>0;" ?

Hardcoding the selection of fields is not a very up-to-date approach. Rather offer something like a query-designer (as used in many DB GUI's like 开发者_运维技巧pgAdmin).

Is there any library or a solution approach that can be reused (DRY) ?

My environment: postgreSQL, Glassfish, JavaEE6, ZK


I have always done this on my own and, yes what a pain.
You could try http://openhms.sourceforge.net/sqlbuilder/

0

精彩评论

暂无评论...
验证码 换一张
取 消