Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# JOPA - Change Log

### 2.10.1 - 2026-06-30

- Allow ordering by entity identifier in SOQL (Bug #439).
- Dependency updates: RDF4J 5.3.2.

### 2.10.0 - 2026-05-29

- Support optimizing entity loading from query result by using [fetch graphs](https://github.com/kbss-cvut/jopa/wiki/Performance#fetch-graph-based-entity-loading) (Enhancement #425, #431, #434).
Expand Down Expand Up @@ -131,7 +136,7 @@

### 2.5.1 - 2025-08-21

- Fix an issue with translating SOQL to SPARQL when referencing a RDF container attribute (Bug #366).
- Fix an issue with translating SOQL to SPARQL when referencing an RDF container attribute (Bug #366).

### 2.5.0 - 2025-08-18

Expand Down Expand Up @@ -689,7 +694,7 @@

- Fixed bug SPARQL query parser which prevent the use of property paths together with variables.
- Added support for setting the in-memory storage in Jena and RDF4J driver (Enhancement #32).
- Working on Github Wiki.
- Working on GitHub Wiki.

## 0.10.1 - 2018-05-20

Expand Down Expand Up @@ -731,7 +736,7 @@

## 0.9.12 - 2017-12-04

- Rewrote em.refresh to correspond to JPA behavior (Issue #17).
- Rewrote `em.refresh` to correspond to JPA behavior (Issue #17).
- Upgraded to the latest RDF4J (2.2.4).
- Generate class names compliant with Java naming conventions (OWL2Java).
- Added support for untyped query parameters to Query API (necessary for `LIMIT` and `OFFSET` support).
Expand Down Expand Up @@ -880,7 +885,7 @@

- Implemented support for `EntityManager.unwrap`. Using unwrap, it is possible to get a hold of for example the Sesame
in-memory repository used by the Sesame driver (which is otherwise, due to the Sesame API architecture, inaccessible
through the `RepositoryProvider`.
through the `RepositoryProvider`).

## 0.7.7 - 2016-05-11

Expand Down
2 changes: 1 addition & 1 deletion datatype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>jopa-all</artifactId>
<groupId>cz.cvut.kbss.jopa</groupId>
<version>2.10.0</version>
<version>2.10.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ private DatatypeTransformer() {
/**
* Converts the specified wrapper class to its corresponding primitive class.
* <p>
* If the class parameter is a wrapper type, the equivalent primitive type will be returned (e.g., int.class for
* Integer.class) In all other cases, the return value is null.
* If the class parameter is a wrapper type, the equivalent primitive type will be returned (e.g., {@code int.class} for
* {@code Integer.class}) In all other cases, the return value is null.
*
* @param cls - the class to convert
* @return Optional containing the primitive type, or empty if the specified class is not a wrapper type
Expand Down
2 changes: 1 addition & 1 deletion jopa-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>cz.cvut.kbss.jopa</groupId>
<artifactId>jopa-all</artifactId>
<version>2.10.0</version>
<version>2.10.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface ProviderUtil {
* <p>
* If the provider determines that the entity has been provided by itself and that either entity attributes with
* FetchType EAGER have not been loaded or that the state of the specified attribute has not been loaded, this
* methods returns LoadState.NOT_LOADED.
* method returns LoadState.NOT_LOADED.
* <p>
* If the provider cannot determine the load state, this method returns LoadState.UNKNOWN.
* <p>
Expand All @@ -48,7 +48,7 @@ public interface ProviderUtil {
* <p>
* If the provider determines that the entity has been provided by itself and that either entity attributes with
* FetchType EAGER have not been loaded or that the state of the specified attribute has not been loaded, this
* methods returns LoadState.NOT_LOADED.
* method returns LoadState.NOT_LOADED.
* <p>
* If the provider cannot determine the load state, this method returns LoadState.UNKNOWN.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
/**
* (Optional) The operations that must be cascaded to the target of the association.
* <p>
* By default no operations are cascaded.
* By default, no operations are cascaded.
*
* @return Cascading setting for the annotated attribute
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,16 @@ public interface ManagedType<X> extends Type<X> {
<K, V> MapAttribute<X, K, V> getDeclaredMap(String name, Class<K> keyType, Class<V> valueType);

/**
* Return all multi-valued attributes (Collection-, Set-, List-, and Map-valued attributes) of the managed type.
* Returns empty set if the managed type has no multi-valued attributes.
* Return all multivalued attributes (Collection-, Set-, List-, and Map-valued attributes) of the managed type.
* Returns empty set if the managed type has no multivalued attributes.
*
* @return Collection-, Set-, List-, and Map-valued attributes
*/
Set<PluralAttribute<? super X, ?, ?>> getPluralAttributes();

/**
* Return all multi-valued attributes (Collection-, Set-, List-, and Map-valued attributes) declared by the managed
* type. Returns empty set if the managed type has no declared multi-valued attributes.
* Return all multivalued attributes (Collection-, Set-, List-, and Map-valued attributes) declared by the managed
* type. Returns empty set if the managed type has no declared multivalued attributes.
*
* @return declared Collection-, Set-, List-, and Map-valued attributes
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
import java.util.Set;

/**
* Provides access to the metamodel of persistent entities in the persistence
* unit.
* Provides access to the metamodel of persistent entities in the persistence unit.
*/
public interface Metamodel {
/**
Expand Down Expand Up @@ -63,9 +62,8 @@ public interface Metamodel {
Set<EntityType<?>> getEntities();

/**
* Get the set of classes that contain inferred attributes. These classes
* are handled specially since inferred attributes can be influenced by
* changes to any other attributes in any other entity.
* Get the set of classes that contain inferred attributes. These classes are handled specially since inferred
* attributes can be influenced by changes to any other attributes in any other entity.
*
* @return The set of classes with inferred attributes.
*/
Expand All @@ -85,11 +83,9 @@ public interface Metamodel {
/**
* Adds the specified URI to the module extraction signature.
* <p>
* Note that a module including the specified URI will be created when a new
* resource level transaction is started. When that will be is
* implementation dependent. However it must be guaranteed that all
* subsequent connections provided by OntoDriver will include the URI in
* extracted modules.
* Note that a module including the specified URI will be created when a new resource level transaction is started.
* When that will be is implementation dependent. However, it must be guaranteed that all subsequent connections
* provided by OntoDriver will include the URI in extracted modules.
*
* @param uri The URI to add
* @throws NullPointerException If {@code uri} is {@code null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public interface PluralAttribute<X, C, E> extends Attribute<X, C>, Bindable<E> {
default boolean isRdfContainer() {return false;}

/**
* Whether this list represents a <a href="https://www.w3.org/TR/rdf12-schema/#ch_collectionvocab">RDF
* Whether this list represents an <a href="https://www.w3.org/TR/rdf12-schema/#ch_collectionvocab">RDF
* collection</a>.
*
* @return {@code true} when this list attribute is an RDF collection, {@code false} otherwise
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public interface Query {
/**
* Execute a SELECT query and return the query results as an untyped java.util.stream.Stream.
* <p>
* By default this method delegates to getResultList().stream(), however persistence provider may choose to override
* By default, this method delegates to getResultList().stream(), however persistence provider may choose to override
* this method to provide additional capabilities.
*
* @return a stream of the results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,37 @@ public interface CriteriaQuery<T> {
<X> Root<X> from(EntityType<X> entity);

/**
* Specify the item that is to be returned in the query result. Replaces the previously specified selection(s), if any.
* Specify the item that is to be returned in the query result. Replaces the previously specified selection(s), if
* any.
*
* @param selection - selection specifying the item that is to be returned in the query result
* @return the modified query
*/
CriteriaQuery<T> select(Selection<? extends T> selection);

/**
* Modify the query to restrict the query result according to the specified boolean expression. Replaces the previously added restriction(s), if any.
* Modify the query to restrict the query result according to the specified boolean expression. Replaces the
* previously added restriction(s), if any.
*
* @param expression - a simple or compound boolean expression
* @return the modified query
*/
CriteriaQuery<T> where(Expression<Boolean> expression);

/**
* Modify the query to restrict the query result according to the conjunction of the specified restriction predicates. Replaces the previously added restriction(s), if any. If no restrictions are specified, any previously added restrictions are simply removed.
* Modify the query to restrict the query result according to the conjunction of the specified restriction
* predicates. Replaces the previously added restriction(s), if any. If no restrictions are specified, any
* previously added restrictions are simply removed.
*
* @param predicates - zero or more restriction predicates
* @return the modified query
*/
CriteriaQuery<T> where(Predicate... predicates);

/**
* Modify the query to restrict the query result according to the conjunction of the specified restriction predicates. Replaces the previously added restriction(s), if any. If no restrictions are specified, any previously added restrictions are simply removed.
* Modify the query to restrict the query result according to the conjunction of the specified restriction
* predicates. Replaces the previously added restriction(s), if any. If no restrictions are specified, any
* previously added restrictions are simply removed.
*
* @param predicates - list of predicates
* @return the modified query
Expand All @@ -79,9 +85,12 @@ public interface CriteriaQuery<T> {
Class<T> getResultType();

/**
* Specify whether duplicate query results will be eliminated. A true value will cause duplicates to be eliminated. A false value will cause duplicates to be retained. If distinct has not been specified, duplicate results must be retained.
* Specify whether duplicate query results will be eliminated. A true value will cause duplicates to be eliminated.
* A false value will cause duplicates to be retained. If distinct has not been specified, duplicate results must be
* retained.
*
* @param distinct - boolean value specifying whether duplicate results must be eliminated from the query result or whether they must be retained
* @param distinct - boolean value specifying whether duplicate results must be eliminated from the query result or
* whether they must be retained
* @return the modified query
*/
CriteriaQuery<T> distinct(boolean distinct);
Expand All @@ -108,38 +117,49 @@ public interface CriteriaQuery<T> {
Selection<T> getSelection();

/**
* Return the predicate that corresponds to the where clause restriction(s), or null if no restrictions have been specified.
* Return the predicate that corresponds to the where clause restriction(s), or null if no restrictions have been
* specified.
*
* @return where clause predicate
*/
Predicate getRestriction();

/**
* Specify the expressions that are used to form groups over the query results. Replaces the previous specified grouping expressions, if any. If no grouping expressions are specified, any previously added grouping expressions are simply removed.
* Specify the expressions that are used to form groups over the query results. Replaces the previous specified
* grouping expressions, if any. If no grouping expressions are specified, any previously added grouping expressions
* are simply removed.
*
* @param grouping zero or more grouping expressions
* @return the modified query
*/
CriteriaQuery<T> groupBy(Expression<?>... grouping);

/**
* Specify the expressions that are used to form groups over the query results. Replaces the previous specified grouping expressions, if any. If no grouping expressions are specified, any previously added grouping expressions are simply removed.
* Specify the expressions that are used to form groups over the query results. Replaces the previous specified
* grouping expressions, if any. If no grouping expressions are specified, any previously added grouping expressions
* are simply removed.
*
* @param grouping list of zero or more grouping expressions
* @return the modified query
*/
CriteriaQuery<T> groupBy(List<Expression<?>> grouping);

/**
* Specify the ordering expressions that are used to order the query results. Replaces the previous ordering expressions, if any. If no ordering expressions are specified, the previous ordering, if any, is simply removed, and results will be returned in no particular order. The left-to-right sequence of the ordering expressions determines the precedence, whereby the leftmost has highest precedence.
* Specify the ordering expressions that are used to order the query results. Replaces the previous ordering
* expressions, if any. If no ordering expressions are specified, the previous ordering, if any, is simply removed,
* and results will be returned in no particular order. The left-to-right sequence of the ordering expressions
* determines the precedence, whereby the leftmost has the highest precedence.
*
* @param o list of zero or more ordering expressions
* @return the modified query
*/
CriteriaQuery<T> orderBy(List<Order> o);

/**
* Specify the ordering expressions that are used to order the query results. Replaces the previous ordering expressions, if any. If no ordering expressions are specified, the previous ordering, if any, is simply removed, and results will be returned in no particular order. The left-to-right sequence of the ordering expressions determines the precedence, whereby the leftmost has highest precedence.
* Specify the ordering expressions that are used to order the query results. Replaces the previous ordering
* expressions, if any. If no ordering expressions are specified, the previous ordering, if any, is simply removed,
* and results will be returned in no particular order. The left-to-right sequence of the ordering expressions
* determines the precedence, whereby the leftmost has the highest precedence.
*
* @param o zero or more ordering expressions
* @return the modified query
Expand All @@ -148,7 +168,8 @@ public interface CriteriaQuery<T> {


/**
* Return the ordering expressions in order of precedence. Returns empty list if no ordering expressions have been specified.
* Return the ordering expressions in order of precedence. Returns empty list if no ordering expressions have been
* specified.
*
* @return the list of ordering expressions
*/
Expand All @@ -163,7 +184,9 @@ public interface CriteriaQuery<T> {
CriteriaQuery<T> having(Expression<Boolean> restriction);

/**
* Specify restrictions over the groups of the query according the conjunction of the specified restriction predicates. Replaces the previously added having restriction(s), if any. If no restrictions are specified, any previously added restrictions are simply removed.
* Specify restrictions over the groups of the query according the conjunction of the specified restriction
* predicates. Replaces the previously added having restriction(s), if any. If no restrictions are specified, any
* previously added restrictions are simply removed.
*
* @param restrictions zero or more restriction predicates
* @return the modified query
Expand Down
2 changes: 1 addition & 1 deletion jopa-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>cz.cvut.kbss.jopa</groupId>
<artifactId>jopa-all</artifactId>
<version>2.10.0</version>
<version>2.10.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion jopa-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>cz.cvut.kbss.jopa</groupId>
<artifactId>jopa-all</artifactId>
<version>2.10.0</version>
<version>2.10.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ functionsReturningBoolean

orderByClause: ORDER BY orderByItem (',' orderByItem)* ;

orderByItem: singleValuedObjectPathExpression (ASC | DESC)? ;
orderByItem: (singleValuedObjectPathExpression | simpleSubpath) (ASC | DESC)? ;

groupByClause: GROUP BY groupByItem (',' groupByItem)* ;

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import cz.cvut.kbss.jopa.exceptions.OWLPersistenceException;

/**
* Thrown when an entity is missing an identifier and it cannot be generated.
* Thrown when an entity is missing an identifier, and it cannot be generated.
*/
public class IdentifierNotSetException extends OWLPersistenceException {

Expand Down
Loading
Loading