JDBC simulator for non-DB structures

Is there an environment for quickly building a JDBC-type interface for an internal data structure?

We have a complex internal data structure for which we must create reports. The data itself is stored in the database, but there is a lot of Java code that manages dependencies, permissions, data aggregation, etc. Although it is theoretically possible to write all this code again in SQL, it would be much easier if we could add an API like JDBC to display the application and specify a reporting structure for it.

Moreover, "JDBC" does not mean "SQL"; we could use something like commons jxpath to query our model or write our own simple query language.

[EDIT] What I'm looking for is that it implements most of the necessary boiler plate code, so you can write:

 // Get column names and types from "Foo" by reflection
 ReflectionResultSet rs = new ReflectionResultSet( Foo.class );

 List<Foo> results = ...;
 rs.setData( results );

and ReflectionResultSettake care of cursor control, all getters, etc.

+3
source share
3 answers

Looks like JoSQL (SQL for Java objects) is exactly what you want.

+1
source

try googling "jdbe driver framework" The first (for me) looks like it is suitable for you: http://jxdbcon.sourceforge.net/

, ( Google ), Spring JDBC Templage. http://www.zabada.com/tutorials/simplifying-jdbc-with-the-spring-jdbc-abstraction-framework.php

+1

, Driver . , JDBC ​​ URL , , ( , , Connection), JDBC-API, .

0

Source: https://habr.com/ru/post/1779615/


All Articles