simple code refact
This commit is contained in:
parent
cc2dab0f18
commit
67e8f311db
|
@ -157,19 +157,17 @@ public class Binder {
|
||||||
return makeRootEntityBinding( (RootEntitySource) entitySource );
|
return makeRootEntityBinding( (RootEntitySource) entitySource );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( currentInheritanceType == InheritanceType.SINGLE_TABLE ) {
|
switch ( currentInheritanceType ){
|
||||||
return makeDiscriminatedSubclassBinding( (SubclassEntitySource) entitySource, superEntityBinding );
|
case SINGLE_TABLE:
|
||||||
}
|
return makeDiscriminatedSubclassBinding( (SubclassEntitySource) entitySource, superEntityBinding );
|
||||||
else if ( currentInheritanceType == InheritanceType.JOINED ) {
|
case JOINED:
|
||||||
return makeJoinedSubclassBinding( (SubclassEntitySource) entitySource, superEntityBinding );
|
return makeJoinedSubclassBinding( (SubclassEntitySource) entitySource, superEntityBinding );
|
||||||
}
|
case TABLE_PER_CLASS:
|
||||||
else if ( currentInheritanceType == InheritanceType.TABLE_PER_CLASS ) {
|
return makeUnionedSubclassBinding( (SubclassEntitySource) entitySource, superEntityBinding );
|
||||||
return makeUnionedSubclassBinding( (SubclassEntitySource) entitySource, superEntityBinding );
|
default:
|
||||||
}
|
// extreme internal error!
|
||||||
else {
|
throw new AssertionFailure( "Internal condition failure" );
|
||||||
// extreme internal error!
|
}
|
||||||
throw new AssertionFailure( "Internal condition failure" );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue