Package org.hibernate.metamodel.source.annotations.attribute

Examples of org.hibernate.metamodel.source.annotations.attribute.MappedAttribute


  public Map<String, EmbeddableClass> getEmbeddedClasses() {
    return embeddedClasses;
  }

  public MappedAttribute getMappedAttribute(String propertyName) {
    MappedAttribute attribute;
    attribute = simpleAttributeMap.get( propertyName );
    if ( attribute == null ) {
      attribute = associationAttributeMap.get( propertyName );
    }
    if ( attribute == null ) {
View Full Code Here


    AnnotationInstance idAnnotation = JandexHelper.getSingleAnnotation(
        entityClass.getClassInfo(), JPADotNames.EMBEDDED_ID
    );

    String idName = JandexHelper.getPropertyName( idAnnotation.target() );
    MappedAttribute idAttribute = entityClass.getMappedAttribute( idName );
    if ( !( idAttribute instanceof SimpleAttribute ) ) {
      throw new AssertionFailure( "Unexpected attribute type for id attribute" );
    }

    SingularAttribute attribute = entityBinding.getEntity().getOrCreateComponentAttribute( idName );
View Full Code Here

          )
      );
    }

    // 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

  public Map<String, EmbeddableClass> getEmbeddedClasses() {
    return embeddedClasses;
  }

  public MappedAttribute getMappedAttribute(String propertyName) {
    MappedAttribute attribute;
    attribute = simpleAttributeMap.get( propertyName );
    if ( attribute == null ) {
      attribute = associationAttributeMap.get( propertyName );
    }
    if ( attribute == null ) {
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.source.annotations.attribute.MappedAttribute

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.