Skip to content

Commit 48a2d91

Browse files
committed
license headers and ws
1 parent 4a3e6c7 commit 48a2d91

File tree

5 files changed

+90
-74
lines changed

5 files changed

+90
-74
lines changed

hibernate-core/src/main/java/org/hibernate/boot/internal/StandardEntityNotFoundDelegate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import org.hibernate.proxy.EntityNotFoundDelegate;
99

1010
/**
11-
* Standard non-JPA implementation of EntityNotFoundDelegate, throwing the
12-
* Hibernate-specific {@link ObjectNotFoundException}.
11+
* Standard non-JPA implementation of {@link EntityNotFoundDelegate},
12+
* throwing the Hibernate-specific {@link ObjectNotFoundException}.
1313
*
1414
* @author Steve Ebersole
1515
*/
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*
2+
* SPDX-License-Identifier: LGPL-2.1-or-later
3+
* Copyright Red Hat Inc. and Hibernate Authors
4+
*/
15
package org.hibernate.orm.test.annotations.usertype;
26

37
import org.hibernate.testing.orm.junit.DomainModel;
@@ -9,9 +13,9 @@
913
@DomainModel(annotatedClasses = MyEntity.class)
1014
public class EnhancedUserTypeTest {
1115

12-
@Test
13-
void test(SessionFactoryScope scope) {
14-
scope.inTransaction(session -> session.persist(new MyEntity(new MyId("x1"), "hello world")));
15-
}
16+
@Test
17+
void test(SessionFactoryScope scope) {
18+
scope.inTransaction(session -> session.persist(new MyEntity(new MyId("x1"), "hello world")));
19+
}
1620

1721
}
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*
2+
* SPDX-License-Identifier: LGPL-2.1-or-later
3+
* Copyright Red Hat Inc. and Hibernate Authors
4+
*/
15
package org.hibernate.orm.test.annotations.usertype;
26

37
import jakarta.persistence.Entity;
@@ -6,17 +10,17 @@
610

711
@Entity
812
class MyEntity {
9-
@Id
10-
@Type(MyType.class)
11-
MyId id;
13+
@Id
14+
@Type(MyType.class)
15+
MyId id;
1216

13-
String content;
17+
String content;
1418

15-
MyEntity(MyId id, String content) {
16-
this.id = id;
17-
this.content = content;
18-
}
19+
MyEntity(MyId id, String content) {
20+
this.id = id;
21+
this.content = content;
22+
}
1923

20-
MyEntity() {
21-
}
24+
MyEntity() {
25+
}
2226
}
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
/*
2+
* SPDX-License-Identifier: LGPL-2.1-or-later
3+
* Copyright Red Hat Inc. and Hibernate Authors
4+
*/
15
package org.hibernate.orm.test.annotations.usertype;
26

37
class MyId {
4-
final String text;
8+
final String text;
59

6-
MyId(String text) {
7-
this.text = text;
8-
}
10+
MyId(String text) {
11+
this.text = text;
12+
}
913
}
Lines changed: 58 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*
2+
* SPDX-License-Identifier: LGPL-2.1-or-later
3+
* Copyright Red Hat Inc. and Hibernate Authors
4+
*/
15
package org.hibernate.orm.test.annotations.usertype;
26

37
import org.hibernate.HibernateException;
@@ -11,70 +15,70 @@
1115
import java.sql.SQLException;
1216

1317
class MyType implements EnhancedUserType<MyId> {
14-
@Override
15-
public String toSqlLiteral(MyId value) {
16-
return "'" + value.text.replace("'", "''") + "'";
17-
}
18+
@Override
19+
public String toSqlLiteral(MyId value) {
20+
return "'" + value.text.replace("'", "''") + "'";
21+
}
1822

19-
@Override
20-
public String toString(MyId value) throws HibernateException {
21-
return value.text;
22-
}
23+
@Override
24+
public String toString(MyId value) throws HibernateException {
25+
return value.text;
26+
}
2327

24-
@Override
25-
public MyId fromStringValue(CharSequence sequence) throws HibernateException {
26-
return new MyId(sequence.toString());
27-
}
28+
@Override
29+
public MyId fromStringValue(CharSequence sequence) throws HibernateException {
30+
return new MyId(sequence.toString());
31+
}
2832

29-
@Override
30-
public int getSqlType() {
31-
return SqlTypes.VARCHAR;
32-
}
33+
@Override
34+
public int getSqlType() {
35+
return SqlTypes.VARCHAR;
36+
}
3337

34-
@Override
35-
public Class<MyId> returnedClass() {
36-
return MyId.class;
37-
}
38+
@Override
39+
public Class<MyId> returnedClass() {
40+
return MyId.class;
41+
}
3842

39-
@Override
40-
public boolean equals(MyId x, MyId y) {
41-
return x != null && y != null && x.text.equals(y.text);
42-
}
43+
@Override
44+
public boolean equals(MyId x, MyId y) {
45+
return x != null && y != null && x.text.equals(y.text);
46+
}
4347

44-
@Override
45-
public int hashCode(MyId x) {
46-
return x.text.hashCode();
47-
}
48+
@Override
49+
public int hashCode(MyId x) {
50+
return x.text.hashCode();
51+
}
4852

49-
@Override
50-
public MyId nullSafeGet(ResultSet rs, int position, SharedSessionContractImplementor session, Object owner)
51-
throws SQLException {
52-
return new MyId(rs.getString(position));
53-
}
53+
@Override
54+
public MyId nullSafeGet(ResultSet rs, int position, SharedSessionContractImplementor session, Object owner)
55+
throws SQLException {
56+
return new MyId(rs.getString(position));
57+
}
5458

55-
@Override
56-
public void nullSafeSet(PreparedStatement st, MyId value, int index, SharedSessionContractImplementor session)
57-
throws SQLException {
58-
st.setString(index, value.text);
59-
}
59+
@Override
60+
public void nullSafeSet(PreparedStatement st, MyId value, int index, SharedSessionContractImplementor session)
61+
throws SQLException {
62+
st.setString(index, value.text);
63+
}
6064

61-
@Override
62-
public MyId deepCopy(MyId value) {
63-
return value;
64-
}
65+
@Override
66+
public MyId deepCopy(MyId value) {
67+
return value;
68+
}
6569

66-
@Override
67-
public boolean isMutable() {
68-
return false;
69-
}
70+
@Override
71+
public boolean isMutable() {
72+
return false;
73+
}
7074

71-
@Override
72-
public Serializable disassemble(MyId value) {
73-
return value.text;
74-
}
75+
@Override
76+
public Serializable disassemble(MyId value) {
77+
return value.text;
78+
}
7579

76-
@Override
77-
public MyId assemble(Serializable cached, Object owner) {
78-
return new MyId((String) cached);
79-
}
80+
@Override
81+
public MyId assemble(Serializable cached, Object owner) {
82+
return new MyId((String) cached);
83+
}
8084
}

0 commit comments

Comments
 (0)