code
stringlengths
23
201k
docstring
stringlengths
17
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
72
path
stringlengths
11
317
url
stringlengths
57
377
license
stringclasses
7 values
public String getSimpleName() { return clazzName; }
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
getSimpleName
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
public String getQualifiedName() { return packageName + "." + getSimpleName(); }
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
getQualifiedName
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
public String getPackageName() { return packageName; }
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
getPackageName
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
@Override public @Nullable Element getSuperTypeElement() { return findMappedSuperElement( this, context ); }
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
getSuperTypeElement
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
public List<MetaAttribute> getMembers() { if ( !initialized ) { init(); } return members; }
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
getMembers
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
public String generateImports() { return importContext.generateImports(); }
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
generateImports
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
public String importType(String fqcn) { return importContext.importType( fqcn ); }
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
importType
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
public String staticImport(String fqcn, String member) { return importContext.staticImport( fqcn, member ); }
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
staticImport
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
public TypeElement getElement() { return element; }
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
getElement
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
@Override public boolean isMetaComplete() { return isMetaComplete; }
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
isMetaComplete
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
@Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append( "XmlMetaEntity" ); sb.append( "{accessTypeInfo=" ).append( accessTypeInfo ); sb.append( ", clazzName='" ).append( clazzName ).append( '\'' ); sb.append( ", members=" ).append( members ); sb.append( ", isMetaComple...
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
toString
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private static boolean initIsMetaComplete(Context context, Boolean metadataComplete) { return context.isFullyXmlConfigured() || Boolean.TRUE.equals( metadataComplete ); }
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
initIsMetaComplete
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private @Nullable String @Nullable[] getCollectionTypes(String propertyName, String explicitTargetEntity, @Nullable String explicitMapKeyClass, ElementKind expectedElementKind) { for ( Element elem : element.getEnclosedElements() ) { if ( !expectedElementKind.equals( elem.getKind() ) ) { continue; } Str...
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
getCollectionTypes
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private @Nullable DeclaredType determineDeclaredType(Element elem) { DeclaredType type = null; if ( elem.asType() instanceof DeclaredType ) { type = ( (DeclaredType) elem.asType() ); } else if ( elem.asType() instanceof ExecutableType ) { ExecutableType executableType = (ExecutableType) elem.asType(); ...
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
determineDeclaredType
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private @Nullable String[] determineTypes(String propertyName, String explicitTargetEntity, @Nullable String explicitMapKeyClass, DeclaredType type) { @Nullable String[] types = new String[3]; determineTargetType( type, propertyName, explicitTargetEntity, types ); if ( determineCollectionType( type, types ).equal...
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
determineTypes
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private void determineMapType(DeclaredType type, @Nullable String explicitMapKeyClass, @Nullable String[] types) { if ( explicitMapKeyClass != null ) { types[2] = explicitMapKeyClass; } else { types[2] = TypeUtils.getKeyType( type, context ); } }
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
determineMapType
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private String determineCollectionType(DeclaredType type, @Nullable String[] types) { return NullnessUtil.castNonNull( types[1] = Constants.COLLECTIONS.get( type.asElement().toString() ) ); }
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
determineCollectionType
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private void determineTargetType(DeclaredType type, String propertyName, String explicitTargetEntity, @Nullable String[] types) { List<? extends TypeMirror> typeArguments = type.getTypeArguments(); if ( typeArguments.isEmpty() && explicitTargetEntity == null ) { throw new MetaModelGenerationException( "Unable t...
Whether the members of this type have already been initialized or not. <p> Embeddables and mapped super-classes need to be lazily initialized since the access type may be determined by the class which is embedding or sub-classing the entity or super-class. This might not be known until annotations are processed. <p> Al...
determineTargetType
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private @Nullable String getType(String propertyName, @Nullable String explicitTargetEntity, ElementKind expectedElementKind) { for ( Element elem : element.getEnclosedElements() ) { if ( !expectedElementKind.equals( elem.getKind() ) ) { continue; } String name = elem.getSimpleName().toString(); fina...
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
getType
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private void parseAttributes(JaxbAttributesContainerImpl attributes) { XmlMetaSingleAttribute attribute; for ( JaxbIdImpl id : attributes.getIdAttributes() ) { final ElementKind elementKind = getElementKind( id.getAccess() ); final String type = getType( id.getName(), null, elementKind ); if ( type != null...
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
parseAttributes
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private void parseEmbeddableAttributes(@Nullable JaxbEmbeddableAttributesContainerImpl attributes) { if ( attributes == null ) { return; } for ( JaxbBasicImpl basic : attributes.getBasicAttributes() ) { parseBasic( basic ); } for ( JaxbManyToOneImpl manyToOne : attributes.getManyToOneAttributes() ) { ...
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
parseEmbeddableAttributes
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private boolean parseElementCollection(JaxbElementCollectionImpl collection) { @Nullable String @Nullable[] types; XmlMetaCollection metaCollection; ElementKind elementKind = getElementKind( collection.getAccess() ); String explicitTargetClass = determineExplicitTargetEntity( collection.getTargetClass() ); St...
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
parseElementCollection
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private void parseEmbedded(JaxbEmbeddedImpl embedded) { XmlMetaSingleAttribute attribute; ElementKind elementKind = getElementKind( embedded.getAccess() ); String type = getType( embedded.getName(), null, elementKind ); if ( type != null ) { attribute = new XmlMetaSingleAttribute( this, embedded.getName(), t...
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
parseEmbedded
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private String determineExplicitTargetEntity(String targetClass) { String explicitTargetClass = targetClass; if ( explicitTargetClass != null ) { explicitTargetClass = determineFullyQualifiedClassName( defaultPackageName, targetClass ); } return explicitTargetClass; }
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
determineExplicitTargetEntity
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private @Nullable String determineExplicitMapKeyClass(JaxbMapKeyClassImpl mapKeyClass) { String explicitMapKey = null; if ( mapKeyClass != null ) { explicitMapKey = determineFullyQualifiedClassName( defaultPackageName, mapKeyClass.getClazz() ); } return explicitMapKey; }
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
determineExplicitMapKeyClass
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private boolean parseOneToMany(JaxbOneToManyImpl oneToMany) { @Nullable String @Nullable [] types; XmlMetaCollection metaCollection; ElementKind elementKind = getElementKind( oneToMany.getAccess() ); String explicitTargetClass = determineExplicitTargetEntity( oneToMany.getTargetEntity() ); String explicitMapK...
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
parseOneToMany
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private boolean parseManyToMany(JaxbManyToManyImpl manyToMany) { @Nullable String @Nullable [] types; XmlMetaCollection metaCollection; ElementKind elementKind = getElementKind( manyToMany.getAccess() ); String explicitTargetClass = determineExplicitTargetEntity( manyToMany.getTargetEntity() ); String explici...
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
parseManyToMany
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private void parseOneToOne(JaxbOneToOneImpl oneToOne) { XmlMetaSingleAttribute attribute; ElementKind elementKind = getElementKind( oneToOne.getAccess() ); String type = getType( oneToOne.getName(), oneToOne.getTargetEntity(), elementKind ); if ( type != null ) { attribute = new XmlMetaSingleAttribute( this,...
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
parseOneToOne
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private void parseManyToOne(JaxbManyToOneImpl manyToOne) { XmlMetaSingleAttribute attribute; ElementKind elementKind = getElementKind( manyToOne.getAccess() ); String type = getType( manyToOne.getName(), manyToOne.getTargetEntity(), elementKind ); if ( type != null ) { attribute = new XmlMetaSingleAttribute(...
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
parseManyToOne
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private void parseBasic(JaxbBasicImpl basic) { XmlMetaSingleAttribute attribute; ElementKind elementKind = getElementKind( basic.getAccess() ); String type = getType( basic.getName(), null, elementKind ); if ( type != null ) { attribute = new XmlMetaSingleAttribute( this, basic.getName(), type ); members....
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
parseBasic
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private void logMetaModelException(String name, MetaModelGenerationException e) { StringBuilder builder = new StringBuilder(); builder.append( "Error processing xml for " ); builder.append( clazzName ); builder.append( "." ); builder.append( name ); builder.append( ". Error message: " ); builder.append( e...
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
logMetaModelException
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
private ElementKind getElementKind(AccessType accessType) { // if no explicit access type was specified in xml we use the entity access type if ( accessType == null ) { return getElementKindForAccessType( accessTypeInfo.getAccessType() ); } return FIELD.equals( accessType ) ? ElementKind.FIELD : ElementKind....
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
getElementKind
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
@Override public Context getContext() { return context; }
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
getContext
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
@Override public boolean isImplementation() { return false; }
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
isImplementation
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
@Override public boolean isInjectable() { return false; }
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
isInjectable
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
@Override public String scope() { throw new UnsupportedOperationException("operation not supported"); }
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
scope
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
@Override public boolean isJakartaDataStyle() { return false; }
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
isJakartaDataStyle
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
@Override public List<AnnotationMirror> inheritedAnnotations() { return emptyList(); }
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
inheritedAnnotations
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
@Override public String javadoc() { return "/**\n * Static metamodel for {@link " + clazzName + "}\n **/"; }
Returns the entity type for a property. @param propertyName The property name @param explicitTargetEntity The explicitly specified target entity type or {@code null}. @param expectedElementKind Determines property vs field access type @return The entity type for this property or {@code null} if the property with the...
javadoc
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaEntity.java
Apache-2.0
@Test public void testXmlConfiguredEntityGenerated() { TestUtil.assertMetamodelClassGeneratedFor( Order.class ); }
@author Emmanuel Bernard @author Hardy Ferentschik
testXmlConfiguredEntityGenerated
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
Apache-2.0
@Test public void testExcludeTransientFieldAndStatic() { TestUtil.assertAbsenceOfFieldInMetamodelFor( Product.class, "nonPersistent" ); TestUtil.assertAbsenceOfFieldInMetamodelFor( Product.class, "nonPersistent2" ); }
@author Emmanuel Bernard @author Hardy Ferentschik
testExcludeTransientFieldAndStatic
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
Apache-2.0
@Test public void testDefaultAccessTypeOnEntity() { TestUtil.assertAbsenceOfFieldInMetamodelFor( User.class, "nonPersistent" ); }
@author Emmanuel Bernard @author Hardy Ferentschik
testDefaultAccessTypeOnEntity
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
Apache-2.0
@Test public void testDefaultAccessTypeForSubclassOfEntity() { TestUtil.assertAbsenceOfFieldInMetamodelFor( Customer.class, "nonPersistent" ); }
@author Emmanuel Bernard @author Hardy Ferentschik
testDefaultAccessTypeForSubclassOfEntity
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
Apache-2.0
@Test public void testDefaultAccessTypeForEmbeddable() { TestUtil.assertAbsenceOfFieldInMetamodelFor( Detail.class, "nonPersistent" ); }
@author Emmanuel Bernard @author Hardy Ferentschik
testDefaultAccessTypeForEmbeddable
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
Apache-2.0
@Test public void testInheritedAccessTypeForEmbeddable() { TestUtil.assertAbsenceOfFieldInMetamodelFor( Country.class, "nonPersistent" ); assertAbsenceOfFieldInMetamodelFor( Pet.class, "nonPersistent", "Collection of embeddable not taken care of" ); }
@author Emmanuel Bernard @author Hardy Ferentschik
testInheritedAccessTypeForEmbeddable
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
Apache-2.0
@Test @TestForIssue(jiraKey = " METAGEN-81") public void testAccessTypeForEmbeddableDeterminedByIdAnnotationInRootEntity() { assertPresenceOfFieldInMetamodelFor( Hotel.class, "webDomainExpert", "Access type should be inherited position of the @Id field annotation in the root entity" ); }
@author Emmanuel Bernard @author Hardy Ferentschik
testAccessTypeForEmbeddableDeterminedByIdAnnotationInRootEntity
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
Apache-2.0
@Test public void testDefaultAccessTypeForMappedSuperclass() { TestUtil.assertAbsenceOfFieldInMetamodelFor( Detail.class, "volume" ); }
@author Emmanuel Bernard @author Hardy Ferentschik
testDefaultAccessTypeForMappedSuperclass
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
Apache-2.0
@Test public void testExplicitAccessTypeAndDefaultFromRootEntity() { assertAbsenceOfFieldInMetamodelFor( LivingBeing.class, "nonPersistent", "explicit access type on mapped superclass" ); assertAbsenceOfFieldInMetamodelFor( Hominidae.class, "nonPersistent", "explicit access type on entity" ); asser...
@author Emmanuel Bernard @author Hardy Ferentschik
testExplicitAccessTypeAndDefaultFromRootEntity
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
Apache-2.0
@Test public void testMemberAccessType() { assertPresenceOfFieldInMetamodelFor( Customer.class, "goodPayer", "access type overriding" ); assertAttributeTypeInMetaModelFor( Customer.class, "goodPayer", Boolean.class, "access type overriding" ); }
@author Emmanuel Bernard @author Hardy Ferentschik
testMemberAccessType
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/AccessTypeTest.java
Apache-2.0
@Id public long getId() { return id; }
@author Max Andersen @author Hardy Ferentschik @author Emmanuel Bernard
getId
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
Apache-2.0
public void setId(long id) { this.id = id; }
@author Max Andersen @author Hardy Ferentschik @author Emmanuel Bernard
setId
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
Apache-2.0
public int getQuantity() { return quantity; }
@author Max Andersen @author Hardy Ferentschik @author Emmanuel Bernard
getQuantity
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
Apache-2.0
public void setQuantity(int quantity) { this.quantity = quantity; }
@author Max Andersen @author Hardy Ferentschik @author Emmanuel Bernard
setQuantity
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
Apache-2.0
@ManyToOne public Product getProduct() { return product; }
@author Max Andersen @author Hardy Ferentschik @author Emmanuel Bernard
getProduct
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
Apache-2.0
public void setProduct(Product product) { this.product = product; }
@author Max Andersen @author Hardy Ferentschik @author Emmanuel Bernard
setProduct
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
Apache-2.0
@ManyToOne public Order getOrder() { return order; }
@author Max Andersen @author Hardy Ferentschik @author Emmanuel Bernard
getOrder
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
Apache-2.0
public void setOrder(Order order) { this.order = order; }
@author Max Andersen @author Hardy Ferentschik @author Emmanuel Bernard
setOrder
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
Apache-2.0
@OneToMany public Map<String, Order> getNamedOrders() { return null; }
@author Max Andersen @author Hardy Ferentschik @author Emmanuel Bernard
getNamedOrders
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
Apache-2.0
public Detail getDetail() { return detail; }
@author Max Andersen @author Hardy Ferentschik @author Emmanuel Bernard
getDetail
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
Apache-2.0
public void setDetail(Detail detail) { this.detail = detail; }
@author Max Andersen @author Hardy Ferentschik @author Emmanuel Bernard
setDetail
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/accesstype/Item.java
Apache-2.0
@Test @WithClasses({ EntityWithInstanceGetEntityManager.class, EntityExtendingEntityWithInstanceGetEntityManager.class }) public void entityWithInstanceGetEntityManager() { doTest( EntityWithInstanceGetEntityManager.class, EntityExtendingEntityWithInstanceGetEntityManager.class ); }
Test various scenarios where a superclass of an entity has a {@code getEntityManager()} method. <p> The superclass may be itself an entity, or a mapped superclass, or not mapped at all. <p> The method may be static or not.
entityWithInstanceGetEntityManager
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
Apache-2.0
@Test @WithClasses({ EntityWithStaticGetEntityManager.class, EntityExtendingEntityWithStaticGetEntityManager.class }) public void entityWithStaticGetEntityManager() { doTest( EntityWithStaticGetEntityManager.class, EntityExtendingEntityWithStaticGetEntityManager.class ); }
Test various scenarios where a superclass of an entity has a {@code getEntityManager()} method. <p> The superclass may be itself an entity, or a mapped superclass, or not mapped at all. <p> The method may be static or not.
entityWithStaticGetEntityManager
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
Apache-2.0
@Test @WithClasses({ NonEntityWithInstanceGetEntityManager.class, EntityExtendingNonEntityWithInstanceGetEntityManager.class }) public void nonEntityWithInstanceGetEntityManager() { doTest( NonEntityWithInstanceGetEntityManager.class, EntityExtendingNonEntityWithInstanceGetEntityManager.class ); }
Test various scenarios where a superclass of an entity has a {@code getEntityManager()} method. <p> The superclass may be itself an entity, or a mapped superclass, or not mapped at all. <p> The method may be static or not.
nonEntityWithInstanceGetEntityManager
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
Apache-2.0
@Test @WithClasses({ NonEntityWithStaticGetEntityManager.class, EntityExtendingNonEntityWithStaticGetEntityManager.class }) public void nonEntityWithStaticGetEntityManager() { doTest( NonEntityWithStaticGetEntityManager.class, EntityExtendingNonEntityWithStaticGetEntityManager.class ); }
Test various scenarios where a superclass of an entity has a {@code getEntityManager()} method. <p> The superclass may be itself an entity, or a mapped superclass, or not mapped at all. <p> The method may be static or not.
nonEntityWithStaticGetEntityManager
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
Apache-2.0
@Test @WithClasses({ MapperSuperClassWithInstanceGetEntityManager.class, EntityExtendingMapperSuperClassWithInstanceGetEntityManager.class }) public void mappedSuperClassWithInstanceGetEntityManager() { doTest( MapperSuperClassWithInstanceGetEntityManager.class, EntityExtendingMapperSuperClassWithIns...
Test various scenarios where a superclass of an entity has a {@code getEntityManager()} method. <p> The superclass may be itself an entity, or a mapped superclass, or not mapped at all. <p> The method may be static or not.
mappedSuperClassWithInstanceGetEntityManager
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
Apache-2.0
@Test @WithClasses({ MapperSuperClassWithStaticGetEntityManager.class, EntityExtendingMapperSuperClassWithStaticGetEntityManager.class }) public void mappedSuperClassWithStaticGetEntityManager() { doTest( MapperSuperClassWithStaticGetEntityManager.class, EntityExtendingMapperSuperClassWithStaticGetEn...
Test various scenarios where a superclass of an entity has a {@code getEntityManager()} method. <p> The superclass may be itself an entity, or a mapped superclass, or not mapped at all. <p> The method may be static or not.
mappedSuperClassWithStaticGetEntityManager
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
Apache-2.0
@Test @WithClasses({ NonEntityWithInstanceGetEntityManager.class, MapperSuperClassExtendingNonEntityWithInstanceGetEntityManager.class, EntityExtendingMapperSuperClassExtendingNonEntityWithInstanceGetEntityManager.class }) public void mappedSuperClassExtendingNonEntityWithInstanceGetEntityManager() { doTe...
Test various scenarios where a superclass of an entity has a {@code getEntityManager()} method. <p> The superclass may be itself an entity, or a mapped superclass, or not mapped at all. <p> The method may be static or not.
mappedSuperClassExtendingNonEntityWithInstanceGetEntityManager
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
Apache-2.0
@Test @WithClasses({ NonEntityWithStaticGetEntityManager.class, MapperSuperClassExtendingNonEntityWithStaticGetEntityManager.class, EntityExtendingMapperSuperClassExtendingNonEntityWithStaticGetEntityManager.class }) public void mappedSuperClassExtendingNonEntityWithStaticGetEntityManager() { doTest( ...
Test various scenarios where a superclass of an entity has a {@code getEntityManager()} method. <p> The superclass may be itself an entity, or a mapped superclass, or not mapped at all. <p> The method may be static or not.
mappedSuperClassExtendingNonEntityWithStaticGetEntityManager
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
Apache-2.0
private void doTest(Class<?> superclass, Class<?> entitySubclass) { System.out.println( TestUtil.getMetaModelSourceAsString( superclass ) ); System.out.println( TestUtil.getMetaModelSourceAsString( entitySubclass ) ); assertMetamodelClassGeneratedFor( entitySubclass ); assertAbsenceOfNonDefaultConstructorInMeta...
Test various scenarios where a superclass of an entity has a {@code getEntityManager()} method. <p> The superclass may be itself an entity, or a mapped superclass, or not mapped at all. <p> The method may be static or not.
doTest
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/constructor/SuperClassWithGetEntityManagerTest.java
Apache-2.0
@Test @WithClasses({ AbstractEntity.class, Area.class, Building.class, Customer.class, House.class, Person.class, User.class }) public void testInheritance() throws Exception { // entity inheritance assertSuperclassRelationshipInMetamodel( Customer.class, User.class ); // mapped super c...
@author Emmanuel Bernard @author Hardy Ferentschik
testInheritance
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/inheritance/basic/InheritanceTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/inheritance/basic/InheritanceTest.java
Apache-2.0
@Test @TestForIssue(jiraKey = "METAGEN-69") @WithClasses({ JetPlane.class, PersistenceBase.class, Plane.class }) public void testDeepInheritance() throws Exception { assertMetamodelClassGeneratedFor( Plane.class ); assertMetamodelClassGeneratedFor( JetPlane.class ); assertPresenceOfFieldInMetamodelFor( JetPlan...
Tests a deep class hierarchy mixed with inheritance and a root class that does not declare an id @author Igor Vaynberg
testDeepInheritance
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/inheritance/deep/DeepInheritanceTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/inheritance/deep/DeepInheritanceTest.java
Apache-2.0
@PrePersist void prePersist() { created = new Date(); }
A mapped super class that does not define an id attribute. @author Igor Vaynberg
prePersist
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/inheritance/deep/PersistenceBase.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/inheritance/deep/PersistenceBase.java
Apache-2.0
@Test @WithClasses({ BaseEntity.class, MappedBase.class, NormalExtendsEntity.class, NormalExtendsMapped.class, SubA.class, SubB.class }) public void testUnmappedClassInHierarchy() throws Exception { assertSuperclassRelationshipInMetamodel( SubA.class, BaseEntity.class ); assertSuperclassRelatio...
@author Emmanuel Bernard @author Hardy Ferentschik
testUnmappedClassInHierarchy
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/inheritance/unmappedclassinhierarchy/UnmappedClassInHierarchyTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/inheritance/unmappedclassinhierarchy/UnmappedClassInHierarchyTest.java
Apache-2.0
@Test @TestForIssue(jiraKey = "METAGEN-92") @WithClasses(Snafu.class) @WithProcessorOption(key = HibernateProcessor.PERSISTENCE_XML_OPTION, value = "org/hibernate/processor/test/persistence21/persistence.xml") public void testMetaModelGeneratedForXmlConfiguredEntity() { assertMetamodelClassGeneratedFor( Snafu....
Test for parsing JPA 2.1 descriptors. @author Hardy Ferentschik
testMetaModelGeneratedForXmlConfiguredEntity
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/persistence21/Jpa21DescriptorTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/persistence21/Jpa21DescriptorTest.java
Apache-2.0
@Override protected Statement methodBlock(FrameworkMethod method) { Statement statement = super.methodBlock( method ); processAnnotations( method ); if ( !annotationProcessorNeedsToRun() ) { return statement; } return new CompilationStatement( statement, getTestClass().getJavaClass(), testEnt...
Custom JUnit runner which makes sure the annotation processor runs prior to the test method. @author Hardy Ferentschik @see CompilationStatement
methodBlock
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationRunner.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationRunner.java
Apache-2.0
private void processWithClasses(WithClasses withClasses) { if ( withClasses != null ) { Collections.addAll( testEntities, withClasses.value() ); Collections.addAll( preCompileEntities, withClasses.preCompile() ); Collections.addAll( sources, withClasses.sources() ); } }
Custom JUnit runner which makes sure the annotation processor runs prior to the test method. @author Hardy Ferentschik @see CompilationStatement
processWithClasses
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationRunner.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationRunner.java
Apache-2.0
private void processWithMappingFiles(WithMappingFiles withMappingFiles) { if ( withMappingFiles != null ) { String packageNameAsPath = TestUtil.fcnToPath( packageName ); for ( String mappingFile : withMappingFiles.value() ) { mappingFiles.add( packageNameAsPath + TestUtil.RESOURCE_SEPARATOR + mappingFile );...
Custom JUnit runner which makes sure the annotation processor runs prior to the test method. @author Hardy Ferentschik @see CompilationStatement
processWithMappingFiles
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationRunner.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationRunner.java
Apache-2.0
private void processOptions(WithProcessorOption withProcessorOption, WithProcessorOption.List withProcessorOptionsListAnnotation) { addOptions( withProcessorOption ); if ( withProcessorOptionsListAnnotation != null ) { for ( WithProcessorOption option : withProcessorOptionsListAnnotation.value() ) { addOp...
Custom JUnit runner which makes sure the annotation processor runs prior to the test method. @author Hardy Ferentschik @see CompilationStatement
processOptions
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationRunner.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationRunner.java
Apache-2.0
private void processAnnotations(FrameworkMethod method) { // configuration will be added to potential class level configuration processWithClasses( method.getAnnotation( WithClasses.class ) ); processWithMappingFiles( method.getAnnotation( WithMappingFiles.class ) ); processOptions( method.getAnnotation( Wi...
Custom JUnit runner which makes sure the annotation processor runs prior to the test method. @author Hardy Ferentschik @see CompilationStatement
processAnnotations
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationRunner.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationRunner.java
Apache-2.0
private void addOptions(WithProcessorOption withProcessorOptionsAnnotation) { if ( withProcessorOptionsAnnotation != null ) { processorOptions.put( withProcessorOptionsAnnotation.key(), withProcessorOptionsAnnotation.value() ); } }
Custom JUnit runner which makes sure the annotation processor runs prior to the test method. @author Hardy Ferentschik @see CompilationStatement
addOptions
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationRunner.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationRunner.java
Apache-2.0
private boolean annotationProcessorNeedsToRun() { return !testEntities.isEmpty() || !sources.isEmpty() || !mappingFiles.isEmpty(); }
Custom JUnit runner which makes sure the annotation processor runs prior to the test method. @author Hardy Ferentschik @see CompilationStatement
annotationProcessorNeedsToRun
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationRunner.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationRunner.java
Apache-2.0
@Override public void evaluate() throws Throwable { // some test needs to compile some classes prior to the actual classes under test if ( !preCompileEntities.isEmpty() ) { compile( getCompilationUnits( preCompileEntities, null ) ); } // now we compile the actual test classes compile( getCompilationUnits...
A custom JUnit statement which will run annotation processor prior to execute the original statement/test. The classes to process are specified via {@code WithClasses}, {@code WithMappingFiles} and {@code WithProcessorOption} on the actual test. @author Hardy Ferentschik
evaluate
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationStatement.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationStatement.java
Apache-2.0
private List<File> getCompilationUnits(List<Class<?>> classesToCompile, List<String> sources) { List<File> javaFiles = new ArrayList<File>(); for ( Class<?> testClass : classesToCompile ) { String pathToSource = getPathToSource( testClass ); javaFiles.add( new File( pathToSource ) ); } if ( sources != nul...
A custom JUnit statement which will run annotation processor prior to execute the original statement/test. The classes to process are specified via {@code WithClasses}, {@code WithMappingFiles} and {@code WithProcessorOption} on the actual test. @author Hardy Ferentschik
getCompilationUnits
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationStatement.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationStatement.java
Apache-2.0
private String getPathToSource(Class<?> testClass) { if ( testClass.isMemberClass() ) { return getPathToSource( testClass.getDeclaringClass() ); } return TestUtil.getSourceBaseDir( testClass ).getAbsolutePath() + File.separator + testClass.getName() .replace( PACKAGE_SEPARATOR, File.separator ) + ".java"; ...
A custom JUnit statement which will run annotation processor prior to execute the original statement/test. The classes to process are specified via {@code WithClasses}, {@code WithMappingFiles} and {@code WithProcessorOption} on the actual test. @author Hardy Ferentschik
getPathToSource
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationStatement.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationStatement.java
Apache-2.0
private void compile(List<File> sourceFiles) throws Exception { List<String> options = createJavaOptions(); JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>(); StandardJavaFileManager fileManager = compiler.g...
A custom JUnit statement which will run annotation processor prior to execute the original statement/test. The classes to process are specified via {@code WithClasses}, {@code WithMappingFiles} and {@code WithProcessorOption} on the actual test. @author Hardy Ferentschik
compile
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationStatement.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationStatement.java
Apache-2.0
private List<String> createJavaOptions() { List<String> options = new ArrayList<String>(); options.add( "-d" ); options.add( TestUtil.getOutBaseDir( testClass ).getAbsolutePath() ); options.add( "-processor" ); options.add( HibernateProcessor.class.getName() ); // pass orm files if specified if ( !xmlMap...
A custom JUnit statement which will run annotation processor prior to execute the original statement/test. The classes to process are specified via {@code WithClasses}, {@code WithMappingFiles} and {@code WithProcessorOption} on the actual test. @author Hardy Ferentschik
createJavaOptions
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationStatement.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationStatement.java
Apache-2.0
private void compileSources(List<String> options, JavaCompiler compiler, DiagnosticCollector<JavaFileObject> diagnostics, StandardJavaFileManager fileManager, Iterable<? extends JavaFileObject> compilationUnits) { JavaCompiler.CompilationTask task = compiler.getTask( null, fileManager, diagnostics, op...
A custom JUnit statement which will run annotation processor prior to execute the original statement/test. The classes to process are specified via {@code WithClasses}, {@code WithMappingFiles} and {@code WithProcessorOption} on the actual test. @author Hardy Ferentschik
compileSources
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationStatement.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationStatement.java
Apache-2.0
@After public void cleanup() throws Exception { TestUtil.deleteProcessorGeneratedFiles(getClass()); }
Base class for annotation processor tests. @author Hardy Ferentschik
cleanup
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationTest.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/CompilationTest.java
Apache-2.0
public static void assertMetamodelClassGeneratedFor(Class<?> clazz) { assertNotNull( getMetamodelClassFor( clazz ) ); }
Asserts that a metamodel class for the specified class got generated. @param clazz the class for which a metamodel class should have been generated.
assertMetamodelClassGeneratedFor
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
Apache-2.0
public static void assertMetamodelClassGeneratedFor(String className) { assertNotNull( getMetamodelClassFor( className ) ); }
Asserts that a metamodel class for the specified class got generated. @param clazz the class for which a metamodel class should have been generated.
assertMetamodelClassGeneratedFor
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
Apache-2.0
public static void assertMetamodelClassGeneratedFor(Class<?> clazz, boolean prefix) { assertNotNull( getMetamodelClassFor( clazz, prefix ) ); }
Asserts that a metamodel class for the specified class got generated. @param clazz the class for which a metamodel class should have been generated.
assertMetamodelClassGeneratedFor
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
Apache-2.0
public static void assertNoMetamodelClassGeneratedFor(Class<?> clazz) { try { getMetamodelClassFor( clazz ); fail(); } catch (AssertionError ae) { } }
Asserts that a metamodel class for the specified class got generated. @param clazz the class for which a metamodel class should have been generated.
assertNoMetamodelClassGeneratedFor
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
Apache-2.0
public static void deleteProcessorGeneratedFiles(Class<?> testClass) { for ( File file : getOutBaseDir(testClass).listFiles() ) { deleteFilesRecursive( file ); } }
Deletes recursively all files found in the output directory for the annotation processor. @return the output directory for the generated source and class files.
deleteProcessorGeneratedFiles
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
Apache-2.0
public static File getOutBaseDir(Class<?> testClass) { File targetDir = getTargetDir( testClass ); File outBaseDir = new File( targetDir, "processor-generated-test-classes" ); if ( !outBaseDir.exists() ) { if ( !outBaseDir.mkdirs() ) { fail( "Unable to create test output directory " + outBaseDir ); } ...
@return the output directory for the generated source and class files.
getOutBaseDir
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
Apache-2.0
public static File getSourceBaseDir(Class<?> testClass) { return getBaseDir( testClass, "java" ); }
@return the output directory for the generated source and class files.
getSourceBaseDir
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
Apache-2.0
public static File getResourcesBaseDir(Class<?> testClass) { return getBaseDir( testClass, "resources" ); }
@return the output directory for the generated source and class files.
getResourcesBaseDir
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
Apache-2.0
private static File getBaseDir(Class<?> testClass, String type) { ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); String currentTestClassName = testClass.getName(); int hopsToCompileDirectory = currentTestClassName.split( "\\." ).length; URL classURL = contextClassLoader.getReso...
@return the output directory for the generated source and class files.
getBaseDir
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
Apache-2.0
public static Class<?> getMetamodelClassFor(Class<?> entityClass) { return getMetamodelClassFor( entityClass, false ); }
Returns the static metamodel class for the specified entity. @param entityClass the entity for which to retrieve the metamodel class. Cannot be {@code null}. @return the static metamodel class for the specified entity.
getMetamodelClassFor
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
Apache-2.0
public static Class<?> getMetamodelClassFor(Class<?> entityClass, boolean prefix) { assertNotNull( "Class parameter cannot be null", entityClass ); String metaModelClassName = getMetaModelClassName( entityClass, prefix ); try { URL outDirUrl = getOutBaseDir( entityClass ).toURI().toURL(); URL[] urls = new U...
Returns the static metamodel class for the specified entity. @param entityClass the entity for which to retrieve the metamodel class. Cannot be {@code null}. @return the static metamodel class for the specified entity.
getMetamodelClassFor
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
Apache-2.0
public static Class<?> getMetamodelClassFor(String className) { assertNotNull( "Class parameter cannot be null", className ); String metaModelClassName = getMetaModelClassName( className ); try { URL outDirUrl = getOutBaseDir( TestUtil.class ).toURI().toURL(); URL[] urls = new URL[1]; urls[0] = outDirUrl...
Returns the static metamodel class for the specified entity. @param entityClass the entity for which to retrieve the metamodel class. Cannot be {@code null}. @return the static metamodel class for the specified entity.
getMetamodelClassFor
java
hibernate/hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
https://github.com/hibernate/hibernate-orm/blob/master/tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
Apache-2.0