diff --git a/CHANGELOG.md b/CHANGELOG.md index 43bc120..a900281 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2.1.0 + +* [**#36** RAW Queries](https://github.com/Scalified/jpa/issues/36) + # 2.0.0 * [**#34** Java EE 8.0 Update](https://github.com/Scalified/jpa/issues/34) diff --git a/README.md b/README.md index 155cf58..bd8aa7d 100644 --- a/README.md +++ b/README.md @@ -197,7 +197,28 @@ during stream consuming, the new data will also be included into result set. ### Query DSL -**Query** DSL provides convenient way of stored procedure queries execution +**Query** DSL provides convenient way for queries execution + +#### Raw SQL Queries Execution + +```java +Jpa jpa; +// ... jpa initialization skipped + +// Raw SQL query +String sql = "SELECT * FROM PERSON" + +// Executing raw SQL query and mapping results to set +Set resultSet = jpa.query(query, Person.class).set(); + +// Executing raw SQL query and mapping results to list +List resultList = jpa.query(query, Person.class).list(); + +// Executing raw SQL query and retrieving optional result +Optional optionalResult = jpa.query(query, Person.class).first(); +``` + +#### Stored Procedures Execution ```java Jpa jpa; diff --git a/build.gradle.kts b/build.gradle.kts index b502e73..ef49748 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -26,7 +26,7 @@ allprojects { group = "com.scalified" - version = "2.0.0" + version = "2.1.0" val javaeeVersion by extra("8.0") diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4a6ebce..bb8b2fc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/jpa/src/main/java/com/scalified/jpa/Jpa.java b/jpa/src/main/java/com/scalified/jpa/Jpa.java index e25c9de..7d3128d 100644 --- a/jpa/src/main/java/com/scalified/jpa/Jpa.java +++ b/jpa/src/main/java/com/scalified/jpa/Jpa.java @@ -31,7 +31,7 @@ import com.scalified.jpa.dsl.find.JpaFindByEntityClassDsl; import com.scalified.jpa.dsl.find.JpaFindBySpecificationDsl; import com.scalified.jpa.dsl.from.JpaFromDsl; -import com.scalified.jpa.dsl.query.JpaSpQueryDsl; +import com.scalified.jpa.dsl.query.JpaQueryDsl; import com.scalified.jpa.function.CriteriaFunction; import com.scalified.jpa.sp.SpQuery; import com.scalified.jpa.specification.Specification; @@ -83,14 +83,25 @@ public interface Jpa { JpaFindBySpecificationDsl find(Specification specification); /** - * Returns {@link JpaSpQueryDsl} object, which provides the next DSL + * Returns {@link JpaQueryDsl} object, which provides the next DSL + * methods within DSL call chain to execute raw SQL query + * + * @param sql raw SQL query + * @param entityClass class of the result entities + * @param type of the result entities + * @return {@link JpaQueryDsl} object + */ + JpaQueryDsl query(String sql, Class entityClass); + + /** + * Returns {@link JpaQueryDsl} object, which provides the next DSL * methods within DSL call chain to execute stored procedure * * @param spQuery stored procedure configuration object - * @param type of result - * @return {@link JpaSpQueryDsl} object + * @param type of the result + * @return {@link JpaQueryDsl} object */ - JpaSpQueryDsl query(SpQuery spQuery); + JpaQueryDsl query(SpQuery spQuery); /** * Returns {@link JpaFromDsl} object, which provides the next DSL methods @@ -118,7 +129,7 @@ public interface Jpa { * * @param entities a collection of entity instances * @param type of an entity - * @param type of entities collection + * @param type of the entities collection * @return {@link JpaEntitiesDsl} object */ > JpaEntitiesDsl entities(K entities); diff --git a/jpa/src/main/java/com/scalified/jpa/JpaImpl.java b/jpa/src/main/java/com/scalified/jpa/JpaImpl.java index 04b70f8..90a4d65 100644 --- a/jpa/src/main/java/com/scalified/jpa/JpaImpl.java +++ b/jpa/src/main/java/com/scalified/jpa/JpaImpl.java @@ -32,7 +32,8 @@ import com.scalified.jpa.dsl.find.*; import com.scalified.jpa.dsl.from.JpaFromDsl; import com.scalified.jpa.dsl.from.JpaFromDslImpl; -import com.scalified.jpa.dsl.query.JpaSpQueryDsl; +import com.scalified.jpa.dsl.query.JpaQueryDsl; +import com.scalified.jpa.dsl.query.JpaQueryDslImpl; import com.scalified.jpa.dsl.query.JpaSpQueryDslImpl; import com.scalified.jpa.function.CriteriaFunction; import com.scalified.jpa.manager.JpaManager; @@ -116,15 +117,29 @@ public JpaFindBySpecificationDsl find(Specification specification) { } /** - * Returns {@link JpaSpQueryDsl} object, which provides the next DSL + * Returns {@link JpaQueryDsl} object, which provides the next DSL + * methods within DSL call chain to execute raw SQL query + * + * @param sql raw SQL query + * @param entityClass class of the result entities + * @param type of the result entities + * @return {@link JpaQueryDsl} object + */ + @Override + public JpaQueryDsl query(String sql, Class entityClass) { + return new JpaQueryDslImpl<>(manager, sql, entityClass); + } + + /** + * Returns {@link JpaQueryDsl} object, which provides the next DSL * methods within DSL call chain to execute stored procedure * * @param spQuery stored procedure configuration object - * @param type of result - * @return {@link JpaSpQueryDsl} object + * @param type of the result + * @return {@link JpaQueryDsl} object */ @Override - public JpaSpQueryDsl query(SpQuery spQuery) { + public JpaQueryDsl query(SpQuery spQuery) { return new JpaSpQueryDslImpl<>(manager, spQuery); } @@ -160,7 +175,7 @@ public JpaEntityDsl entity(T entity) { * * @param entities a collection of entity instances * @param type of an entity - * @param type of entities collection + * @param type of the entities collection * @return {@link JpaEntitiesDsl} object */ @Override diff --git a/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByCriteriaFunctionDsl.java b/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByCriteriaFunctionDsl.java index a8a6655..ea690f2 100644 --- a/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByCriteriaFunctionDsl.java +++ b/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByCriteriaFunctionDsl.java @@ -60,7 +60,7 @@ public interface JpaFindByCriteriaFunctionDsl { * and after applying the specified {@code resultFunction} * * @param resultFunction a function to apply on result - * @param type of generic result + * @param type of the generic result * @return some generic result */ R some(ResultFunction resultFunction); diff --git a/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByCriteriaFunctionDslImpl.java b/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByCriteriaFunctionDslImpl.java index 5217a7c..eddb9da 100644 --- a/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByCriteriaFunctionDslImpl.java +++ b/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByCriteriaFunctionDslImpl.java @@ -90,7 +90,7 @@ public Set set() { * and after applying the specified {@code resultFunction} * * @param resultFunction a function to apply on result - * @param type of generic result + * @param type of the generic result * @return some generic result */ @Override diff --git a/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByEntityClassDsl.java b/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByEntityClassDsl.java index 3ee963b..238f74f 100644 --- a/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByEntityClassDsl.java +++ b/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByEntityClassDsl.java @@ -68,7 +68,7 @@ public interface JpaFindByEntityClassDsl { * specified {@code resultFunction} * * @param resultFunction a function to apply on result - * @param type of generic result + * @param type of the generic result * @return some generic result */ R some(ResultFunction resultFunction); diff --git a/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByEntityClassDslImpl.java b/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByEntityClassDslImpl.java index 782cc5c..5b6f085 100644 --- a/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByEntityClassDslImpl.java +++ b/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindByEntityClassDslImpl.java @@ -100,7 +100,7 @@ public Set set() { * specified {@code resultFunction} * * @param resultFunction a function to apply on result - * @param type of generic result + * @param type of the generic result * @return some generic result */ @Override diff --git a/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindBySpecificationDsl.java b/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindBySpecificationDsl.java index 8fd72d9..d74319a 100644 --- a/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindBySpecificationDsl.java +++ b/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindBySpecificationDsl.java @@ -59,7 +59,7 @@ public interface JpaFindBySpecificationDsl { * and after applying the specified {@code resultFunction} * * @param resultFunction a function to apply on result - * @param type of generic result + * @param type of the generic result * @return some generic result */ R some(ResultFunction resultFunction); diff --git a/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindBySpecificationDslImpl.java b/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindBySpecificationDslImpl.java index 5f63fc1..47f7c79 100644 --- a/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindBySpecificationDslImpl.java +++ b/jpa/src/main/java/com/scalified/jpa/dsl/find/JpaFindBySpecificationDslImpl.java @@ -89,7 +89,7 @@ public Set set() { * and after applying the specified {@code resultFunction} * * @param resultFunction a function to apply on result - * @param type of generic result + * @param type of the generic result * @return some generic result */ @Override diff --git a/jpa/src/main/java/com/scalified/jpa/dsl/query/JpaSpQueryDsl.java b/jpa/src/main/java/com/scalified/jpa/dsl/query/JpaQueryDsl.java similarity index 77% rename from jpa/src/main/java/com/scalified/jpa/dsl/query/JpaSpQueryDsl.java rename to jpa/src/main/java/com/scalified/jpa/dsl/query/JpaQueryDsl.java index 2a52d54..3329e92 100644 --- a/jpa/src/main/java/com/scalified/jpa/dsl/query/JpaSpQueryDsl.java +++ b/jpa/src/main/java/com/scalified/jpa/dsl/query/JpaQueryDsl.java @@ -25,37 +25,43 @@ package com.scalified.jpa.dsl.query; +import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; import java.util.Set; /** - * DSL for executing stored procedures + * DSL for executing queries * * @author shell * @since 2018-08-18 */ -public interface JpaSpQueryDsl { +public interface JpaQueryDsl { /** - * Returns a list of all results produced by stored procedure execution + * Returns a list of all results produced by query execution * * @return a list of all results */ List list(); /** - * Returns a set of all results produced by stored procedure execution + * Returns a set of all results produced by query execution * * @return a set of all results */ - Set set(); + default Set set() { + return new LinkedHashSet<>(list()); + } /** - * Returns the first result produced by stored procedure execution + * Returns the first result produced by query execution * * @return the first result */ - Optional first(); + default Optional first() { + return list().stream() + .findFirst(); + } } diff --git a/jpa/src/main/java/com/scalified/jpa/dsl/query/JpaQueryDslImpl.java b/jpa/src/main/java/com/scalified/jpa/dsl/query/JpaQueryDslImpl.java new file mode 100644 index 0000000..1151f56 --- /dev/null +++ b/jpa/src/main/java/com/scalified/jpa/dsl/query/JpaQueryDslImpl.java @@ -0,0 +1,78 @@ +/* + * MIT License + * + * Copyright (c) 2018 Scalified + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +package com.scalified.jpa.dsl.query; + +import com.scalified.jpa.manager.JpaManager; + +import java.util.List; + +/** + * A {@link JpaQueryDsl} implementation for raw SQL queries + * + * @author shell + * @since 2018-08-18 + */ +public class JpaQueryDslImpl implements JpaQueryDsl { + + /** + * An underlying {@link JpaManager} + */ + private final JpaManager manager; + + /** + * Raw SQL query + */ + private final String sql; + + /** + * Type of the result entities + */ + private final Class entityClass; + + /** + * Creates {@link JpaQueryDsl} instance + * + * @param manager an underlying {@link JpaManager} + * @param sql raw SQL query + * @param entityClass class of the result entities + */ + public JpaQueryDslImpl(JpaManager manager, String sql, Class entityClass) { + this.manager = manager; + this.sql = sql; + this.entityClass = entityClass; + } + + /** + * Returns a list of all results produced by stored procedure execution + * + * @return a list of all results + */ + @Override + public List list() { + return manager.query(sql, entityClass); + } + +} diff --git a/jpa/src/main/java/com/scalified/jpa/dsl/query/JpaSpQueryDslImpl.java b/jpa/src/main/java/com/scalified/jpa/dsl/query/JpaSpQueryDslImpl.java index 893518b..793cda3 100644 --- a/jpa/src/main/java/com/scalified/jpa/dsl/query/JpaSpQueryDslImpl.java +++ b/jpa/src/main/java/com/scalified/jpa/dsl/query/JpaSpQueryDslImpl.java @@ -28,18 +28,15 @@ import com.scalified.jpa.manager.JpaManager; import com.scalified.jpa.sp.SpQuery; -import java.util.LinkedHashSet; import java.util.List; -import java.util.Optional; -import java.util.Set; /** - * A {@link JpaSpQueryDsl} implementation + * A {@link JpaQueryDsl} implementation for stored procedures execution * * @author shell * @since 2018-08-18 */ -public class JpaSpQueryDslImpl implements JpaSpQueryDsl { +public class JpaSpQueryDslImpl implements JpaQueryDsl { /** * An underlying {@link JpaManager} @@ -52,7 +49,7 @@ public class JpaSpQueryDslImpl implements JpaSpQueryDsl { private final SpQuery query; /** - * Creates {@link JpaSpQueryDsl} instance + * Creates {@link JpaQueryDsl} instance * * @param manager an underlying {@link JpaManager} * @param query {@link SpQuery} used to execute stored procedure @@ -72,25 +69,4 @@ public List list() { return manager.query(query); } - /** - * Returns a set of all results produced by stored procedure execution - * - * @return a set of all results - */ - @Override - public Set set() { - return new LinkedHashSet<>(list()); - } - - /** - * Returns the first result produced by stored procedure execution - * - * @return the first result - */ - @Override - public Optional first() { - return list().stream() - .findFirst(); - } - } diff --git a/jpa/src/main/java/com/scalified/jpa/manager/JpaManager.java b/jpa/src/main/java/com/scalified/jpa/manager/JpaManager.java index 939249b..9c509ee 100644 --- a/jpa/src/main/java/com/scalified/jpa/manager/JpaManager.java +++ b/jpa/src/main/java/com/scalified/jpa/manager/JpaManager.java @@ -61,7 +61,7 @@ public interface JpaManager { * {@code entityClass} * * @param entityClass a class of a searched entity - * @param type of searched entity + * @param type of the searched entity * @return {@link List} of all generic results */ List find(Class entityClass); @@ -83,7 +83,7 @@ public interface JpaManager { * Returns the {@link Stream} of generic results found by the specified {@code entityClass} * * @param entityClass a class of a searched entity - * @param type of searched entity + * @param type of the searched entity * @return {@link Stream} of generic results */ Stream stream(Class entityClass); @@ -94,7 +94,7 @@ public interface JpaManager { * * @param entityClass a class of a searched entity * @param chunkSize size of chunk - * @param type of searched entity + * @param type of the searched entity * @return {@link Stream} of generic results */ Stream stream(Class entityClass, int chunkSize); @@ -145,12 +145,22 @@ public interface JpaManager { */ R find(Specification specification, ResultFunction resultFunction); + /** + * Returns the list of entities as a result of raw {@code sql} query execution + * + * @param sql raw SQL query + * @param entityClass type of the result entities + * @param type of the result + * @return the list of entities + */ + List query(String sql, Class entityClass); + /** * Returns the list of entities as a result of stored procedure execution * built from the specified {@code spQuery} * * @param spQuery stored procedure configuration object - * @param type of result + * @param type of the result * @return the list of entities */ List query(SpQuery spQuery); diff --git a/jpa/src/main/java/com/scalified/jpa/manager/JpaStandardManager.java b/jpa/src/main/java/com/scalified/jpa/manager/JpaStandardManager.java index 368e1fa..2bd90c5 100644 --- a/jpa/src/main/java/com/scalified/jpa/manager/JpaStandardManager.java +++ b/jpa/src/main/java/com/scalified/jpa/manager/JpaStandardManager.java @@ -86,7 +86,7 @@ public T find(Class entityClass, K primaryKey) { * {@code entityClass} * * @param entityClass a class of a searched entity - * @param type of searched entity + * @param type of the searched entity * @return {@link List} of all generic results */ @Override @@ -120,7 +120,7 @@ public R find(Class entityClass, ResultFunction resultFunction) * Returns the {@link Stream} of generic results found by the specified {@code entityClass} * * @param entityClass a class of a searched entity - * @param type of searched entity + * @param type of the searched entity * @return {@link Stream} of generic results */ @Override @@ -137,7 +137,7 @@ public Stream stream(Class entityClass) { * * @param entityClass a class of a searched entity * @param chunkSize size of chunk - * @param type of searched entity + * @param type of the searched entity * @return {@link Stream} of generic results */ @Override @@ -220,12 +220,30 @@ public R find(Specification specification, ResultFunction result return resultFunction.apply(query); } + /** + * Returns the list of entities as a result of raw {@code sql} query execution + * + * @param sql raw SQL query + * @param entityClass type of the result entities + * @param type of the result + * @return the list of entities + */ + @Override + @SuppressWarnings("unchecked") + public List query(String sql, Class entityClass) { + List list = em.createNativeQuery(sql, entityClass) + .getResultList(); + return list.stream() + .map(object -> (T) object) + .collect(Collectors.toList()); + } + /** * Returns the list of entities as a result of stored procedure execution * built from the specified {@code spQuery} * * @param spQuery stored procedure configuration object - * @param type of result + * @param type of the result * @return the list of entities */ @Override diff --git a/jpa/src/main/java/com/scalified/jpa/manager/JpaSynchronizedManager.java b/jpa/src/main/java/com/scalified/jpa/manager/JpaSynchronizedManager.java index 4970c29..8e54a89 100644 --- a/jpa/src/main/java/com/scalified/jpa/manager/JpaSynchronizedManager.java +++ b/jpa/src/main/java/com/scalified/jpa/manager/JpaSynchronizedManager.java @@ -79,7 +79,7 @@ public T find(Class entityClass, K primaryKey) { * {@code entityClass} * * @param entityClass a class of a searched entity - * @param type of searched entity + * @param type of the searched entity * @return {@link List} of all generic results */ @Override @@ -107,7 +107,7 @@ public R find(Class entityClass, ResultFunction resultFunction) * Returns the {@link Stream} of generic results found by the specified {@code entityClass} * * @param entityClass a class of a searched entity - * @param type of searched entity + * @param type of the searched entity * @return {@link Stream} of generic results */ @Override @@ -121,7 +121,7 @@ public Stream stream(Class entityClass) { * * @param entityClass a class of a searched entity * @param chunkSize size of chunk - * @param type of searched entity + * @param type of the searched entity * @return {@link Stream} of generic results */ @Override @@ -187,12 +187,25 @@ public R find(Specification specification, ResultFunction result return manager.find(specification, resultFunction); } + /** + * Returns the list of entities as a result of raw {@code sql} query execution + * + * @param sql raw SQL query + * @param entityClass type of the result entities + * @param type of the result + * @return the list of entities + */ + @Override + public List query(String sql, Class entityClass) { + return manager.query(sql, entityClass); + } + /** * Returns the list of entities as a result of stored procedure execution * built from the specified {@code spQuery} * * @param spQuery stored procedure configuration object - * @param type of result + * @param type of the result * @return the list of entities */ @Override diff --git a/jpa/src/main/java/com/scalified/jpa/manager/JpaTransactionalManager.java b/jpa/src/main/java/com/scalified/jpa/manager/JpaTransactionalManager.java index eaa50cd..15cb81e 100644 --- a/jpa/src/main/java/com/scalified/jpa/manager/JpaTransactionalManager.java +++ b/jpa/src/main/java/com/scalified/jpa/manager/JpaTransactionalManager.java @@ -82,7 +82,7 @@ public T find(Class entityClass, K primaryKey) { * {@code entityClass} * * @param entityClass a class of a searched entity - * @param type of searched entity + * @param type of the searched entity * @return {@link List} of all generic results */ @Override @@ -110,7 +110,7 @@ public R find(Class entityClass, ResultFunction resultFunction) * Returns the {@link Stream} of generic results found by the specified {@code entityClass} * * @param entityClass a class of a searched entity - * @param type of searched entity + * @param type of the searched entity * @return {@link Stream} of generic results */ @Override @@ -124,7 +124,7 @@ public Stream stream(Class entityClass) { * * @param entityClass a class of a searched entity * @param chunkSize size of chunk - * @param type of searched entity + * @param type of the searched entity * @return {@link Stream} of generic results */ @Override @@ -190,12 +190,25 @@ public R find(Specification specification, ResultFunction result return manager.find(specification, resultFunction); } + /** + * Returns the list of entities as a result of raw {@code sql} query execution + * + * @param sql raw SQL query + * @param entityClass type of the result entities + * @param type of the result + * @return the list of entities + */ + @Override + public List query(String sql, Class entityClass) { + return manager.query(sql, entityClass); + } + /** * Returns the list of entities as a result of stored procedure execution * built from the specified {@code spQuery} * * @param spQuery stored procedure configuration object - * @param type of result + * @param type of the result * @return the list of entities */ @Override diff --git a/jpa/src/main/java/com/scalified/jpa/sp/SpQuery.java b/jpa/src/main/java/com/scalified/jpa/sp/SpQuery.java index a93d939..5eb70b0 100644 --- a/jpa/src/main/java/com/scalified/jpa/sp/SpQuery.java +++ b/jpa/src/main/java/com/scalified/jpa/sp/SpQuery.java @@ -74,7 +74,7 @@ public SpQuery(String name) { * Creates stored procedure configuration object builder * * @param name stored procedure name - * @param type of result + * @param type of the result * @return stored procedure configuration object builder */ public static Builder builder(String name) {