Just correcting some formatting issues

This commit is contained in:
John Verhaeg 2012-03-02 10:41:17 -06:00
parent 8f010234db
commit 8fcf6a171e
1 changed files with 260 additions and 253 deletions

View File

@ -212,7 +212,6 @@ public class Binder {
final AttributeBindingContainer attributeBindingContainer, final AttributeBindingContainer attributeBindingContainer,
final SingularAttributeSource attributeSource, final SingularAttributeSource attributeSource,
SingularAttribute attribute ) { SingularAttribute attribute ) {
if ( attribute == null ) { if ( attribute == null ) {
attribute = createSingularAttribute( attributeBindingContainer, attributeSource ); attribute = createSingularAttribute( attributeBindingContainer, attributeSource );
} }
@ -243,7 +242,6 @@ public class Binder {
} }
private void bindBasicElementSetTablePrimaryKey( final SetBinding attributeBinding ) { private void bindBasicElementSetTablePrimaryKey( final SetBinding attributeBinding ) {
final PrimaryKey primaryKey = attributeBinding.getCollectionTable().getPrimaryKey(); final PrimaryKey primaryKey = attributeBinding.getCollectionTable().getPrimaryKey();
final ForeignKey foreignKey = attributeBinding.getPluralAttributeKeyBinding().getForeignKey(); final ForeignKey foreignKey = attributeBinding.getPluralAttributeKeyBinding().getForeignKey();
final BasicPluralAttributeElementBinding elementBinding = final BasicPluralAttributeElementBinding elementBinding =
@ -457,9 +455,15 @@ public class Binder {
Composite composite; Composite composite;
if ( attribute == null ) { if ( attribute == null ) {
composite = composite =
new Composite( attributeSource.getPath(), attributeSource.getClassName(), attributeSource.getClassReference(), null ); new Composite(
attributeSource.getPath(),
attributeSource.getClassName(),
attributeSource.getClassReference(),
null );
attribute = attribute =
attributeBindingContainer.getAttributeContainer().createCompositeAttribute( attributeSource.getName(), composite ); attributeBindingContainer.getAttributeContainer().createCompositeAttribute(
attributeSource.getName(),
composite );
} else { } else {
composite = ( Composite ) attribute.getSingularAttributeType(); composite = ( Composite ) attribute.getSingularAttributeType();
} }
@ -590,7 +594,9 @@ public class Binder {
if ( typeName == null ) { if ( typeName == null ) {
// Obtain Java type name from attribute // Obtain Java type name from attribute
final Class< ? > attributeJavaType = final Class< ? > attributeJavaType =
ReflectHelper.reflectedPropertyClass( attribute.getAttributeContainer().getClassReference(), attribute.getName() ); ReflectHelper.reflectedPropertyClass(
attribute.getAttributeContainer().getClassReference(),
attribute.getName() );
typeName = attributeJavaType.getName(); typeName = attributeJavaType.getName();
hibernateTypeDescriptor.setJavaTypeName( typeName ); hibernateTypeDescriptor.setJavaTypeName( typeName );
} else { } else {
@ -958,8 +964,9 @@ public class Binder {
final InheritanceType inheritanceType = inheritanceTypes.peek(); final InheritanceType inheritanceType = inheritanceTypes.peek();
final EntityMode entityMode = entityModes.peek(); final EntityMode entityMode = entityModes.peek();
final EntityBinding entityBinding = final EntityBinding entityBinding =
entitySource instanceof RootEntitySource ? new EntityBinding( inheritanceType, entityMode ) : new EntityBinding( entitySource instanceof RootEntitySource
superEntityBinding ); ? new EntityBinding( inheritanceType, entityMode )
: new EntityBinding( superEntityBinding );
// Create domain entity // Create domain entity
final String entityClassName = entityMode == EntityMode.POJO ? entitySource.getClassName() : null; final String entityClassName = entityMode == EntityMode.POJO ? entitySource.getClassName() : null;
entityBinding.setEntity( new Entity( entityBinding.setEntity( new Entity(
@ -1138,9 +1145,9 @@ public class Binder {
: null; : null;
// Create entity binding // Create entity binding
entityBinding = entityBinding =
superEntityBinding == null ? bindEntities( entityHierarchiesByRootEntitySource.get( entitySource ) ) : bindEntity( superEntityBinding == null
entitySource, ? bindEntities( entityHierarchiesByRootEntitySource.get( entitySource ) )
superEntityBinding ); : bindEntity( entitySource, superEntityBinding );
} }
return entityBinding; return entityBinding;
} }