Easy database queries for Java

Maven

Jinq releases can be downloaded from the Maven Central repository. Jinq has different dependencies you can import into your projects for different use cases.

Jinq for JPA/Hibernate/EclipseLink

Jinq's support for JPA can be included in your project by adding the jinq-jpa dependency to your Maven project. Depending on whether your project uses JavaEE's javax.persistence namespace or JakartaEE's jakarta.persistence namespace, you will need to choose between Jinq 1.8 or Jinq 2.0.

Jinq JPA 1.8 for JEE projects

If your project uses JPMS modules, you should add a dependency on the automatic modules org.jinq.jpa and org.jinq.api to your project's module.

<dependencies>
  <dependency>
    <groupId>org.jinq</groupId>
    <artifactId>jinq-jpa</artifactId>
    <version>1.8.38</version>
  </dependency>
</dependencies>

Jinq JPA 2.0 for Jakarta EE projects

If your project uses modules, you should add a dependency on the org.jinq.jpa module

<dependencies>
  <dependency>
    <groupId>org.jinq</groupId>
    <artifactId>jinq-jpa</artifactId>
    <version>2.0.3</version>
  </dependency>
</dependencies>

Jinq for Legacy Hibernate

If you want to use Jinq with Hibernate's legacy Session and SessionFactory APIs instead of using its JPA-compliant APIs, you can do so by including the jinq-hibernate-legacy dependency in your Maven project. Depending on whether your project uses JavaEE's javax.persistence namespace or JakartaEE's jakarta.persistence namespace, you will need to choose between Jinq 1.8 or Jinq 2.0.

Jinq Hibernate 1.8 for JEE projects

If your project uses JPMS modules, you should add a dependency on the automatic modules org.jinq.hibernate and org.jinq.api to your project's module.

<dependencies>
  <dependency>
    <groupId>org.jinq</groupId>
    <artifactId>jinq-hibernate-legacy</artifactId>
    <version>1.8.38</version>
  </dependency>
</dependencies>

Jinq Hibernate 2.0 for Jakarta EE projects

If your project uses modules, you should add a dependency on the org.jinq.hibernate module

<dependencies>
  <dependency>
    <groupId>org.jinq</groupId>
    <artifactId>jinq-hibernate-legacy</artifactId>
    <version>2.0.3</version>
  </dependency>
</dependencies>

Jinq for jOOQ

Jinq has some basic support for jOOQ. It can be accessed by including the jinq-jooq dependency in your Maven project. Starting with Jinq 2.0+, Jinq for jOOQ is packaged using the module name org.jinq.jooq.

<dependencies>
  <dependency>
    <groupId>org.jinq</groupId>
    <artifactId>jinq-jooq</artifactId>
    <version>2.0.3</version>
  </dependency>
</dependencies>

Jinq for Scala JPA/Hibernate/EclipseLink (Deprecated)

Note: Jinq was originally designed for use with version 2.11 of Scala. It has not been updated for use with more recent versions of Scala. In particular, in its current state, the Scala version of Jinq is not compatible with recent versions of sbt.

To use Jinq for JPA in Scala, simply include the jinq-jpa-scala dependency in your Maven or sbt project.

<dependencies>
  <dependency>
    <groupId>org.jinq</groupId>
    <artifactId>jinq-jpa-scala</artifactId>
    <version>1.8.35</version>
  </dependency>
</dependencies>
libraryDependencies ++= Seq(
  "org.jinq" % "jinq-jpa-scala" % "1.8.35",
)

Mini-ORM (Deprecated)

If you are using Jinq's mini-ORM, then you need the orm dependency to generate your object-relational mapping entity classes. An example of how to use this generator in Maven is available here.

<dependencies>
  <dependency>
    <groupId>org.jinq</groupId>
    <artifactId>orm</artifactId>
    <version>0.8</version>
  </dependency>
</dependencies>

To actually use Jinq queries in your code for querying these mini-ORM entities, you need to include the queryll2 dependency.

<dependencies>
  <dependency>
    <groupId>org.jinq</groupId>
    <artifactId>queryll2</artifactId>
    <version>0.8</version>
  </dependency>
</dependencies>