mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
Persistence models: recognise jakarta.persistence
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
|
||||
import java
|
||||
|
||||
private string getAPersistencePackageName() {
|
||||
result = ["javax.persistence", "jakarta.persistence"]
|
||||
}
|
||||
|
||||
/**
|
||||
* A `RefType` with the `@Entity` annotation that indicates that it can be persisted using a JPA
|
||||
* compatible framework.
|
||||
@@ -27,7 +31,7 @@ class PersistentEntity extends RefType {
|
||||
else
|
||||
// If the access type is not explicit, then the location of the `Id` annotation determines
|
||||
// which access type is used.
|
||||
if this.getAMethod().hasAnnotation("javax.persistence", "Id")
|
||||
if this.getAMethod().hasAnnotation(getAPersistencePackageName(), "Id")
|
||||
then result = "property"
|
||||
else result = "field"
|
||||
}
|
||||
@@ -51,14 +55,16 @@ class PersistentEntity extends RefType {
|
||||
* A `@javax.persistence.Access` annotation.
|
||||
*/
|
||||
class AccessAnnotation extends Annotation {
|
||||
AccessAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Access") }
|
||||
AccessAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "Access") }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.AccessType` annotation.
|
||||
*/
|
||||
class AccessTypeAnnotation extends Annotation {
|
||||
AccessTypeAnnotation() { this.getType().hasQualifiedName("javax.persistence", "AccessType") }
|
||||
AccessTypeAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "AccessType")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,7 +72,7 @@ class AccessTypeAnnotation extends Annotation {
|
||||
*/
|
||||
class AssociationOverrideAnnotation extends Annotation {
|
||||
AssociationOverrideAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "AssociationOverride")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "AssociationOverride")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +81,7 @@ class AssociationOverrideAnnotation extends Annotation {
|
||||
*/
|
||||
class AssociationOverridesAnnotation extends Annotation {
|
||||
AssociationOverridesAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "AssociationOverrides")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "AssociationOverrides")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +90,7 @@ class AssociationOverridesAnnotation extends Annotation {
|
||||
*/
|
||||
class AttributeOverrideAnnotation extends Annotation {
|
||||
AttributeOverrideAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "AttributeOverride")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "AttributeOverride")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +99,7 @@ class AttributeOverrideAnnotation extends Annotation {
|
||||
*/
|
||||
class AttributeOverridesAnnotation extends Annotation {
|
||||
AttributeOverridesAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "AttributeOverrides")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "AttributeOverrides")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,14 +107,16 @@ class AttributeOverridesAnnotation extends Annotation {
|
||||
* A `@javax.persistence.Basic` annotation.
|
||||
*/
|
||||
class BasicAnnotation extends Annotation {
|
||||
BasicAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Basic") }
|
||||
BasicAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "Basic") }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.Cacheable` annotation.
|
||||
*/
|
||||
class CacheableAnnotation extends Annotation {
|
||||
CacheableAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Cacheable") }
|
||||
CacheableAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "Cacheable")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,7 +124,7 @@ class CacheableAnnotation extends Annotation {
|
||||
*/
|
||||
class CollectionTableAnnotation extends Annotation {
|
||||
CollectionTableAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "CollectionTable")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "CollectionTable")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,14 +132,16 @@ class CollectionTableAnnotation extends Annotation {
|
||||
* A `@javax.persistence.Column` annotation.
|
||||
*/
|
||||
class ColumnAnnotation extends Annotation {
|
||||
ColumnAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Column") }
|
||||
ColumnAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "Column") }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.ColumnResult` annotation.
|
||||
*/
|
||||
class ColumnResultAnnotation extends Annotation {
|
||||
ColumnResultAnnotation() { this.getType().hasQualifiedName("javax.persistence", "ColumnResult") }
|
||||
ColumnResultAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "ColumnResult")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -139,7 +149,7 @@ class ColumnResultAnnotation extends Annotation {
|
||||
*/
|
||||
class DiscriminatorColumnAnnotation extends Annotation {
|
||||
DiscriminatorColumnAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "DiscriminatorColumn")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "DiscriminatorColumn")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +158,7 @@ class DiscriminatorColumnAnnotation extends Annotation {
|
||||
*/
|
||||
class DiscriminatorValueAnnotation extends Annotation {
|
||||
DiscriminatorValueAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "DiscriminatorValue")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "DiscriminatorValue")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,7 +167,7 @@ class DiscriminatorValueAnnotation extends Annotation {
|
||||
*/
|
||||
class ElementCollectionAnnotation extends Annotation {
|
||||
ElementCollectionAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "ElementCollection")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "ElementCollection")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,28 +175,32 @@ class ElementCollectionAnnotation extends Annotation {
|
||||
* A `@javax.persistence.Embeddable` annotation.
|
||||
*/
|
||||
class EmbeddableAnnotation extends Annotation {
|
||||
EmbeddableAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Embeddable") }
|
||||
EmbeddableAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "Embeddable")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.Embedded` annotation.
|
||||
*/
|
||||
class EmbeddedAnnotation extends Annotation {
|
||||
EmbeddedAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Embedded") }
|
||||
EmbeddedAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "Embedded") }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.EmbeddedId` annotation.
|
||||
*/
|
||||
class EmbeddedIdAnnotation extends Annotation {
|
||||
EmbeddedIdAnnotation() { this.getType().hasQualifiedName("javax.persistence", "EmbeddedId") }
|
||||
EmbeddedIdAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "EmbeddedId")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.Entity` annotation.
|
||||
*/
|
||||
class EntityAnnotation extends Annotation {
|
||||
EntityAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Entity") }
|
||||
EntityAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "Entity") }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -194,7 +208,7 @@ class EntityAnnotation extends Annotation {
|
||||
*/
|
||||
class EntityListenersAnnotation extends Annotation {
|
||||
EntityListenersAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "EntityListeners")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "EntityListeners")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,14 +216,18 @@ class EntityListenersAnnotation extends Annotation {
|
||||
* A `@javax.persistence.EntityResult` annotation.
|
||||
*/
|
||||
class EntityResultAnnotation extends Annotation {
|
||||
EntityResultAnnotation() { this.getType().hasQualifiedName("javax.persistence", "EntityResult") }
|
||||
EntityResultAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "EntityResult")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.Enumerated` annotation.
|
||||
*/
|
||||
class EnumeratedAnnotation extends Annotation {
|
||||
EnumeratedAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Enumerated") }
|
||||
EnumeratedAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "Enumerated")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -217,7 +235,7 @@ class EnumeratedAnnotation extends Annotation {
|
||||
*/
|
||||
class ExcludeDefaultListenersAnnotation extends Annotation {
|
||||
ExcludeDefaultListenersAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "ExcludeDefaultListeners")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "ExcludeDefaultListeners")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +244,7 @@ class ExcludeDefaultListenersAnnotation extends Annotation {
|
||||
*/
|
||||
class ExcludeSuperclassListenersAnnotation extends Annotation {
|
||||
ExcludeSuperclassListenersAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "ExcludeSuperclassListeners")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "ExcludeSuperclassListeners")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +252,9 @@ class ExcludeSuperclassListenersAnnotation extends Annotation {
|
||||
* A `@javax.persistence.FieldResult` annotation.
|
||||
*/
|
||||
class FieldResultAnnotation extends Annotation {
|
||||
FieldResultAnnotation() { this.getType().hasQualifiedName("javax.persistence", "FieldResult") }
|
||||
FieldResultAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "FieldResult")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -242,7 +262,7 @@ class FieldResultAnnotation extends Annotation {
|
||||
*/
|
||||
class GeneratedValueAnnotation extends Annotation {
|
||||
GeneratedValueAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "GeneratedValue")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "GeneratedValue")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,84 +270,100 @@ class GeneratedValueAnnotation extends Annotation {
|
||||
* A `@javax.persistence.Id` annotation.
|
||||
*/
|
||||
class IdAnnotation extends Annotation {
|
||||
IdAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Id") }
|
||||
IdAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "Id") }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.IdClass` annotation.
|
||||
*/
|
||||
class IdClassAnnotation extends Annotation {
|
||||
IdClassAnnotation() { this.getType().hasQualifiedName("javax.persistence", "IdClass") }
|
||||
IdClassAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "IdClass") }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.Inheritance` annotation.
|
||||
*/
|
||||
class InheritanceAnnotation extends Annotation {
|
||||
InheritanceAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Inheritance") }
|
||||
InheritanceAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "Inheritance")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.JoinColumn` annotation.
|
||||
*/
|
||||
class JoinColumnAnnotation extends Annotation {
|
||||
JoinColumnAnnotation() { this.getType().hasQualifiedName("javax.persistence", "JoinColumn") }
|
||||
JoinColumnAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "JoinColumn")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.JoinColumns` annotation.
|
||||
*/
|
||||
class JoinColumnsAnnotation extends Annotation {
|
||||
JoinColumnsAnnotation() { this.getType().hasQualifiedName("javax.persistence", "JoinColumns") }
|
||||
JoinColumnsAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "JoinColumns")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.JoinTable` annotation.
|
||||
*/
|
||||
class JoinTableAnnotation extends Annotation {
|
||||
JoinTableAnnotation() { this.getType().hasQualifiedName("javax.persistence", "JoinTable") }
|
||||
JoinTableAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "JoinTable")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.Lob` annotation.
|
||||
*/
|
||||
class LobAnnotation extends Annotation {
|
||||
LobAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Lob") }
|
||||
LobAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "Lob") }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.ManyToMany` annotation.
|
||||
*/
|
||||
class ManyToManyAnnotation extends Annotation {
|
||||
ManyToManyAnnotation() { this.getType().hasQualifiedName("javax.persistence", "ManyToMany") }
|
||||
ManyToManyAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "ManyToMany")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.ManyToOne` annotation.
|
||||
*/
|
||||
class ManyToOneAnnotation extends Annotation {
|
||||
ManyToOneAnnotation() { this.getType().hasQualifiedName("javax.persistence", "ManyToOne") }
|
||||
ManyToOneAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "ManyToOne")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.MapKey` annotation.
|
||||
*/
|
||||
class MapKeyAnnotation extends Annotation {
|
||||
MapKeyAnnotation() { this.getType().hasQualifiedName("javax.persistence", "MapKey") }
|
||||
MapKeyAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "MapKey") }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.MapKeyClass` annotation.
|
||||
*/
|
||||
class MapKeyClassAnnotation extends Annotation {
|
||||
MapKeyClassAnnotation() { this.getType().hasQualifiedName("javax.persistence", "MapKeyClass") }
|
||||
MapKeyClassAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "MapKeyClass")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.MapKeyColumn` annotation.
|
||||
*/
|
||||
class MapKeyColumnAnnotation extends Annotation {
|
||||
MapKeyColumnAnnotation() { this.getType().hasQualifiedName("javax.persistence", "MapKeyColumn") }
|
||||
MapKeyColumnAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "MapKeyColumn")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -335,7 +371,7 @@ class MapKeyColumnAnnotation extends Annotation {
|
||||
*/
|
||||
class MapKeyEnumeratedAnnotation extends Annotation {
|
||||
MapKeyEnumeratedAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "MapKeyEnumerated")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "MapKeyEnumerated")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,7 +380,7 @@ class MapKeyEnumeratedAnnotation extends Annotation {
|
||||
*/
|
||||
class MapKeyJoinColumnAnnotation extends Annotation {
|
||||
MapKeyJoinColumnAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "MapKeyJoinColumn")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "MapKeyJoinColumn")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,7 +389,7 @@ class MapKeyJoinColumnAnnotation extends Annotation {
|
||||
*/
|
||||
class MapKeyJoinColumnsAnnotation extends Annotation {
|
||||
MapKeyJoinColumnsAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "MapKeyJoinColumns")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "MapKeyJoinColumns")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,7 +398,7 @@ class MapKeyJoinColumnsAnnotation extends Annotation {
|
||||
*/
|
||||
class MapKeyTemporalAnnotation extends Annotation {
|
||||
MapKeyTemporalAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "MapKeyTemporal")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "MapKeyTemporal")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,7 +407,7 @@ class MapKeyTemporalAnnotation extends Annotation {
|
||||
*/
|
||||
class MappedSuperclassAnnotation extends Annotation {
|
||||
MappedSuperclassAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "MappedSuperclass")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "MappedSuperclass")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -379,7 +415,7 @@ class MappedSuperclassAnnotation extends Annotation {
|
||||
* A `@javax.persistence.MapsId` annotation.
|
||||
*/
|
||||
class MapsIdAnnotation extends Annotation {
|
||||
MapsIdAnnotation() { this.getType().hasQualifiedName("javax.persistence", "MapsId") }
|
||||
MapsIdAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "MapsId") }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -387,7 +423,7 @@ class MapsIdAnnotation extends Annotation {
|
||||
*/
|
||||
class NamedNativeQueriesAnnotation extends Annotation {
|
||||
NamedNativeQueriesAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "NamedNativeQueries")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "NamedNativeQueries")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,7 +432,7 @@ class NamedNativeQueriesAnnotation extends Annotation {
|
||||
*/
|
||||
class NamedNativeQueryAnnotation extends Annotation {
|
||||
NamedNativeQueryAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "NamedNativeQuery")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "NamedNativeQuery")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,42 +440,50 @@ class NamedNativeQueryAnnotation extends Annotation {
|
||||
* A `@javax.persistence.NamedQueries` annotation.
|
||||
*/
|
||||
class NamedQueriesAnnotation extends Annotation {
|
||||
NamedQueriesAnnotation() { this.getType().hasQualifiedName("javax.persistence", "NamedQueries") }
|
||||
NamedQueriesAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "NamedQueries")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.NamedQuery` annotation.
|
||||
*/
|
||||
class NamedQueryAnnotation extends Annotation {
|
||||
NamedQueryAnnotation() { this.getType().hasQualifiedName("javax.persistence", "NamedQuery") }
|
||||
NamedQueryAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "NamedQuery")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.OneToMany` annotation.
|
||||
*/
|
||||
class OneToManyAnnotation extends Annotation {
|
||||
OneToManyAnnotation() { this.getType().hasQualifiedName("javax.persistence", "OneToMany") }
|
||||
OneToManyAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "OneToMany")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.OneToOne` annotation.
|
||||
*/
|
||||
class OneToOneAnnotation extends Annotation {
|
||||
OneToOneAnnotation() { this.getType().hasQualifiedName("javax.persistence", "OneToOne") }
|
||||
OneToOneAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "OneToOne") }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.OrderBy` annotation.
|
||||
*/
|
||||
class OrderByAnnotation extends Annotation {
|
||||
OrderByAnnotation() { this.getType().hasQualifiedName("javax.persistence", "OrderBy") }
|
||||
OrderByAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "OrderBy") }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.OrderColumn` annotation.
|
||||
*/
|
||||
class OrderColumnAnnotation extends Annotation {
|
||||
OrderColumnAnnotation() { this.getType().hasQualifiedName("javax.persistence", "OrderColumn") }
|
||||
OrderColumnAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "OrderColumn")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -447,7 +491,7 @@ class OrderColumnAnnotation extends Annotation {
|
||||
*/
|
||||
class PersistenceContextAnnotation extends Annotation {
|
||||
PersistenceContextAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "PersistenceContext")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "PersistenceContext")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -456,7 +500,7 @@ class PersistenceContextAnnotation extends Annotation {
|
||||
*/
|
||||
class PersistenceContextsAnnotation extends Annotation {
|
||||
PersistenceContextsAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "PersistenceContexts")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "PersistenceContexts")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -465,7 +509,7 @@ class PersistenceContextsAnnotation extends Annotation {
|
||||
*/
|
||||
class PersistencePropertyAnnotation extends Annotation {
|
||||
PersistencePropertyAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "PersistenceProperty")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "PersistenceProperty")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -474,7 +518,7 @@ class PersistencePropertyAnnotation extends Annotation {
|
||||
*/
|
||||
class PersistenceUnitAnnotation extends Annotation {
|
||||
PersistenceUnitAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "PersistenceUnit")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "PersistenceUnit")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -483,7 +527,7 @@ class PersistenceUnitAnnotation extends Annotation {
|
||||
*/
|
||||
class PersistenceUnitsAnnotation extends Annotation {
|
||||
PersistenceUnitsAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "PersistenceUnits")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "PersistenceUnits")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -491,49 +535,61 @@ class PersistenceUnitsAnnotation extends Annotation {
|
||||
* A `@javax.persistence.PostLoad` annotation.
|
||||
*/
|
||||
class PostLoadAnnotation extends Annotation {
|
||||
PostLoadAnnotation() { this.getType().hasQualifiedName("javax.persistence", "PostLoad") }
|
||||
PostLoadAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "PostLoad") }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.PostPersist` annotation.
|
||||
*/
|
||||
class PostPersistAnnotation extends Annotation {
|
||||
PostPersistAnnotation() { this.getType().hasQualifiedName("javax.persistence", "PostPersist") }
|
||||
PostPersistAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "PostPersist")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.PostRemove` annotation.
|
||||
*/
|
||||
class PostRemoveAnnotation extends Annotation {
|
||||
PostRemoveAnnotation() { this.getType().hasQualifiedName("javax.persistence", "PostRemove") }
|
||||
PostRemoveAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "PostRemove")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.PostUpdate` annotation.
|
||||
*/
|
||||
class PostUpdateAnnotation extends Annotation {
|
||||
PostUpdateAnnotation() { this.getType().hasQualifiedName("javax.persistence", "PostUpdate") }
|
||||
PostUpdateAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "PostUpdate")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.PrePersist` annotation.
|
||||
*/
|
||||
class PrePersistAnnotation extends Annotation {
|
||||
PrePersistAnnotation() { this.getType().hasQualifiedName("javax.persistence", "PrePersist") }
|
||||
PrePersistAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "PrePersist")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.PreRemove` annotation.
|
||||
*/
|
||||
class PreRemoveAnnotation extends Annotation {
|
||||
PreRemoveAnnotation() { this.getType().hasQualifiedName("javax.persistence", "PreRemove") }
|
||||
PreRemoveAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "PreRemove")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.PreUpdate` annotation.
|
||||
*/
|
||||
class PreUpdateAnnotation extends Annotation {
|
||||
PreUpdateAnnotation() { this.getType().hasQualifiedName("javax.persistence", "PreUpdate") }
|
||||
PreUpdateAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "PreUpdate")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -541,7 +597,7 @@ class PreUpdateAnnotation extends Annotation {
|
||||
*/
|
||||
class PrimaryKeyJoinColumnAnnotation extends Annotation {
|
||||
PrimaryKeyJoinColumnAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "PrimaryKeyJoinColumn")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "PrimaryKeyJoinColumn")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -550,7 +606,7 @@ class PrimaryKeyJoinColumnAnnotation extends Annotation {
|
||||
*/
|
||||
class PrimaryKeyJoinColumnsAnnotation extends Annotation {
|
||||
PrimaryKeyJoinColumnsAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "PrimaryKeyJoinColumns")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "PrimaryKeyJoinColumns")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -558,7 +614,9 @@ class PrimaryKeyJoinColumnsAnnotation extends Annotation {
|
||||
* A `@javax.persistence.QueryHint` annotation.
|
||||
*/
|
||||
class QueryHintAnnotation extends Annotation {
|
||||
QueryHintAnnotation() { this.getType().hasQualifiedName("javax.persistence", "QueryHint") }
|
||||
QueryHintAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "QueryHint")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -566,7 +624,7 @@ class QueryHintAnnotation extends Annotation {
|
||||
*/
|
||||
class SecondaryTableAnnotation extends Annotation {
|
||||
SecondaryTableAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "SecondaryTable")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "SecondaryTable")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,7 +633,7 @@ class SecondaryTableAnnotation extends Annotation {
|
||||
*/
|
||||
class SecondaryTablesAnnotation extends Annotation {
|
||||
SecondaryTablesAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "SecondaryTables")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "SecondaryTables")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -584,7 +642,7 @@ class SecondaryTablesAnnotation extends Annotation {
|
||||
*/
|
||||
class SequenceGeneratorAnnotation extends Annotation {
|
||||
SequenceGeneratorAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "SequenceGenerator")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "SequenceGenerator")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -593,7 +651,7 @@ class SequenceGeneratorAnnotation extends Annotation {
|
||||
*/
|
||||
class SqlResultSetMappingAnnotation extends Annotation {
|
||||
SqlResultSetMappingAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "SqlResultSetMapping")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "SqlResultSetMapping")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -602,7 +660,7 @@ class SqlResultSetMappingAnnotation extends Annotation {
|
||||
*/
|
||||
class SqlResultSetMappingsAnnotation extends Annotation {
|
||||
SqlResultSetMappingsAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "SqlResultSetMappings")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "SqlResultSetMappings")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -610,7 +668,7 @@ class SqlResultSetMappingsAnnotation extends Annotation {
|
||||
* A `@javax.persistence.Table` annotation.
|
||||
*/
|
||||
class TableAnnotation extends Annotation {
|
||||
TableAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Table") }
|
||||
TableAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "Table") }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -618,7 +676,7 @@ class TableAnnotation extends Annotation {
|
||||
*/
|
||||
class TableGeneratorAnnotation extends Annotation {
|
||||
TableGeneratorAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "TableGenerator")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "TableGenerator")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -626,14 +684,16 @@ class TableGeneratorAnnotation extends Annotation {
|
||||
* A `@javax.persistence.Temporal` annotation.
|
||||
*/
|
||||
class TemporalAnnotation extends Annotation {
|
||||
TemporalAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Temporal") }
|
||||
TemporalAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "Temporal") }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `@javax.persistence.Transient` annotation.
|
||||
*/
|
||||
class TransientAnnotation extends Annotation {
|
||||
TransientAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Transient") }
|
||||
TransientAnnotation() {
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "Transient")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -641,7 +701,7 @@ class TransientAnnotation extends Annotation {
|
||||
*/
|
||||
class UniqueConstraintAnnotation extends Annotation {
|
||||
UniqueConstraintAnnotation() {
|
||||
this.getType().hasQualifiedName("javax.persistence", "UniqueConstraint")
|
||||
this.getType().hasQualifiedName(getAPersistencePackageName(), "UniqueConstraint")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -649,12 +709,12 @@ class UniqueConstraintAnnotation extends Annotation {
|
||||
* A `@javax.persistence.Version` annotation.
|
||||
*/
|
||||
class VersionAnnotation extends Annotation {
|
||||
VersionAnnotation() { this.getType().hasQualifiedName("javax.persistence", "Version") }
|
||||
VersionAnnotation() { this.getType().hasQualifiedName(getAPersistencePackageName(), "Version") }
|
||||
}
|
||||
|
||||
/** The interface `javax.persistence.EntityManager`. */
|
||||
class TypeEntityManager extends Interface {
|
||||
TypeEntityManager() { this.hasQualifiedName("javax.persistence", "EntityManager") }
|
||||
TypeEntityManager() { this.hasQualifiedName(getAPersistencePackageName(), "EntityManager") }
|
||||
|
||||
/** Gets a method named `createQuery` declared in the `EntityManager` interface. */
|
||||
Method getACreateQueryMethod() {
|
||||
@@ -677,7 +737,7 @@ class TypeEntityManager extends Interface {
|
||||
|
||||
/** The interface `javax.persistence.Query`, which represents queries in the Java Persistence Query Language. */
|
||||
class TypeQuery extends Interface {
|
||||
TypeQuery() { this.hasQualifiedName("javax.persistence", "Query") }
|
||||
TypeQuery() { this.hasQualifiedName(getAPersistencePackageName(), "Query") }
|
||||
|
||||
/** Gets a method named `setParameter` declared in the `Query` interface. */
|
||||
Method getASetParameterMethod() {
|
||||
|
||||
Reference in New Issue
Block a user