Package org.hibernate.metamodel.binding

Examples of org.hibernate.metamodel.binding.AttributeBinding$SimpleTupleRelationalState


    final boolean naturalId = uniqueKey != null;

    final String entiytName = entityBinding.getEntity().getName();
    final TableSpecification tabe = entityBinding.getBaseTable();

    AttributeBinding attributeBinding = null;

    Iterator iter = entityElement.elementIterator();
    while ( iter.hasNext() ) {
      final Element subElement = (Element) iter.next();
      final String subElementName = subElement.getName();
View Full Code Here


  public String getIdentifierPropertyName(String entityName) throws MappingException {
    EntityBinding entityBinding = getEntityBinding( entityName );
    if ( entityBinding == null ) {
      throw new MappingException( "Entity binding not known: " + entityName );
    }
    AttributeBinding idBinding = entityBinding.getEntityIdentifier().getValueBinding();
    return idBinding == null ? null : idBinding.getAttribute().getName();
  }
View Full Code Here

    EntityBinding entityBinding = getEntityBinding( entityName );
    if ( entityBinding == null ) {
      throw new MappingException( "Entity binding not known: " + entityName );
    }
    // TODO: should this call EntityBinding.getReferencedAttributeBindingString), which does not exist yet?
    AttributeBinding attributeBinding = entityBinding.getAttributeBinding( propertyName );
    if ( attributeBinding == null ) {
      throw new MappingException( "unknown property: " + entityName + '.' + propertyName );
    }
    return attributeBinding.getHibernateTypeDescriptor().getExplicitType();
  }
View Full Code Here

    final boolean naturalId = uniqueKey != null;

    final String entiytName = entityBinding.getEntity().getName();
    final TableSpecification tabe = entityBinding.getBaseTable();

    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 );
View Full Code Here

    if ( entityBinding == null ) {
      throw new org.hibernate.MappingException(
          "Attribute [" + attributeBinding.getAttribute().getName() +
          "] refers to unknown entity: [" + attributeBinding.getReferencedEntityName() + "]" );
    }
    AttributeBinding referencedAttributeBinding =
        attributeBinding.isPropertyReference() ?
            entityBinding.getAttributeBinding( attributeBinding.getReferencedAttributeName() ) :
            entityBinding.getEntityIdentifier().getValueBinding();
    if ( referencedAttributeBinding == null ) {
      // TODO: does attribute name include path w/ entity name?
      throw new MappingException(
          "Attribute [" + attributeBinding.getAttribute().getName() +
          "] refers to unknown attribute: [" + attributeBinding.getReferencedEntityName() + "]"
      );
    }
    attributeBinding.resolveReference( referencedAttributeBinding );
    referencedAttributeBinding.addEntityReferencingAttributeBinding( attributeBinding );
  }
View Full Code Here

  public String getIdentifierPropertyName(String entityName) throws MappingException {
    EntityBinding entityBinding = getEntityBinding( entityName );
    if ( entityBinding == null ) {
      throw new MappingException( "Entity binding not known: " + entityName );
    }
    AttributeBinding idBinding = entityBinding.getEntityIdentifier().getValueBinding();
    return idBinding == null ? null : idBinding.getAttribute().getName();
  }
View Full Code Here

    EntityBinding entityBinding = getEntityBinding( entityName );
    if ( entityBinding == null ) {
      throw new MappingException( "Entity binding not known: " + entityName );
    }
    // TODO: should this call EntityBinding.getReferencedAttributeBindingString), which does not exist yet?
    AttributeBinding attributeBinding = entityBinding.getAttributeBinding( propertyName );
    if ( attributeBinding == null ) {
      throw new MappingException( "unknown property: " + entityName + '.' + propertyName );
    }
    return attributeBinding.getHibernateTypeDescriptor().getResolvedTypeMapping();
  }
View Full Code Here

  public String getIdentifierPropertyName(String entityName) throws MappingException {
    EntityBinding entityBinding = getEntityBinding( entityName );
    if ( entityBinding == null ) {
      throw new MappingException( "Entity binding not known: " + entityName );
    }
    AttributeBinding idBinding = entityBinding.getHierarchyDetails().getEntityIdentifier().getValueBinding();
    return idBinding == null ? null : idBinding.getAttribute().getName();
  }
View Full Code Here

    EntityBinding entityBinding = getEntityBinding( entityName );
    if ( entityBinding == null ) {
      throw new MappingException( "Entity binding not known: " + entityName );
    }
    // TODO: should this call EntityBinding.getReferencedAttributeBindingString), which does not exist yet?
    AttributeBinding attributeBinding = entityBinding.locateAttributeBinding( propertyName );
    if ( attributeBinding == null ) {
      throw new MappingException( "unknown property: " + entityName + '.' + propertyName );
    }
    return attributeBinding.getHibernateTypeDescriptor().getResolvedTypeMapping();
  }
View Full Code Here

  public String getIdentifierPropertyName(String entityName) throws MappingException {
    EntityBinding entityBinding = getEntityBinding( entityName );
    if ( entityBinding == null ) {
      throw new MappingException( "Entity binding not known: " + entityName );
    }
    AttributeBinding idBinding = entityBinding.getHierarchyDetails().getEntityIdentifier().getValueBinding();
    return idBinding == null ? null : idBinding.getAttribute().getName();
  }
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.binding.AttributeBinding$SimpleTupleRelationalState

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.