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