File tree 3 files changed +23
-0
lines changed
api/src/main/java/jakarta/persistence/metamodel 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 11
11
*/
12
12
13
13
// Contributors:
14
+ // Gavin King - 3.2
14
15
// Linda DeMichiel - 2.1
15
16
// Linda DeMichiel - 2.0
16
17
26
27
*/
27
28
public interface Metamodel {
28
29
30
+ /**
31
+ * Return the metamodel entity type representing the entity.
32
+ * @param entityName the name of the represented entity
33
+ * @return the metamodel entity type
34
+ * @throws IllegalArgumentException if not an entity
35
+ * @see jakarta.persistence.Entity#name
36
+ * @since 3.2
37
+ */
38
+ EntityType <?> entity (String entityName );
39
+
29
40
/**
30
41
* Return the metamodel entity type representing the entity.
31
42
* @param cls the type of the represented entity
Original file line number Diff line number Diff line change @@ -137,3 +137,5 @@ Entity and embeddable classes may now be static inner classes
137
137
Primary key classes are no longer required to be public and serializable
138
138
139
139
Pulled _getParameters()_ up from _CriteriaQuery_ to _CommonAbstractCriteria_
140
+
141
+ Add overload of _entity()_ accepting an entity name to _Metamodel_
Original file line number Diff line number Diff line change @@ -38,6 +38,16 @@ import java.util.Set;
38
38
*/
39
39
public interface Metamodel {
40
40
41
+ /**
42
+ * Return the metamodel entity type representing the entity.
43
+ * @param entityName the name of the represented entity
44
+ * @return the metamodel entity type
45
+ * @throws IllegalArgumentException if not an entity
46
+ * @see jakarta.persistence.Entity#name
47
+ * @since 3.2
48
+ */
49
+ EntityType<?> entity(String entityName);
50
+
41
51
/**
42
52
* Return the metamodel entity type representing the entity.
43
53
* @param cls the type of the represented entity
You can’t perform that action at this time.
0 commit comments