boolean hasDenormalizedTable() { return hasParents() && InheritanceType.TABLE_PER_CLASS.equals( getType() ); }
boolean hasTable() { return !hasParents() || !InheritanceType.SINGLE_TABLE.equals( getType() ); }
); state.setHasParents( superEntityState != null ); final boolean nonDefault = state.getType() != null && !InheritanceType.SINGLE_TABLE .equals( state.getType() ); if ( superclassState.getType() != null ) { final boolean mixingStrategy = state.getType() != null && !state.getType() .equals( superclassState.getType() ); if ( nonDefault && mixingStrategy ) { LOG.invalidSubStrategy( clazz.getName() ); state.setType( superclassState.getType() );
private static PersistentClass makePersistentClass( InheritanceState inheritanceState, PersistentClass superEntity, MetadataBuildingContext metadataBuildingContext) { //we now know what kind of persistent entity it is if ( !inheritanceState.hasParents() ) { return new RootClass( metadataBuildingContext ); } else if ( InheritanceType.SINGLE_TABLE.equals( inheritanceState.getType() ) ) { return new SingleTableSubclass( superEntity, metadataBuildingContext ); } else if ( InheritanceType.JOINED.equals( inheritanceState.getType() ) ) { return new JoinedSubclass( superEntity, metadataBuildingContext ); } else if ( InheritanceType.TABLE_PER_CLASS.equals( inheritanceState.getType() ) ) { return new UnionSubclass( superEntity, metadataBuildingContext ); } else { throw new AssertionFailure( "Unknown inheritance type: " + inheritanceState.getType() ); } }
Ejb3JoinColumn[] inheritanceJoinedColumns = null; final boolean hasJoinedColumns = inheritanceState.hasParents() && InheritanceType.JOINED.equals( inheritanceState.getType() ); if ( hasJoinedColumns ) {
PersistentClass targetPropertyPersistentClass = InheritanceType.JOINED.equals( inheritanceState.getType() ) ? mapProperty.getPersistentClass() : associatedClass;
boolean hasDenormalizedTable() { return hasParents() && InheritanceType.TABLE_PER_CLASS.equals( getType() ); }
boolean hasTable() { return !hasParents() || !InheritanceType.SINGLE_TABLE.equals( getType() ); }
); state.setHasParents( superEntityState != null ); final boolean nonDefault = state.getType() != null && !InheritanceType.SINGLE_TABLE .equals( state.getType() ); if ( superclassState.getType() != null ) { final boolean mixingStrategy = state.getType() != null && !state.getType() .equals( superclassState.getType() ); if ( nonDefault && mixingStrategy ) { log.warn( ); state.setType( superclassState.getType() );
private static PersistentClass makePersistentClass(InheritanceState inheritanceState, PersistentClass superEntity) { //we now know what kind of persistent entity it is PersistentClass persistentClass; //create persistent class if ( !inheritanceState.hasParents() ) { persistentClass = new RootClass(); } else if ( InheritanceType.SINGLE_TABLE.equals( inheritanceState.getType() ) ) { persistentClass = new SingleTableSubclass( superEntity ); } else if ( InheritanceType.JOINED.equals( inheritanceState.getType() ) ) { persistentClass = new JoinedSubclass( superEntity ); } else if ( InheritanceType.TABLE_PER_CLASS.equals( inheritanceState.getType() ) ) { persistentClass = new UnionSubclass( superEntity ); } else { throw new AssertionFailure( "Unknown inheritance type: " + inheritanceState.getType() ); } return persistentClass; }
if ( InheritanceType.SINGLE_TABLE.equals( inheritanceState.getType() ) ) { discriminatorColumn = processSingleTableDiscriminatorProperties( clazzToProcess, ); else if ( InheritanceType.JOINED.equals( inheritanceState.getType() ) ) { discriminatorColumn = processJoinedDiscriminatorProperties( clazzToProcess, if ( inheritanceState.getType() == InheritanceType.SINGLE_TABLE ) { final boolean hasSubclasses = inheritanceState.hasSiblings(); if ( InheritanceType.JOINED.equals( inheritanceState.getType() ) ) { if ( inheritanceState.hasParents() ) { onDeleteAppropriate = true; else if ( InheritanceType.SINGLE_TABLE.equals( inheritanceState.getType() ) ) { if ( isInheritanceRoot ) { if ( hasSubclasses || !discriminatorColumn.isImplicit() ) { inheritanceState.postProcess( persistentClass, entityBinder ); final boolean subclassAndSingleTableStrategy = inheritanceState.getType() == InheritanceType.SINGLE_TABLE && inheritanceState.hasParents(); Set<String> idPropertiesIfIdClass = new HashSet<>();
private static Ejb3JoinColumn[] makeInheritanceJoinColumns(XClass clazzToProcess, ExtendedMappings mappings, InheritanceState inheritanceState, PersistentClass superEntity) { Ejb3JoinColumn[] inheritanceJoinedColumns = null; final boolean hasJoinedColumns = inheritanceState.hasParents() && InheritanceType.JOINED.equals( inheritanceState.getType() ); if ( hasJoinedColumns ) {
boolean hasDenormalizedTable() { return hasParents() && InheritanceType.TABLE_PER_CLASS.equals( getType() ); }
boolean hasTable() { return !hasParents() || !InheritanceType.SINGLE_TABLE.equals( getType() ); }
boolean hasTable() { return !hasParents() || !InheritanceType.SINGLE_TABLE.equals( getType() ); }
boolean hasDenormalizedTable() { return hasParents() && InheritanceType.TABLE_PER_CLASS.equals( getType() ); }
boolean hasTable() { return !hasParents() || !InheritanceType.SINGLE_TABLE.equals( getType() ); }
boolean hasDenormalizedTable() { return hasParents() && InheritanceType.TABLE_PER_CLASS.equals( getType() ); }
Ejb3DiscriminatorColumn discriminatorColumn = null; String discrimValue = null; if ( InheritanceType.SINGLE_TABLE.equals( inheritanceState.getType() ) ) { javax.persistence.DiscriminatorColumn discAnn = clazzToProcess.getAnnotation( javax.persistence.DiscriminatorColumn.class if ( InheritanceType.JOINED.equals( inheritanceState.getType() ) && inheritanceState.hasParents() ) { onDeleteAppropriate = true; final JoinedSubclass jsc = ( JoinedSubclass ) persistentClass; else if ( InheritanceType.SINGLE_TABLE.equals( inheritanceState.getType() ) ) { if ( inheritanceState.hasParents() ) { if ( persistentClass.getEntityPersisterClass() == null ) { else if ( InheritanceType.TABLE_PER_CLASS.equals( inheritanceState.getType() ) ) { if ( inheritanceState.hasParents() ) { if ( persistentClass.getEntityPersisterClass() == null ) { inheritanceState.postProcess( persistentClass, entityBinder ); final boolean subclassAndSingleTableStrategy = inheritanceState.getType() == InheritanceType.SINGLE_TABLE && inheritanceState.hasParents(); Set<String> idPropertiesIfIdClass = new HashSet<String>();
private static PersistentClass makePersistentClass( InheritanceState inheritanceState, PersistentClass superEntity, MetadataBuildingContext metadataBuildingContext) { //we now know what kind of persistent entity it is if ( !inheritanceState.hasParents() ) { return new RootClass( metadataBuildingContext ); } else if ( InheritanceType.SINGLE_TABLE.equals( inheritanceState.getType() ) ) { return new SingleTableSubclass( superEntity, metadataBuildingContext ); } else if ( InheritanceType.JOINED.equals( inheritanceState.getType() ) ) { return new JoinedSubclass( superEntity, metadataBuildingContext ); } else if ( InheritanceType.TABLE_PER_CLASS.equals( inheritanceState.getType() ) ) { return new UnionSubclass( superEntity, metadataBuildingContext ); } else { throw new AssertionFailure( "Unknown inheritance type: " + inheritanceState.getType() ); } }