Package org.hibernate.metamodel.domain

Examples of org.hibernate.metamodel.domain.Attribute


      );
    }

    // now that we have the id attribute we can create the attribute and binding
    MappedAttribute idAttribute = iter.next();
    Attribute attribute = container.getOrCreateSingularAttribute( idAttribute.getName() );

    SimpleAttributeBinding attributeBinding = entityBinding.makeSimpleIdAttributeBinding( attribute );
    attributeBinding.initialize( new AttributeBindingStateImpl( (SimpleAttribute) idAttribute ) );
    attributeBinding.initialize( new ColumnRelationalStateImpl( (SimpleAttribute) idAttribute, meta ) );
    bindSingleIdGeneratedValue( entityBinding, idAttribute.getName() );
View Full Code Here


  private void bindSingleMappedAttribute(EntityBinding entityBinding, AttributeContainer container, SimpleAttribute simpleAttribute) {
    if ( simpleAttribute.isId() ) {
      return;
    }

    Attribute attribute = container.getOrCreateSingularAttribute( simpleAttribute.getName() );
    SimpleAttributeBinding attributeBinding;

    if ( simpleAttribute.isDiscriminator() ) {
      EntityDiscriminator entityDiscriminator = entityBinding.makeEntityDiscriminator( attribute );
      DiscriminatorBindingState bindingState = new DiscriminatorBindingStateImpl( simpleAttribute );
View Full Code Here

                true,
                property
            )
        );

    Attribute attribute = entityBinding.getEntity().getOrCreateSingularAttribute( bindingState.getAttributeName() );
    return entityBinding.makeSimpleAttributeBinding( attribute )
        .initialize( bindingState )
        .initialize( relationalState );
  }
View Full Code Here

    );
    if ( relationalStateContainer.getRelationalStates().size() > 1 ) {
      throw new MappingException( "ID is expected to be a single column, but has more than 1 value" );
    }

    Attribute attribute = entityBinding.getEntity().getOrCreateSingularAttribute( bindingState.getAttributeName() );
    entityBinding.makeSimpleIdAttributeBinding( attribute )
        .initialize( bindingState )
        .initialize( relationalStateContainer.getRelationalStates().get( 0 ) );

    // if ( propertyName == null || entity.getPojoRepresentation() == null ) {
View Full Code Here

            xmlEntityClazz.getDiscriminator()
        )
    );


    Attribute attribute = entityBinding.getEntity().getOrCreateSingularAttribute( bindingState.getAttributeName() );
    entityBinding.makeEntityDiscriminator( attribute )
        .initialize( bindingState )
        .initialize( relationalState );
  }
View Full Code Here

                true,
                version
            )
        );

    Attribute attribute = entityBinding.getEntity().getOrCreateSingularAttribute( bindingState.getAttributeName() );
    entityBinding.makeVersionBinding( attribute )
        .initialize( bindingState )
        .initialize( relationalState );
  }
View Full Code Here

                true,
                timestamp
            )
        );

    Attribute attribute = entityBinding.getEntity().getOrCreateSingularAttribute( bindingState.getAttributeName() );
    entityBinding.makeVersionBinding( attribute )
        .initialize( bindingState )
        .initialize( relationalState );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.domain.Attribute

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.