forked from eclipse-ee4j/eclipselink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jakartaee/persistence#457 - add union/intersect/except to JPQL and cr…
…iteria Jakarta Persistence 3.2.0-B02 Signed-off-by: Tomáš Kraus <[email protected]>
- Loading branch information
1 parent
ed516d7
commit 487c745
Showing
16 changed files
with
334 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...nce32/src/main/java/org/eclipse/persistence/testing/models/jpa/persistence32/Trainer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package org.eclipse.persistence.testing.models.jpa.persistence32; | ||
|
||
import java.util.Objects; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.NamedNativeQuery; | ||
import jakarta.persistence.NamedQuery; | ||
import jakarta.persistence.Table; | ||
|
||
@Entity | ||
@Table(name="PERSISTENCE32_TRAINER") | ||
@NamedQuery(name="Trainer.get", query="SELECT t FROM Trainer t WHERE t.id = :id") | ||
@NamedNativeQuery(name="Trainer.deleteAll", query="DELETE FROM PERSISTENCE32_TRAINER") | ||
public class Trainer { | ||
|
||
// ID is assigned in tests to avoid collisions | ||
@Id | ||
private int id; | ||
|
||
private String name; | ||
|
||
public Trainer() { | ||
} | ||
|
||
public Trainer(int id, String name) { | ||
this.id = id; | ||
this.name = name; | ||
} | ||
|
||
public int getId() { | ||
return id; | ||
} | ||
|
||
public void setId(int id) { | ||
this.id = id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (obj == null || obj.getClass() != this.getClass()) { | ||
return false; | ||
} | ||
return id == ((Trainer) obj).id | ||
&& Objects.equals(name, ((Trainer) obj).name); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = Objects.hash(id, name); | ||
return result; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.