| CPC G06F 16/2448 (2019.01) [G06F 8/51 (2013.01)] | 10 Claims |

|
1. A computer implemented method for efficient access to a database via a functional model-based procedure by seamlessly integrating Java Streams with database operations and directly mapping Java Streams to Java Persistence API, JPA, the JPA not being SQL, the method comprising:
generating by a processor: an initial builder corresponding to an original originating source, zero or more intermediate operations and a terminating operation;
storing in the memory, a sequence of operations;
translating the builder or parts of the builder to at least one operation using a JPA access language upon specifying the terminating operation;
the method further comprising optimization steps of:
reordering intermediate operations of same type while preserving Java Stream equivalence; or
squashing adjacent operations of the same type that preserve sequential operations: Order, Type, State, Side Effect, into one single equivalent operation; or
reordering intermediate operations that are of different types while still preserving a Java Stream equivalence; and
wherein if multiple intermediate operations of the same type are sequentially invoked, they are transformable into a singular operation.
|