private static boolean isEntityClassType(XClass clazzToProcess, AnnotatedClassType classType) { if ( AnnotatedClassType.EMBEDDABLE_SUPERCLASS.equals( classType ) //will be processed by their subentities || AnnotatedClassType.NONE.equals( classType ) //to be ignored || AnnotatedClassType.EMBEDDABLE.equals( classType ) //allow embeddable element declaration ) { if ( AnnotatedClassType.NONE.equals( classType ) && clazzToProcess.isAnnotationPresent( org.hibernate.annotations.Entity.class ) ) { LOG.missingEntityAnnotation( clazzToProcess.getName() ); } return false; } if ( !classType.equals( AnnotatedClassType.ENTITY ) ) { throw new AnnotationException( "Annotated class should have a @javax.persistence.Entity, @javax.persistence.Embeddable or @javax.persistence.EmbeddedSuperclass annotation: " + clazzToProcess .getName() ); } return true; }
private static void bindFilters( XClass annotatedClass, EntityBinder entityBinder, MetadataBuildingContext context) { bindFilters( annotatedClass, entityBinder ); XClass classToProcess = annotatedClass.getSuperclass(); while ( classToProcess != null ) { AnnotatedClassType classType = context.getMetadataCollector().getClassType( classToProcess ); if ( AnnotatedClassType.EMBEDDABLE_SUPERCLASS.equals( classType ) ) { bindFilters( classToProcess, entityBinder ); } else { break; } classToProcess = classToProcess.getSuperclass(); } }
private static boolean isEntityClassType(XClass clazzToProcess, AnnotatedClassType classType) { if ( AnnotatedClassType.EMBEDDABLE_SUPERCLASS.equals( classType ) //will be processed by their subentities || AnnotatedClassType.NONE.equals( classType ) //to be ignored || AnnotatedClassType.EMBEDDABLE.equals( classType ) //allow embeddable element declaration ) { if ( AnnotatedClassType.NONE.equals( classType ) && clazzToProcess.isAnnotationPresent( org.hibernate.annotations.Entity.class ) ) { log.warn( "Class annotated @org.hibernate.annotations.Entity but not javax.persistence.Entity " + "(most likely a user error): {}", clazzToProcess.getName() ); } return false; } if ( !classType.equals( AnnotatedClassType.ENTITY ) ) { throw new AnnotationException( "Annotated class should have a @javax.persistence.Entity, @javax.persistence.Embeddable or @javax.persistence.EmbeddedSuperclass annotation: " + clazzToProcess .getName() ); } return true; }
if ( AnnotatedClassType.EMBEDDABLE.equals( classType ) ) { EntityBinder entityBinder = new EntityBinder();
private static void bindFilters(XClass annotatedClass, EntityBinder entityBinder, ExtendedMappings mappings) { bindFilters( annotatedClass, entityBinder ); XClass classToProcess = annotatedClass.getSuperclass(); while ( classToProcess != null ) { AnnotatedClassType classType = mappings.getClassType( classToProcess ); if ( AnnotatedClassType.EMBEDDABLE_SUPERCLASS.equals( classType ) ) { bindFilters( classToProcess, entityBinder ); } classToProcess = classToProcess.getSuperclass(); } }
if ( AnnotatedClassType.EMBEDDABLE.equals( classType ) ) { holder.prepare( property );
if ( AnnotatedClassType.EMBEDDABLE_SUPERCLASS.equals( classType ) ) { bindQueries( clazzToProcess, context ); bindTypeDefs( clazzToProcess, context );
private static boolean isEntityClassType(XClass clazzToProcess, AnnotatedClassType classType) { if ( AnnotatedClassType.EMBEDDABLE_SUPERCLASS.equals( classType ) //will be processed by their subentities || AnnotatedClassType.NONE.equals( classType ) //to be ignored || AnnotatedClassType.EMBEDDABLE.equals( classType ) //allow embeddable element declaration ) { if ( AnnotatedClassType.NONE.equals( classType ) && clazzToProcess.isAnnotationPresent( org.hibernate.annotations.Entity.class ) ) { LOG.missingEntityAnnotation( clazzToProcess.getName() ); } return false; } if ( !classType.equals( AnnotatedClassType.ENTITY ) ) { throw new AnnotationException( "Annotated class should have a @javax.persistence.Entity, @javax.persistence.Embeddable or @javax.persistence.EmbeddedSuperclass annotation: " + clazzToProcess .getName() ); } return true; }
private static boolean isEntityClassType(XClass clazzToProcess, AnnotatedClassType classType) { if ( AnnotatedClassType.EMBEDDABLE_SUPERCLASS.equals( classType ) //will be processed by their subentities || AnnotatedClassType.NONE.equals( classType ) //to be ignored || AnnotatedClassType.EMBEDDABLE.equals( classType ) //allow embeddable element declaration ) { if ( AnnotatedClassType.NONE.equals( classType ) && clazzToProcess.isAnnotationPresent( org.hibernate.annotations.Entity.class ) ) { LOG.missingEntityAnnotation( clazzToProcess.getName() ); } return false; } if ( !classType.equals( AnnotatedClassType.ENTITY ) ) { throw new AnnotationException( "Annotated class should have a @javax.persistence.Entity, @javax.persistence.Embeddable or @javax.persistence.EmbeddedSuperclass annotation: " + clazzToProcess .getName() ); } return true; }
private static boolean isEntityClassType(XClass clazzToProcess, AnnotatedClassType classType) { if ( AnnotatedClassType.EMBEDDABLE_SUPERCLASS.equals( classType ) //will be processed by their subentities || AnnotatedClassType.NONE.equals( classType ) //to be ignored || AnnotatedClassType.EMBEDDABLE.equals( classType ) //allow embeddable element declaration ) { if ( AnnotatedClassType.NONE.equals( classType ) && clazzToProcess.isAnnotationPresent( org.hibernate.annotations.Entity.class ) ) { LOG.missingEntityAnnotation( clazzToProcess.getName() ); } return false; } if ( !classType.equals( AnnotatedClassType.ENTITY ) ) { throw new AnnotationException( "Annotated class should have a @javax.persistence.Entity, @javax.persistence.Embeddable or @javax.persistence.EmbeddedSuperclass annotation: " + clazzToProcess .getName() ); } return true; }
if ( AnnotatedClassType.EMBEDDABLE.equals( classType ) ) { EntityBinder entityBinder = new EntityBinder(); PersistentClass owner = collValue.getOwner();
if ( AnnotatedClassType.EMBEDDABLE.equals( classType ) ) { EntityBinder entityBinder = new EntityBinder(); PersistentClass owner = mapValue.getOwner();
private static void bindFilters(XClass annotatedClass, EntityBinder entityBinder, Mappings mappings) { bindFilters( annotatedClass, entityBinder ); XClass classToProcess = annotatedClass.getSuperclass(); while ( classToProcess != null ) { AnnotatedClassType classType = mappings.getClassType( classToProcess ); if ( AnnotatedClassType.EMBEDDABLE_SUPERCLASS.equals( classType ) ) { bindFilters( classToProcess, entityBinder ); } classToProcess = classToProcess.getSuperclass(); } }
private static void bindFilters(XClass annotatedClass, EntityBinder entityBinder, Mappings mappings) { bindFilters( annotatedClass, entityBinder ); XClass classToProcess = annotatedClass.getSuperclass(); while ( classToProcess != null ) { AnnotatedClassType classType = mappings.getClassType( classToProcess ); if ( AnnotatedClassType.EMBEDDABLE_SUPERCLASS.equals( classType ) ) { bindFilters( classToProcess, entityBinder ); } classToProcess = classToProcess.getSuperclass(); } }
if ( AnnotatedClassType.EMBEDDABLE_SUPERCLASS.equals( classType ) ) { bindQueries( clazzToProcess, mappings ); bindTypeDefs( clazzToProcess, mappings );
private static void bindFilters( XClass annotatedClass, EntityBinder entityBinder, MetadataBuildingContext context) { bindFilters( annotatedClass, entityBinder ); XClass classToProcess = annotatedClass.getSuperclass(); while ( classToProcess != null ) { AnnotatedClassType classType = context.getMetadataCollector().getClassType( classToProcess ); if ( AnnotatedClassType.EMBEDDABLE_SUPERCLASS.equals( classType ) ) { bindFilters( classToProcess, entityBinder ); } else { break; } classToProcess = classToProcess.getSuperclass(); } }
if ( AnnotatedClassType.EMBEDDABLE.equals( classType ) ) { EntityBinder entityBinder = new EntityBinder(); PersistentClass owner = collValue.getOwner();
if ( AnnotatedClassType.EMBEDDABLE.equals( classType ) ) { EntityBinder entityBinder = new EntityBinder(); PersistentClass owner = mapValue.getOwner();
if ( AnnotatedClassType.EMBEDDABLE_SUPERCLASS.equals( classType ) ) { bindQueries( clazzToProcess, mappings ); bindTypeDefs( clazzToProcess, mappings );