Examples of AttributeBinding


Examples of org.hibernate.metamodel.binding.AttributeBinding

  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

Examples of org.hibernate.metamodel.binding.AttributeBinding

    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

Examples of org.hibernate.metamodel.binding.AttributeBinding

    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

Examples of org.hibernate.metamodel.binding.AttributeBinding

  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

Examples of org.hibernate.metamodel.binding.AttributeBinding

    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

Examples of org.hibernate.metamodel.binding.AttributeBinding

  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

Examples of org.hibernate.metamodel.binding.AttributeBinding

    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

Examples of org.jboss.xb.binding.metadata.unmarshalling.AttributeBinding

         return stack;
      }

      public AttributeBinding getAttribute(QName attributeName)
      {
         AttributeBinding attr = (AttributeBinding)attributes.get(attributeName);
         if(attr == null)
         {
            for(int i = delegates.size() - 1; i >= 0; --i)
            {
               AbstractBasicElementBinding basic = (AbstractBasicElementBinding)delegates.get(i);
View Full Code Here

Examples of org.jboss.xb.binding.metadata.unmarshalling.AttributeBinding

                                         String attributeName,
                                         String fieldName,
                                         Class javaType)
   {
      BasicElementBindingStack stack = (BasicElementBindingStack)parent;
      AttributeBinding attr = new AttributeBindingImpl(new QName(namespaceUri, attributeName),
         javaType,
         parent.getJavaType(),
         fieldName
      );
      stack.bindAttribute(attr);
View Full Code Here

Examples of org.jboss.xb.binding.metadata.unmarshalling.AttributeBinding

         if(attrs != null && attrs.getLength() > 0)
         {
            for(int i = 0; i < attrs.getLength(); ++i)
            {
               QName attrName = new QName(attrs.getURI(i), attrs.getLocalName(i));
               AttributeBinding attrBinding = metadata.getAttribute(attrName);
               if(attrBinding != null)
               {
                  Object unmarshalledValue = SimpleTypeBindings.unmarshal(attrs.getValue(i),
                     attrBinding.getJavaType()
                  );

                  if(child instanceof Immutable)
                  {
                     ((Immutable)child).addChild(attrName.getLocalPart(), unmarshalledValue);
                  }
                  else
                  {
                     setFieldValue(attrBinding.getAttributeName(),
                        attrBinding.getField(),
                        attrBinding.getSetter(),
                        child,
                        unmarshalledValue
                     );
                  }
               }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.