Package org.hibernate.metamodel.binding

Examples of org.hibernate.metamodel.binding.BagBinding


      final Element subElement = (Element) iter.next();
      final String subElementName = subElement.getName();
      final String propertyName = subElement.attributeValue( "name" );

      if ( "bag".equals( subElementName ) ) {
        BagBinding bagBinding = entityBinding.makeBagAttributeBinding( propertyName );
        bindCollection( subElement, bagBinding, entityBinding, PluralAttributeNature.BAG, propertyName );
        hibernateMappingBinder.getHibernateXmlBinder().getMetadata().addCollection( bagBinding );
        attributeBinding = bagBinding;
      }
      else if ( "idbag".equals( subElementName ) ) {
        BagBinding bagBinding = entityBinding.makeBagAttributeBinding( propertyName );
        bindCollection( subElement, bagBinding, entityBinding, PluralAttributeNature.BAG, propertyName );
        hibernateMappingBinder.getHibernateXmlBinder().getMetadata().addCollection( bagBinding );
        attributeBinding = bagBinding;
        // todo: handle identifier
      }
      else if ( "set".equals( subElementName ) ) {
        BagBinding bagBinding = entityBinding.makeBagAttributeBinding( propertyName );
        bindCollection( subElement, bagBinding, entityBinding, PluralAttributeNature.SET, propertyName );
        hibernateMappingBinder.getHibernateXmlBinder().getMetadata().addCollection( bagBinding );
        attributeBinding = bagBinding;
      }
      else if ( "list".equals( subElementName ) ) {
        BagBinding bagBinding = entityBinding.makeBagAttributeBinding( propertyName );
        bindCollection( subElement, bagBinding, entityBinding, PluralAttributeNature.LIST, propertyName );
        hibernateMappingBinder.getHibernateXmlBinder().getMetadata().addCollection( bagBinding );
        attributeBinding = bagBinding;
        // todo : handle list index
      }
      else if ( "map".equals( subElementName ) ) {
        BagBinding bagBinding = entityBinding.makeBagAttributeBinding( propertyName );
        bindCollection( subElement, bagBinding, entityBinding, PluralAttributeNature.MAP, propertyName );
        hibernateMappingBinder.getHibernateXmlBinder().getMetadata().addCollection( bagBinding );
        attributeBinding = bagBinding;
        // todo : handle map key
      }
View Full Code Here


    AttributeBinding attributeBinding = null;
    for ( Object attribute : entityClazz.getPropertyOrManyToOneOrOneToOne() ) {
      if ( XMLBagElement.class.isInstance( attribute ) ) {
        XMLBagElement collection = XMLBagElement.class.cast( attribute );
        BagBinding collectionBinding = makeBagAttributeBinding( collection, entityBinding );
        bindingContext.getMetadataImplementor().addCollection( collectionBinding );
        attributeBinding = collectionBinding;
      }
      else if ( XMLIdbagElement.class.isInstance( attribute ) ) {
        XMLIdbagElement collection = XMLIdbagElement.class.cast( attribute );
View Full Code Here

            bindingContext,
            entityBinding.getMetaAttributeContext(),
            collection
        );

    BagBinding collectionBinding = entityBinding.makeBagAttributeBinding(
        bindingState.getAttributeName(),
        getCollectionElementType( collection )
    )
        .initialize( bindingState );
View Full Code Here

    AttributeBinding attributeBinding = null;
    for ( Object attribute : entityClazz.getPropertyOrManyToOneOrOneToOne() ) {
      if ( XMLBagElement.class.isInstance( attribute ) ) {
        XMLBagElement collection = XMLBagElement.class.cast( attribute );
        BagBinding collectionBinding = makeBagAttributeBinding( collection, entityBinding );
        bindingContext.getMetadataImplementor().addCollection( collectionBinding );
        attributeBinding = collectionBinding;
      }
      else if ( XMLIdbagElement.class.isInstance( attribute ) ) {
        XMLIdbagElement collection = XMLIdbagElement.class.cast( attribute );
View Full Code Here

            bindingContext,
            entityBinding.getMetaAttributeContext(),
            collection
        );

    BagBinding collectionBinding = entityBinding.makeBagAttributeBinding(
        bindingState.getAttributeName(),
        getCollectionElementType( collection ) )
        .initialize( bindingState );

      // todo : relational model binding
View Full Code Here

    AttributeBinding attributeBinding = null;
    for ( Object attribute : entityClazz.getPropertyOrManyToOneOrOneToOne() ) {
      if ( XMLBagElement.class.isInstance( attribute ) ) {
        XMLBagElement collection = XMLBagElement.class.cast( attribute );
        BagBinding collectionBinding = entityBinding.makeBagAttributeBinding( collection.getName() );
        bindBag( collection, collectionBinding, entityBinding );
        hibernateMappingBinder.getHibernateXmlBinder().getMetadata().addCollection( collectionBinding );
        attributeBinding = collectionBinding;
      }
      else if ( XMLIdbagElement.class.isInstance( attribute ) ) {
View Full Code Here

    AttributeBinding attributeBinding = null;
    for ( Object attribute : entityClazz.getPropertyOrManyToOneOrOneToOne() ) {
      if ( XMLBagElement.class.isInstance( attribute ) ) {
        XMLBagElement collection = XMLBagElement.class.cast( attribute );
        BagBinding collectionBinding = makeBagAttributeBinding( collection, entityBinding );
        bindingContext.getMetadataImplementor().addCollection( collectionBinding );
        attributeBinding = collectionBinding;
      }
      else if ( XMLIdbagElement.class.isInstance( attribute ) ) {
        XMLIdbagElement collection = XMLIdbagElement.class.cast( attribute );
View Full Code Here

            bindingContext,
            entityBinding.getMetaAttributeContext(),
            collection
        );

    BagBinding collectionBinding = entityBinding.makeBagAttributeBinding(
        bindingState.getAttributeName(),
        getCollectionElementType( collection ) )
        .initialize( bindingState );

      // todo : relational model binding
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.binding.BagBinding

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.