Skip to content

Commit fea8c89

Browse files
author
Jonathan S. Fisher
committed
update copyright year. add test
1 parent ce8a62e commit fea8c89

File tree

6 files changed

+49
-3
lines changed

6 files changed

+49
-3
lines changed

foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/config/EntityManagerProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2025 Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at

jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/beanvalidation/Employee.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2009, 2025 Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -50,6 +50,10 @@ public class Employee {
5050
@Valid
5151
@Embedded
5252
private Address adress;
53+
54+
@Valid
55+
@Embedded
56+
private Phone phone;
5357

5458
// ===========================================================
5559
// getters and setters for the state fields
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.eclipse.persistence.testing.models.jpa.beanvalidation;
2+
3+
public interface GermanPhone {
4+
5+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2009, 2025 Oracle and/or its affiliates. All rights reserved.
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0 which is available at
6+
* http://www.eclipse.org/legal/epl-2.0,
7+
* or the Eclipse Distribution License v. 1.0 which is available at
8+
* http://www.eclipse.org/org/documents/edl-v10.php.
9+
*
10+
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
11+
*/
12+
13+
// Contributors:
14+
15+
package org.eclipse.persistence.testing.models.jpa.beanvalidation;
16+
17+
import javax.persistence.Embeddable;
18+
import javax.validation.constraints.Pattern;
19+
import javax.validation.constraints.Size;
20+
21+
@Embeddable
22+
public class Phone {
23+
@Pattern(regexp = "^\\+1 \\([0-9]{3}\\) [0-9]{3}-[0-9]{4}$", groups = { USPhone.class })
24+
@Pattern(regexp = "^\\+49 \\([1-9]\\d{1,4}\\) \\d{3,8}-\\d{4}$", groups = { GermanPhone.class })
25+
String phone;
26+
27+
public Phone() {}
28+
29+
public Phone(String phone) {
30+
this.phone = phone;
31+
}
32+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.eclipse.persistence.testing.models.jpa.beanvalidation;
2+
3+
public interface USPhone {
4+
5+
}

jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metadata/listeners/BeanValidationListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2009, 2025 Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at

0 commit comments

Comments
 (0)