Code Monkey home page Code Monkey logo

uaicriteria's Introduction

uaiCriteria

How can JPA criteria became easier?

CodeStatus ---> Build Status Coverage Status Maven Central

Yes, your JPA Criteria can be easy. All you need to do is to add uaiCriteria in your implementation.

Imagine that you want to run the following JPQL:

select p from Person p 

If you want do write the JPQL above using only the JPA native Criteira, you should do something like:

 CriteriaQuery<Person> criteriaQuery = criteriaBuilder.createQuery(Person.class);
 Root<Person> root = criteriaQuery.from(Person.class);
 criteriaQuery.select(root);
 TypedQuery<Person> query = entityManager.createQuery(criteriaQuery);
 query.getResultList();

With uaiCriteria you could run like this:

UaiCriteria<Person> easyCriteria = UaiCriteriaFactory.createQueryCriteria(entityManager, Person.class);
uaiCriteria.getResultList();

To create a code like the code above, add the maven dependency below:

<dependency>
    <groupId>uaihebert.com</groupId>
    <artifactId>uaiCriteria</artifactId>
    <version>4.0.0</version>
</dependency>

Now, criteria is easy to use! ;)

You have the following mvn commands available:

  • if you want to build the project run: mvn clean package
  • if you want to test the project run: mvn clean test
  • if you want to generate the cobertura report use: mvn cobertura:clean cobertura:cobertura
    • the generated report can be found at: <uaiCriteria_FOLDER>/target/site/cobertura/index.html
  • if you have a sonar server you will be able to create a report by doing mvn sonar:sonar

uaicriteria's People

Contributors

uaicriteria avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.