Well folks, I do not know if the title of my question is correct, if it is not, someone edits please. I'll explain what my problem is.
I developed a tool that checks for conflicts between access control policies in Software as a course completion work. For example, it checks if the software has two policies that can not be executed by the user at the same time, such as the two policies:
- > It is allowed for user John to open a form.
- > It is prohibited for user John to open a form.
With this, my tool compares the Java objects called Politica, which has the second structure:
Policy (type, organization, user, action, object, date, dataFim).
But I look for these policies in a database, such as my university, which is DB2. What I need to do and I have no notion of how to do is:
- > How to connect to the database and get its structure.
- > After getting its structure, define which columns in the database, refer to the attributes of my Policy object?
If the table has the following structure:
ID - Type - Application - Action - Date Validity - Date Insertion - Unit
How to make an equation and say that: Type = Type, Application = Object, Action = Action, Date Validity = End Date, and so on ...
And get a query of this? And how to do this even if the tables are different, let Joins?
Summarizing and trying to explain again: How to make any database that has policies return a Query with objects equal to my Policy object.
I need a north to know where it's going and if it's possible. Many thanks.