Package org.hibernate.tuple

Examples of org.hibernate.tuple.ValueGeneration


    }

    int propertyIndex = -1;
    for ( NonIdentifierAttribute attribute : getEntityMetamodel().getProperties() ) {
      propertyIndex++;
      final ValueGeneration valueGeneration = attribute.getValueGenerationStrategy();
      if ( isReadRequired( valueGeneration, matchTiming ) ) {
        Object hydratedState = gridPropertyTypes[propertyIndex].hydrate( tuple, getPropertyAliases( "", propertyIndex ), session, entity );
        state[propertyIndex] = gridPropertyTypes[propertyIndex].resolve( hydratedState, session, entity );
        setPropertyValue( entity, propertyIndex, state[propertyIndex] );
      }
View Full Code Here


    }

    int propertyIndex = -1;
    for ( NonIdentifierAttribute attribute : getEntityMetamodel().getProperties() ) {
      propertyIndex++;
      final ValueGeneration valueGeneration = attribute.getValueGenerationStrategy();
      if ( isReadRequired( valueGeneration, matchTiming ) ) {
        Object hydratedState = gridPropertyTypes[propertyIndex].hydrate( tuple, getPropertyAliases( "", propertyIndex ), session, entity );
        state[propertyIndex] = gridPropertyTypes[propertyIndex].resolve( hydratedState, session, entity );
        setPropertyValue( entity, propertyIndex, state[propertyIndex] );
      }
View Full Code Here

              );
          }
          int propertyIndex = -1;
          for ( NonIdentifierAttribute attribute : entityMetamodel.getProperties() ) {
            propertyIndex++;
            final ValueGeneration valueGeneration = attribute.getValueGenerationStrategy();
            if ( isReadRequired( valueGeneration, matchTiming ) ) {
              final Object hydratedState = attribute.getType().hydrate(
                  rs, getPropertyAliases(
                  "",
                  propertyIndex
View Full Code Here

  }

  private static GenerationStrategyPair buildGenerationStrategyPair(
      final SessionFactoryImplementor sessionFactory,
      final Property mappingProperty) {
    final ValueGeneration valueGeneration = mappingProperty.getValueGenerationStrategy();
    if ( valueGeneration != null && valueGeneration.getGenerationTiming() != GenerationTiming.NEVER ) {
      // the property is generated in full. build the generation strategy pair.
      if ( valueGeneration.getValueGenerator() != null ) {
        // in-memory generation
        return new GenerationStrategyPair(
            FullInMemoryValueGenerationStrategy.create( valueGeneration )
        );
      }
View Full Code Here

    this.mappingProperty = prop;
    return prop;
  }

  private ValueGeneration determineValueGenerationStrategy(XProperty property) {
    ValueGeneration valueGeneration = getValueGenerationFromAnnotations( property );

    if ( valueGeneration == null ) {
      return NoValueGeneration.INSTANCE;
    }

    final GenerationTiming when = valueGeneration.getGenerationTiming();

    if ( valueGeneration.getValueGenerator() == null ) {
      insertable = false;
      if ( when == GenerationTiming.ALWAYS ) {
        updatable = false;
      }
    }
View Full Code Here

    }

    int propertyIndex = -1;
    for ( NonIdentifierAttribute attribute : getEntityMetamodel().getProperties() ) {
      propertyIndex++;
      final ValueGeneration valueGeneration = attribute.getValueGenerationStrategy();
      if ( isReadRequired( valueGeneration, matchTiming ) ) {
        Object hydratedState = gridPropertyTypes[propertyIndex].hydrate( tuple, getPropertyAliases( "", propertyIndex ), session, entity );
        state[propertyIndex] = gridPropertyTypes[propertyIndex].resolve( hydratedState, session, entity );
        setPropertyValue( entity, propertyIndex, state[propertyIndex] );
      }
View Full Code Here

    }

    int propertyIndex = -1;
    for ( NonIdentifierAttribute attribute : getEntityMetamodel().getProperties() ) {
      propertyIndex++;
      final ValueGeneration valueGeneration = attribute.getValueGenerationStrategy();
      if ( isReadRequired( valueGeneration, matchTiming ) ) {
        Object hydratedState = gridPropertyTypes[propertyIndex].hydrate( tuple, getPropertyAliases( "", propertyIndex ), session, entity );
        state[propertyIndex] = gridPropertyTypes[propertyIndex].resolve( hydratedState, session, entity );
        setPropertyValue( entity, propertyIndex, state[propertyIndex] );
      }
View Full Code Here

    this.mappingProperty = prop;
    return prop;
  }

  private ValueGeneration determineValueGenerationStrategy(XProperty property) {
    ValueGeneration valueGeneration = getValueGenerationFromAnnotations( property );

    if ( valueGeneration == null ) {
      return NoValueGeneration.INSTANCE;
    }

    final GenerationTiming when = valueGeneration.getGenerationTiming();

    if ( valueGeneration.getValueGenerator() == null ) {
      insertable = false;
      if ( when == GenerationTiming.ALWAYS ) {
        updatable = false;
      }
    }
View Full Code Here

              );
          }
          int propertyIndex = -1;
          for ( NonIdentifierAttribute attribute : entityMetamodel.getProperties() ) {
            propertyIndex++;
            final ValueGeneration valueGeneration = attribute.getValueGenerationStrategy();
            if ( isReadRequired( valueGeneration, matchTiming ) ) {
              final Object hydratedState = attribute.getType().hydrate(
                  rs, getPropertyAliases(
                  "",
                  propertyIndex
View Full Code Here

  }

  private static GenerationStrategyPair buildGenerationStrategyPair(
      final SessionFactoryImplementor sessionFactory,
      final Property mappingProperty) {
    final ValueGeneration valueGeneration = mappingProperty.getValueGenerationStrategy();
    if ( valueGeneration != null && valueGeneration.getGenerationTiming() != GenerationTiming.NEVER ) {
      // the property is generated in full. build the generation strategy pair.
      if ( valueGeneration.getValueGenerator() != null ) {
        // in-memory generation
        return new GenerationStrategyPair(
            FullInMemoryValueGenerationStrategy.create( valueGeneration )
        );
      }
View Full Code Here

TOP

Related Classes of org.hibernate.tuple.ValueGeneration

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.