-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'eclipse-ee4j:2.7' into 2.7
- Loading branch information
Showing
12 changed files
with
547 additions
and
13 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
55 changes: 55 additions & 0 deletions
55
...pselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/weave/IsolatedEntity.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,55 @@ | ||
/* | ||
* Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, | ||
* or the Eclipse Distribution License v. 1.0 which is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
*/ | ||
package org.eclipse.persistence.testing.models.jpa.weave; | ||
|
||
import java.util.Objects; | ||
|
||
import javax.persistence.Entity; | ||
import javax.persistence.Id; | ||
import javax.persistence.Table; | ||
import javax.persistence.Version; | ||
|
||
@Entity | ||
@Table(name="JPA21_ISOLATED_ENTITY") | ||
public class IsolatedEntity { | ||
|
||
@Id | ||
protected String id; | ||
|
||
@Version | ||
protected Integer version; | ||
|
||
public IsolatedEntity() { | ||
super(); | ||
} | ||
|
||
public IsolatedEntity(String id) { | ||
this.id = id; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
IsolatedEntity that = (IsolatedEntity) o; | ||
return Objects.equals(id, that.id) && Objects.equals(version, that.version); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(id, version); | ||
} | ||
} |
74 changes: 74 additions & 0 deletions
74
jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/weave/Location.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,74 @@ | ||
/* | ||
* Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, | ||
* or the Eclipse Distribution License v. 1.0 which is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
*/ | ||
package org.eclipse.persistence.testing.models.jpa.weave; | ||
|
||
import java.util.Objects; | ||
|
||
import javax.persistence.Entity; | ||
import javax.persistence.FetchType; | ||
import javax.persistence.Id; | ||
import javax.persistence.ManyToOne; | ||
import javax.persistence.Table; | ||
import javax.persistence.Version; | ||
|
||
@Entity | ||
@Table(name="JPA21_LOCATION") | ||
public class Location { | ||
|
||
@Id | ||
protected Long id; | ||
|
||
protected String locationId; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
protected Node node; | ||
|
||
@Version | ||
protected Integer version; | ||
|
||
public Location(long id, String locationId) { | ||
this.id = id; | ||
this.locationId = locationId; | ||
} | ||
|
||
protected Location() { | ||
} | ||
|
||
public Long getId() { | ||
return this.id; | ||
} | ||
|
||
public String getLocationId() { | ||
return this.locationId; | ||
} | ||
|
||
public Node getNode() { | ||
return node; | ||
} | ||
|
||
public void setNode(Node node) { | ||
this.node = node; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
Location location = (Location) o; | ||
return Objects.equals(id, location.id) && Objects.equals(locationId, location.locationId) && Objects.equals(node, location.node) && Objects.equals(version, location.version); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(id, locationId, node, version); | ||
} | ||
} |
74 changes: 74 additions & 0 deletions
74
jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/weave/Node.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,74 @@ | ||
/* | ||
* Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, | ||
* or the Eclipse Distribution License v. 1.0 which is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
*/ | ||
package org.eclipse.persistence.testing.models.jpa.weave; | ||
|
||
import java.util.Objects; | ||
|
||
import javax.persistence.Entity; | ||
import javax.persistence.Id; | ||
import javax.persistence.Table; | ||
import javax.persistence.Version; | ||
|
||
@Entity | ||
@Table(name="JPA21_NODE") | ||
public class Node { | ||
|
||
@Id | ||
protected String id; | ||
|
||
protected int availableBufferCapacity = 10; | ||
|
||
@Version | ||
protected Integer version; | ||
|
||
public Node(String id) { | ||
this.id = id; | ||
} | ||
|
||
protected Node() { | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public int getAvailableBufferCapacity() { | ||
return availableBufferCapacity; | ||
} | ||
|
||
public void reserveBufferCapacity() { | ||
availableBufferCapacity--; | ||
} | ||
|
||
public Integer getVersion() { | ||
return version; | ||
} | ||
|
||
/* | ||
public void setVersion(Integer version) { | ||
this.version = version; | ||
} | ||
*/ | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
Node node = (Node) o; | ||
return availableBufferCapacity == node.availableBufferCapacity && Objects.equals(id, node.id) && Objects.equals(version, node.version); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(id, availableBufferCapacity, version); | ||
} | ||
} |
Oops, something went wrong.