I have a data access control table to define a user access right of the transaction data, let say the table structure is something like below:
Table name: userDataAccess Columns: userID (Text), brandID (numeric, FK of Brand table), supplierID (numeric, FK of supplier table), categoryID (numeric, FK of category table)
userID | brandID | supplierID | categoryID u001 | 1123 | 102 | 2 u001 | 1123 | 102 | 3 u001 | 1002 | 111 | 2 u002 | 1001 | 101 | 1 u002 | 1002 | 101 | 1
Transaction tables, are breakdown to header and detail: Table name: trxHeader Columns: id (numeric), createdBy (text), createdOn (timestamp), documentNo (text), supplierID (numeric, FK of supplier table), remarks (Text)
Table name: trxDetail Columns: id (numeric), trxHeaderID (numeric, FK to trxHeader), brandID (numeric, FK of Brand table), categoryID (numeric, FK of Category table), itemCode (text), unitPrice (decimal), quantity (integer)
Now the question is how can I create a JPA entity for the userDataAccess which allow me to get the trxDetail (join table) filter with the dataAccess columns (or join with brandID, supplierID, categoryID), which the brandID and categoryID can direct join with trxDetail, but supplierID is in trxHeader?
- My objective is I need an entity class that can return me the transaction data which is only allow to access by the login user; this entity class will use to join with other tables for other searching filtering.
Thanks a lot!
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!