Examples of initialValue()


Examples of javax.persistence.SequenceGenerator.initialValue()

        }
        if ( !BinderHelper.isEmptyAnnotationValue( seqGen.sequenceName() ) ) {
          idGen.addParam( SequenceStyleGenerator.SEQUENCE_PARAM, seqGen.sequenceName() );
        }
        idGen.addParam( SequenceStyleGenerator.INCREMENT_PARAM, String.valueOf( seqGen.allocationSize() ) );
        idGen.addParam( SequenceStyleGenerator.INITIAL_PARAM, String.valueOf( seqGen.initialValue() ) );
      }
      else {
        idGen.setIdentifierGeneratorStrategy( "seqhilo" );

        if ( !BinderHelper.isEmptyAnnotationValue( seqGen.sequenceName() ) ) {
View Full Code Here

Examples of javax.persistence.SequenceGenerator.initialValue()

        if ( !BinderHelper.isEmptyAnnotationValue( seqGen.sequenceName() ) ) {
          idGen.addParam( org.hibernate.id.SequenceGenerator.SEQUENCE, seqGen.sequenceName() );
        }
        //FIXME: work on initialValue() through SequenceGenerator.PARAMETERS
        //    steve : or just use o.h.id.enhanced.SequenceStyleGenerator
                if (seqGen.initialValue() != 1) LOG.unsupportedInitialValue(Configuration.USE_NEW_ID_GENERATOR_MAPPINGS);
        idGen.addParam( SequenceHiLoGenerator.MAX_LO, String.valueOf( seqGen.allocationSize() - 1 ) );
                LOG.trace("Add sequence generator with name: " + idGen.getName());
      }
    }
    else if ( ann instanceof GenericGenerator ) {
View Full Code Here

Examples of javax.persistence.TableGenerator.initialValue()

          annotation.setValue( "catalog", defaults.getSchema() );
        }
        annotation.setValue( "pkColumnName", tableAnn.pkColumnName() );
        annotation.setValue( "valueColumnName", tableAnn.valueColumnName() );
        annotation.setValue( "pkColumnValue", tableAnn.pkColumnValue() );
        annotation.setValue( "initialValue", tableAnn.initialValue() );
        annotation.setValue( "allocationSize", tableAnn.allocationSize() );
        annotation.setValue( "uniqueConstraints", tableAnn.uniqueConstraints() );
        return AnnotationFactory.create( annotation );
      }
      else {
View Full Code Here

Examples of javax.persistence.TableGenerator.initialValue()

            String.valueOf( tabGen.allocationSize() )
        );
        // See comment on HHH-4884 wrt initialValue.  Basically initialValue is really the stated value + 1
        idGen.addParam(
            org.hibernate.id.enhanced.TableGenerator.INITIAL_PARAM,
            String.valueOf( tabGen.initialValue() + 1 )
        );
                if (tabGen.uniqueConstraints() != null && tabGen.uniqueConstraints().length > 0) LOG.warn(tabGen.name());
      }
      else {
        idGen.setIdentifierGeneratorStrategy( MultipleHiLoPerTableGenerator.class.getName() );
View Full Code Here

Examples of javax.persistence.TableGenerator.initialValue()

          annotation.setValue( "catalog", defaults.getSchema() );
        }
        annotation.setValue( "pkColumnName", tableAnn.pkColumnName() );
        annotation.setValue( "valueColumnName", tableAnn.valueColumnName() );
        annotation.setValue( "pkColumnValue", tableAnn.pkColumnValue() );
        annotation.setValue( "initialValue", tableAnn.initialValue() );
        annotation.setValue( "allocationSize", tableAnn.allocationSize() );
        annotation.setValue( "uniqueConstraints", tableAnn.uniqueConstraints() );
        return AnnotationFactory.create( annotation );
      }
      else {
View Full Code Here

Examples of javax.persistence.TableGenerator.initialValue()

          annotation.setValue( "catalog", defaults.getSchema() );
        }
        annotation.setValue( "pkColumnName", tableAnn.pkColumnName() );
        annotation.setValue( "valueColumnName", tableAnn.valueColumnName() );
        annotation.setValue( "pkColumnValue", tableAnn.pkColumnValue() );
        annotation.setValue( "initialValue", tableAnn.initialValue() );
        annotation.setValue( "allocationSize", tableAnn.allocationSize() );
        annotation.setValue( "uniqueConstraints", tableAnn.uniqueConstraints() );
        return AnnotationFactory.create( annotation );
      }
      else {
View Full Code Here

Examples of javax.persistence.TableGenerator.initialValue()

        if ( !BinderHelper.isDefault( tabGen.valueColumnName() ) ) {
          idGen.addParam( org.hibernate.id.enhanced.TableGenerator.VALUE_COLUMN_PARAM, tabGen.valueColumnName() );
        }
        idGen.addParam( org.hibernate.id.enhanced.TableGenerator.INCREMENT_PARAM, String.valueOf( tabGen.allocationSize() ) );
        // See comment on HHH-4884 wrt initialValue.  Basically initialValue is really the stated value + 1
        idGen.addParam( org.hibernate.id.enhanced.TableGenerator.INITIAL_PARAM, String.valueOf( tabGen.initialValue() + 1 ) );
        if ( tabGen.uniqueConstraints() != null && tabGen.uniqueConstraints().length > 0 ) {
          log.warn( "Ignoring unique constraints specified on table generator [{}]", tabGen.name() );
        }
      }
      else {
View Full Code Here

Examples of javax.persistence.TableGenerator.initialValue()

            String.valueOf( tabGen.allocationSize() )
        );
        // See comment on HHH-4884 wrt initialValue.  Basically initialValue is really the stated value + 1
        idGen.addParam(
            org.hibernate.id.enhanced.TableGenerator.INITIAL_PARAM,
            String.valueOf( tabGen.initialValue() + 1 )
        );
                if (tabGen.uniqueConstraints() != null && tabGen.uniqueConstraints().length > 0) LOG.warn(tabGen.name());
      }
      else {
        idGen.setIdentifierGeneratorStrategy( MultipleHiLoPerTableGenerator.class.getName() );
View Full Code Here

Examples of javax.persistence.TableGenerator.initialValue()

          annotation.setValue( "catalog", defaults.getSchema() );
        }
        annotation.setValue( "pkColumnName", tableAnn.pkColumnName() );
        annotation.setValue( "valueColumnName", tableAnn.valueColumnName() );
        annotation.setValue( "pkColumnValue", tableAnn.pkColumnValue() );
        annotation.setValue( "initialValue", tableAnn.initialValue() );
        annotation.setValue( "allocationSize", tableAnn.allocationSize() );
        annotation.setValue( "uniqueConstraints", tableAnn.uniqueConstraints() );
        return AnnotationFactory.create( annotation );
      }
      else {
View Full Code Here

Examples of javax.persistence.TableGenerator.initialValue()

          annotation.setValue( "catalog", defaults.getSchema() );
        }
        annotation.setValue( "pkColumnName", tableAnn.pkColumnName() );
        annotation.setValue( "valueColumnName", tableAnn.valueColumnName() );
        annotation.setValue( "pkColumnValue", tableAnn.pkColumnValue() );
        annotation.setValue( "initialValue", tableAnn.initialValue() );
        annotation.setValue( "allocationSize", tableAnn.allocationSize() );
        annotation.setValue( "uniqueConstraints", tableAnn.uniqueConstraints() );
        return AnnotationFactory.create( annotation );
      }
      else {
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.