Skip to content

Commit c0dcc49

Browse files
committed
[Gradle Release Plugin] - pre tag commit: '2.37.0'.
2 parents 1654348 + b223976 commit c0dcc49

File tree

193 files changed

+3396
-1928
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+3396
-1928
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ Build with Gradle
5555

5656
```groovy
5757
dependencies {
58-
implementation "org.seasar.doma:doma-core:2.36.0"
59-
annotationProcessor "org.seasar.doma:doma-processor:2.36.0"
58+
implementation "org.seasar.doma:doma-core:2.37.0"
59+
annotationProcessor "org.seasar.doma:doma-processor:2.37.0"
6060
}
6161
```
6262

docs/build.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Write your build.gradle as follows:
3535
.. code-block:: groovy
3636
3737
dependencies {
38-
implementation "org.seasar.doma:doma-core:2.36.0"
39-
annotationProcessor "org.seasar.doma:doma-processor:2.36.0"
38+
implementation "org.seasar.doma:doma-core:2.37.0"
39+
annotationProcessor "org.seasar.doma:doma-processor:2.37.0"
4040
}
4141
4242
To simplify your build.script, we recommend that you use the `Doma Compile Plugin`_.

docs/criteria-api.rst

Lines changed: 86 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ We use the following Entity classes to show you some examples:
3636
@Transient private Employee manager;
3737
@Transient private Address address;
3838
39-
// getter and setter
39+
// getters and setters
4040
}
4141
4242
.. code-block:: java
@@ -52,14 +52,50 @@ We use the following Entity classes to show you some examples:
5252
@OriginalStates private Department originalStates;
5353
@Transient private List<Employee> employeeList = new ArrayList<>();
5454
55-
// getter and setter
55+
// getters and setters
5656
}
5757
58-
Note that both of the above classes are annotated with ``@Entity(metamodel = @Metamodel)``.
58+
.. code-block:: java
59+
60+
@Entity(immutable = true, metamodel = @Metamodel)
61+
@Table(name = "EMPLOYEE")
62+
public class Emp {
63+
64+
@Id private final Integer employeeId;
65+
private final Integer employeeNo;
66+
private final String employeeName;
67+
private final Integer managerId;
68+
private final LocalDate hiredate;
69+
private final Salary salary;
70+
private final Integer departmentId;
71+
private final Integer addressId;
72+
@Version private final Integer version;
73+
@Transient private final Dept department;
74+
@Transient private final Emp manager;
75+
76+
// constructor and getters
77+
}
78+
79+
.. code-block:: java
80+
81+
@Entity(immutable = true, metamodel = @Metamodel)
82+
@Table(name = "DEPARTMENT")
83+
public class Dept {
84+
85+
@Id private final Integer departmentId;
86+
private final Integer departmentNo;
87+
private final String departmentName;
88+
private final String location;
89+
@Version private final Integer version;
90+
91+
// constructor and getters
92+
}
93+
94+
Note that the above classes are annotated with ``@Entity(metamodel = @Metamodel)``.
5995
The ``metamodel = @Metamodel`` indicates that the annotated entity
6096
has a corresponding metamodel class generated by Doma's annotation processor .
6197

62-
In our examples, the metamodel classes are ``Employee_`` and ``Department_``.
98+
In our examples, the metamodel classes are ``Employee_``, ``Department_``, ``Emp_`` and ``Dept_``.
6399
These metamodels allow you to make your query typesafe.
64100

65101
You can customize the name of the metamodels by the Metamodel annotation elements.
@@ -456,6 +492,12 @@ We support the following operators and predicates:
456492
* exists
457493
* notExists - (not exists)
458494

495+
.. note::
496+
497+
The ``eq`` operator generates the ``is null`` predicate if the second operand is ``null``.
498+
Also, the ``ne`` operator generates the ``is not null`` predicate if the second operand is ``null``.
499+
500+
459501
We also support the following logical operators:
460502

461503
* and
@@ -661,6 +703,42 @@ You can associate many entities:
661703
.associate(e, a, Employee::setAddress)
662704
.fetch();
663705
706+
association for immutable entities (Entityql)
707+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
708+
709+
You can associate immutable entities with the ``associateWith`` operation in the Entityql DSL.
710+
You have to use the ``associateWith`` operation with join expression.
711+
712+
.. code-block:: java
713+
714+
Emp_ e = new Emp_();
715+
Emp_ m = new Emp_();
716+
Dept_ d = new Dept_();
717+
718+
List<Emp> list =
719+
entityql
720+
.from(e)
721+
.innerJoin(d, on -> on.eq(e.departmentId, d.departmentId))
722+
.leftJoin(m, on -> on.eq(e.managerId, m.employeeId))
723+
.where(c -> c.eq(d.departmentName, "SALES"))
724+
.associateWith(e, d, Emp::withDept)
725+
.associateWith(e, m, Emp::withManager)
726+
.fetch();
727+
728+
The above query issues the following SQL statement:
729+
730+
.. code-block:: sql
731+
732+
select t0_.EMPLOYEE_ID, t0_.EMPLOYEE_NO, t0_.EMPLOYEE_NAME, t0_.MANAGER_ID, t0_.HIREDATE,
733+
t0_.SALARY, t0_.DEPARTMENT_ID, t0_.ADDRESS_ID, t0_.VERSION,
734+
t1_.DEPARTMENT_ID, t1_.DEPARTMENT_NO, t1_.DEPARTMENT_NAME, t1_.LOCATION, t1_.VERSION,
735+
t2_.EMPLOYEE_ID, t2_.EMPLOYEE_NO, t2_.EMPLOYEE_NAME, t2_.MANAGER_ID, t2_.HIREDATE,
736+
t2_.SALARY, t2_.DEPARTMENT_ID, t2_.ADDRESS_ID, t2_.VERSION
737+
from EMPLOYEE t0_
738+
inner join DEPARTMENT t1_ on (t0_.DEPARTMENT_ID = t1_.DEPARTMENT_ID)
739+
left outer join EMPLOYEE t2_ on (t0_.MANAGER_ID = t2_.EMPLOYEE_ID)
740+
where t1_.DEPARTMENT_NAME = ?
741+
664742
Dynamic join expression (Entityql, NativeSql)
665743
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
666744

@@ -1092,6 +1170,7 @@ We support the following settings:
10921170
* queryTimeout
10931171
* sqlLogType
10941172
* batchSize
1173+
* excludeNull
10951174

10961175
They are all optional.
10971176

@@ -1108,6 +1187,7 @@ You can apply them as follows:
11081187
settings.setQueryTimeout(1000);
11091188
settings.setSqlLogType(SqlLogType.RAW);
11101189
settings.setBatchSize(20);
1190+
settings.excludeNull(true);
11111191
})
11121192
.values(
11131193
c -> {
@@ -1227,6 +1307,7 @@ We support the following settings:
12271307
* queryTimeout
12281308
* sqlLogType
12291309
* suppressOptimisticLockException
1310+
* excludeNull
12301311

12311312
They are all optional.
12321313

@@ -1244,6 +1325,7 @@ You can apply them as follows:
12441325
settings.setQueryTimeout(1000);
12451326
settings.setSqlLogType(SqlLogType.RAW);
12461327
settings.setSuppressOptimisticLockException(true);
1328+
settings.excludeNull(true);
12471329
}).set(c -> {
12481330
c.value(e.employeeName, "aaa");
12491331
}).execute();

docs/kotlin-support.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ Add the dependencies using the `kapt` and `implementation` configuration in your
9999
.. code-block:: groovy
100100
101101
dependencies {
102-
implementation "org.seasar.doma:doma-core:2.36.0"
103-
kapt "org.seasar.doma:doma-processor:2.36.0"
102+
implementation "org.seasar.doma:doma-core:2.37.0"
103+
kapt "org.seasar.doma:doma-processor:2.37.0"
104104
}
105105
106106
To simplify your build.script, we recommend you use

docs/release-notes.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
Release notes
33
=============
44

5+
v2.37.0: 2020-06-14
6+
======================
7+
8+
* `GH449 <https://github.com/domaframework/doma/pull/449>`_
9+
Update a document about the Criteria API
10+
* `GH448 <https://github.com/domaframework/doma/pull/448>`_
11+
Support Quarkus
12+
* `GH447 <https://github.com/domaframework/doma/pull/447>`_
13+
Support the excludeNull setting for the INSERT and the UPDATE queries in the Criteria API
14+
* `GH444 <https://github.com/domaframework/doma/pull/444>`_
15+
Support to associate immutable entities in the Criteria API
16+
517
v2.36.0: 2020-05-25
618
======================
719

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package org.seasar.doma;
2+
3+
import java.lang.annotation.ElementType;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
import java.lang.annotation.Target;
7+
8+
@Target(ElementType.TYPE)
9+
@Retention(RetentionPolicy.RUNTIME)
10+
public @interface DaoImplementation {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package org.seasar.doma;
2+
3+
import java.lang.annotation.ElementType;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
import java.lang.annotation.Target;
7+
8+
@Target(ElementType.TYPE)
9+
@Retention(RetentionPolicy.RUNTIME)
10+
public @interface DomainTypeImplementation {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package org.seasar.doma;
2+
3+
import java.lang.annotation.ElementType;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
import java.lang.annotation.Target;
7+
8+
@Target(ElementType.TYPE)
9+
@Retention(RetentionPolicy.RUNTIME)
10+
public @interface EmbeddableTypeImplementation {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package org.seasar.doma;
2+
3+
import java.lang.annotation.ElementType;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
import java.lang.annotation.Target;
7+
8+
@Target(ElementType.TYPE)
9+
@Retention(RetentionPolicy.RUNTIME)
10+
public @interface EntityTypeImplementation {}

doma-core/src/main/java/org/seasar/doma/internal/Artifact.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public final class Artifact {
77

88
private static final String NAME = "Doma";
99

10-
private static final String VERSION = "2.36.0";
10+
private static final String VERSION = "2.37.0";
1111

1212
public static String getName() {
1313
return NAME;

0 commit comments

Comments
 (0)