Package org.hibernate.cfg

Examples of org.hibernate.cfg.PropertyPreloadedData


      //if an xToMany, it as to be wrapped today.
      //FIXME this pose a problem as the PK is the class instead of the associated class which is not really compliant with the spec
      if ( isXToMany || entityBinder.wrapIdsInEmbeddedComponents() ) {
        Component identifier = (Component) rootClass.getIdentifier();
        if (identifier == null) {
          identifier = AnnotationBinder.createComponent( holder, new PropertyPreloadedData(null, null, null), true, false, mappings );
          rootClass.setIdentifier( identifier );
          identifier.setNullValue( "undefined" );
          rootClass.setEmbeddedIdentifier( true );
          rootClass.setIdentifierMapper( identifier );
        }
View Full Code Here


        PropertyData inferredData;
        if ( isMap() ) {
          //"value" is the JPA 2 prefix for map values (used to be "element")
          if ( isHibernateExtensionMapping() ) {
            inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "element", elementClass );
          }
          else {
            inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "value", elementClass );
          }
        }
        else {
          if ( isHibernateExtensionMapping() ) {
            inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "element", elementClass );
          }
          else {
            //"collection&&element" is not a valid property name => placeholder
            inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "collection&&element", elementClass );
          }
        }
        //TODO be smart with isNullable
        Component component = AnnotationBinder.fillComponent(
            holder, inferredData, isPropertyAnnotated ? AccessType.PROPERTY : AccessType.FIELD, true,
View Full Code Here

        PropertyData inferredData;
        if ( isMap() ) {
          //"value" is the JPA 2 prefix for map values (used to be "element")
          if ( isHibernateExtensionMapping() ) {
            inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "element", elementClass );
          }
          else {
            inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "value", elementClass );
          }
        }
        else {
          if ( isHibernateExtensionMapping() ) {
            inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "element", elementClass );
          }
          else {
            //"collection&&element" is not a valid property name => placeholder
            inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "collection&&element", elementClass );
          }
        }
        //TODO be smart with isNullable
        boolean isNullable = true;
        Component component = AnnotationBinder.fillComponent(
View Full Code Here

      //if an xToMany, it as to be wrapped today.
      //FIXME this pose a problem as the PK is the class instead of the associated class which is not really compliant with the spec
      if ( isXToMany || entityBinder.wrapIdsInEmbeddedComponents() ) {
        Component identifier = (Component) rootClass.getIdentifier();
        if (identifier == null) {
          identifier = AnnotationBinder.createComponent( holder, new PropertyPreloadedData(null, null, null), true, false, mappings );
          rootClass.setIdentifier( identifier );
          identifier.setNullValue( "undefined" );
          rootClass.setEmbeddedIdentifier( true );
          rootClass.setIdentifierMapper( identifier );
        }
View Full Code Here

        if ( AnnotatedClassType.EMBEDDABLE.equals( classType ) ) {
          EntityBinder entityBinder = new EntityBinder();

          PropertyData inferredData;
          if ( isHibernateExtensionMapping() ) {
            inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "index", keyXClass );
          }
          else {
            //"key" is the JPA 2 prefix for map keys
            inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "key", keyXClass );
          }

          //TODO be smart with isNullable
          Component component = AnnotationBinder.fillComponent(
              holder,
View Full Code Here

            throw new AssertionFailure( "Unable to guess collection property accessor name" );
          }

          //boolean propertyAccess = embeddable == null || AccessType.PROPERTY.equals( embeddable.access() );
          //FIXME "index" is it right?
          PropertyData inferredData = new PropertyPreloadedData( "property", "index", elementClass );
          //TODO be smart with isNullable
          Component component = AnnotationBinder.fillComponent(
              holder, inferredData, isPropertyAnnotated, isPropertyAnnotated ? "property" : "field", true,
              entityBinder, false, false,
              true, mappings
View Full Code Here

        PropertyData inferredData;
        if ( isMap() ) {
          //"value" is the JPA 2 prefix for map values (used to be "element")
          if ( isHibernateExtensionMapping() ) {
            inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "element", elementClass );
          }
          else {
            inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "value", elementClass );
          }
        }
        else {
          if ( isHibernateExtensionMapping() ) {
            inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "element", elementClass );
          }
          else {
            //"collection&&element" is not a valid property name => placeholder
            inferredData = new PropertyPreloadedData( AccessType.PROPERTY, "collection&&element", elementClass );
          }
        }
        //TODO be smart with isNullable
        Component component = AnnotationBinder.fillComponent(
            holder, inferredData, isPropertyAnnotated ? AccessType.PROPERTY : AccessType.FIELD, true,
View Full Code Here

        else {
          throw new AssertionFailure( "Unable to guess collection property accessor name" );
        }

        //boolean propertyAccess = embeddable == null || AccessType.PROPERTY.equals( embeddable.access() );
        PropertyData inferredData = new PropertyPreloadedData( "property", "element", elementClass );
        //TODO be smart with isNullable
        Component component = AnnotationBinder.fillComponent(
            holder, inferredData, isPropertyAnnotated, isPropertyAnnotated ? "property" : "field", true,
            entityBinder, false, false,
            true, mappings
View Full Code Here

        else {
          throw new AssertionFailure( "Unable to guess collection property accessor name" );
        }

        //boolean propertyAccess = embeddable == null || AccessType.PROPERTY.equals( embeddable.access() );
        PropertyData inferredData = new PropertyPreloadedData( "property", "element", elementClass );
        //TODO be smart with isNullable
        Component component = AnnotationBinder.fillComponent(
            holder, inferredData, isPropertyAnnotated, isPropertyAnnotated ? "property" : "field", true,
            entityBinder, false, false,
            true, mappings
View Full Code Here

            throw new AssertionFailure( "Unable to guess collection property accessor name" );
          }

          //boolean propertyAccess = embeddable == null || AccessType.PROPERTY.equals( embeddable.access() );
          //FIXME "index" is it right?
          PropertyData inferredData = new PropertyPreloadedData( "property", "index", elementClass );
          //TODO be smart with isNullable
          Component component = AnnotationBinder.fillComponent(
              holder, inferredData, isPropertyAnnotated, isPropertyAnnotated ? "property" : "field", true,
              entityBinder, false, false,
              true, mappings
View Full Code Here

TOP

Related Classes of org.hibernate.cfg.PropertyPreloadedData

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.