Package org.hibernate.tuple

Examples of org.hibernate.tuple.InDatabaseValueGenerationStrategy


      // the incoming 'includeProperty' array only accounts for insertable defined at the root level, it
      // does not account for partially generated composites etc.  We also need to account for generation
      // values
      if ( isPropertyOfTable( i, j ) ) {
        if ( !lobProperties.contains( i ) ) {
          final InDatabaseValueGenerationStrategy generationStrategy = entityMetamodel.getInDatabaseValueGenerationStrategies()[i];
          if ( generationStrategy != null && generationStrategy.getGenerationTiming().includesInsert() ) {
            if ( generationStrategy.referenceColumnsInSql() ) {
              final String[] values;
              if ( generationStrategy.getReferencedColumnValues() == null ) {
                values = propertyColumnWriters[i];
              }
              else {
                final int numberOfColumns = propertyColumnWriters[i].length;
                values = new String[ numberOfColumns ];
                for ( int x = 0; x < numberOfColumns; x++ ) {
                  if ( generationStrategy.getReferencedColumnValues()[x] != null ) {
                    values[x] = generationStrategy.getReferencedColumnValues()[x];
                  }
                  else {
                    values[x] = propertyColumnWriters[i][x];
                  }
                }
View Full Code Here


    String selectClause = concretePropertySelectFragment(
        getRootAlias(),
        new InclusionChecker() {
          @Override
          public boolean includeProperty(int propertyNumber) {
            final InDatabaseValueGenerationStrategy generationStrategy
                = entityMetamodel.getInDatabaseValueGenerationStrategies()[propertyNumber];
            return generationStrategy != null
                && timingsMatch( generationStrategy.getGenerationTiming(), generationTimingToMatch );
          }
        }
    );
    selectClause = selectClause.substring( 2 );
View Full Code Here

    String selectClause = concretePropertySelectFragment(
        getRootAlias(),
        new InclusionChecker() {
          @Override
          public boolean includeProperty(int propertyNumber) {
            final InDatabaseValueGenerationStrategy generationStrategy
                = entityMetamodel.getInDatabaseValueGenerationStrategies()[propertyNumber];
            return generationStrategy != null
                && generationStrategy.getGenerationTiming() == generationTimingToMatch;
          }
        }
    );
    selectClause = selectClause.substring( 2 );
View Full Code Here

      // the incoming 'includeProperty' array only accounts for insertable defined at the root level, it
      // does not account for partially generated composites etc.  We also need to account for generation
      // values
      if ( isPropertyOfTable( i, j ) ) {
        if ( !lobProperties.contains( i ) ) {
          final InDatabaseValueGenerationStrategy generationStrategy = entityMetamodel.getInDatabaseValueGenerationStrategies()[i];
          if ( generationStrategy != null && generationStrategy.getGenerationTiming().includesInsert() ) {
            if ( generationStrategy.referenceColumnsInSql() ) {
              final String[] values;
              if ( generationStrategy.getReferencedColumnValues() == null ) {
                values = propertyColumnWriters[i];
              }
              else {
                final int numberOfColumns = propertyColumnWriters[i].length;
                values = new String[ numberOfColumns ];
                for ( int x = 0; x < numberOfColumns; x++ ) {
                  if ( generationStrategy.getReferencedColumnValues()[x] != null ) {
                    values[x] = generationStrategy.getReferencedColumnValues()[x];
                  }
                  else {
                    values[x] = propertyColumnWriters[i][x];
                  }
                }
View Full Code Here

    String selectClause = concretePropertySelectFragment(
        getRootAlias(),
        new InclusionChecker() {
          @Override
          public boolean includeProperty(int propertyNumber) {
            final InDatabaseValueGenerationStrategy generationStrategy
                = entityMetamodel.getInDatabaseValueGenerationStrategies()[propertyNumber];
            return generationStrategy != null
                && timingsMatch( generationStrategy.getGenerationTiming(), generationTimingToMatch );
          }
        }
    );
    selectClause = selectClause.substring( 2 );
View Full Code Here

      // the incoming 'includeProperty' array only accounts for insertable defined at the root level, it
      // does not account for partially generated composites etc.  We also need to account for generation
      // values
      if ( isPropertyOfTable( i, j ) ) {
        if ( !lobProperties.contains( i ) ) {
          final InDatabaseValueGenerationStrategy generationStrategy = entityMetamodel.getInDatabaseValueGenerationStrategies()[i];
          if ( generationStrategy != null && generationStrategy.getGenerationTiming().includesInsert() ) {
            if ( generationStrategy.referenceColumnsInSql() ) {
              final String[] values;
              if ( generationStrategy.getReferencedColumnValues() == null ) {
                values = propertyColumnWriters[i];
              }
              else {
                final int numberOfColumns = propertyColumnWriters[i].length;
                values = new String[ numberOfColumns ];
                for ( int x = 0; x < numberOfColumns; x++ ) {
                  if ( generationStrategy.getReferencedColumnValues()[x] != null ) {
                    values[x] = generationStrategy.getReferencedColumnValues()[x];
                  }
                  else {
                    values[x] = propertyColumnWriters[i][x];
                  }
                }
View Full Code Here

TOP

Related Classes of org.hibernate.tuple.InDatabaseValueGenerationStrategy

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.