I use criteria-api to made sql query to the database and it work very fine. But now I need to use dynamic tables , where some tables can be create or destroyed and some column can be add or removed.
I want to manage this entityties in dynamicBean of apache, then I can create bean and edit the column.
How can I made a sql sentece using criteria-api if the bean is not in the file persistence.xml and if it is a dynamic bean?