We have a very big table, we use it to store contract information about different business types.
depends the actual business type, different columns in that table will be used.
If we created views on that table with different business types, can these views be used in
any java ORM framework ?
I believe yes. View is the DB level abstraction that allows user to run queries against it exactly as against regular table. ORM framework is just yet another user from DB perspective, so this approach should work.
But I personally do not think this is the best solution. I believe that DB should do what it knows to do: store normalized data in tables. Business layer (written in java in our case) should be responsible on all logic including filtering of data from the DB. This means that view you mentioned should be probably “implemented” in buseness layer. For example you can wrap your DAO with aspect that adds some additional conditions to WHERE clause, so you get effect of “view” implemented in java. This gives you a lot of advantages like flexibility etc.