Package org.hibernate.ogm.id.impl

Examples of org.hibernate.ogm.id.impl.OgmTableGenerator


    Properties newParams = new Properties();
    newParams.setProperty( OgmTableGenerator.SEGMENT_VALUE_PARAM, sequenceName );
    newParams.setProperty( OgmTableGenerator.TABLE_PARAM, HIBERNATE_SEQUENCES );
    newParams.setProperty( OgmTableGenerator.INITIAL_PARAM, String.valueOf( initialValue ) );
    newParams.put( PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, new DefaultObjectNameNormalizer() );
    OgmTableGenerator tableGenerator = new OgmTableGenerator();
    tableGenerator.configure( LongType.INSTANCE, newParams, new OgmDialect( dialect ) );
    return tableGenerator;
  }
View Full Code Here


    if ( identifierGenerator instanceof OgmSequenceGenerator ) {
      OgmSequenceGenerator sequenceGenerator = (OgmSequenceGenerator) identifierGenerator;
      addUniqueConstraint( sequenceGenerator.generatorKey() );
    }
    else if ( identifierGenerator instanceof OgmTableGenerator ) {
      OgmTableGenerator sequenceGenerator = (OgmTableGenerator) identifierGenerator;
      addUniqueConstraint( sequenceGenerator.generatorKey() );
    }
  }
View Full Code Here

    if ( identifierGenerator instanceof OgmSequenceGenerator ) {
      OgmSequenceGenerator sequenceGenerator = (OgmSequenceGenerator) identifierGenerator;
      addSequence( sequenceGenerator.generatorKey(), sequenceGenerator.getSegmentValue(), sequenceGenerator.getInitialValue() );
    }
    else if ( identifierGenerator instanceof OgmTableGenerator ) {
      OgmTableGenerator sequenceGenerator = (OgmTableGenerator) identifierGenerator;
      addSequence( sequenceGenerator.generatorKey(), sequenceGenerator.getSegmentValue(), sequenceGenerator.getInitialValue() );
    }
  }
View Full Code Here

    if ( identifierGenerator instanceof OgmSequenceGenerator ) {
      OgmSequenceGenerator sequenceGenerator = (OgmSequenceGenerator) identifierGenerator;
      addSequence( sequenceGenerator.getGeneratorKeyMetadata(), sequenceGenerator.getInitialValue() );
    }
    else if ( identifierGenerator instanceof OgmTableGenerator ) {
      OgmTableGenerator sequenceGenerator = (OgmTableGenerator) identifierGenerator;
      addTableSequence( sequenceGenerator.getGeneratorKeyMetadata(), sequenceGenerator.getSegmentValue(), sequenceGenerator.getInitialValue() );
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.id.impl.OgmTableGenerator

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.