Package org.hibernate.metamodel.source.hbm.state.binding

Examples of org.hibernate.metamodel.source.hbm.state.binding.HbmManyToOneAttributeBindingState


  }

  private ManyToOneAttributeBinding makeManyToOneAttributeBinding(XMLManyToOneElement manyToOne,
                                  EntityBinding entityBinding) {
    ManyToOneAttributeBindingState bindingState =
        new HbmManyToOneAttributeBindingState(
            entityBinding.getEntity().getJavaType().getName(),
            bindingContext,
            entityBinding.getMetaAttributeContext(),
            manyToOne
        );

    // boolean (true here) indicates that by default column names should be guessed
    ManyToOneRelationalState relationalState =
        new HbmManyToOneRelationalStateContainer(
            bindingContext,
            true,
            manyToOne
        );

    entityBinding.getEntity().getOrCreateSingularAttribute( bindingState.getAttributeName() );
    ManyToOneAttributeBinding manyToOneAttributeBinding =
        entityBinding.makeManyToOneAttributeBinding( bindingState.getAttributeName() )
            .initialize( bindingState )
            .initialize( relationalState );

    return manyToOneAttributeBinding;
  }
View Full Code Here


  }

  private ManyToOneAttributeBinding makeManyToOneAttributeBinding(XMLManyToOneElement manyToOne,
                 EntityBinding entityBinding) {
    ManyToOneAttributeBindingState bindingState =
        new HbmManyToOneAttributeBindingState(
            entityBinding.getEntity().getJavaType().getName(),
            bindingContext,
            entityBinding.getMetaAttributeContext(),
            manyToOne
        );

    // boolean (true here) indicates that by default column names should be guessed
    ManyToOneRelationalState relationalState =
            new HbmManyToOneRelationalStateContainer(
                bindingContext,
                true,
                manyToOne
            );

      entityBinding.getEntity().getOrCreateSingularAttribute( bindingState.getAttributeName() );
    ManyToOneAttributeBinding manyToOneAttributeBinding =
        entityBinding.makeManyToOneAttributeBinding( bindingState.getAttributeName() )
            .initialize( bindingState )
            .initialize( relationalState );

    return manyToOneAttributeBinding;
  }
View Full Code Here

  }

  private ManyToOneAttributeBinding makeManyToOneAttributeBinding(XMLManyToOneElement manyToOne,
                 EntityBinding entityBinding) {
    ManyToOneAttributeBindingState bindingState =
        new HbmManyToOneAttributeBindingState(
            entityBinding.getEntity().getPojoEntitySpecifics().getClassName(),
            bindingContext,
            entityBinding.getMetaAttributeContext(),
            manyToOne
        );

    // boolean (true here) indicates that by default column names should be guessed
    ManyToOneRelationalState relationalState =
            new HbmManyToOneRelationalStateContainer(
                bindingContext,
                true,
                manyToOne
            );

      entityBinding.getEntity().getOrCreateSingularAttribute( bindingState.getAttributeName() );
    ManyToOneAttributeBinding manyToOneAttributeBinding =
        entityBinding.makeManyToOneAttributeBinding( bindingState.getAttributeName() )
            .initialize( bindingState )
            .initialize( relationalState );

    return manyToOneAttributeBinding;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.source.hbm.state.binding.HbmManyToOneAttributeBindingState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.