Examples of OgmSequenceGenerator


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

      Map<String, EntityPersister> entityPersisters = sessionFactoryImplementor.getEntityPersisters();
      for ( Map.Entry<String, EntityPersister> entry : entityPersisters.entrySet() ) {
        EntityPersister persister = entry.getValue();
        IdentifierGenerator identifierGenerator = persister.getIdentifierGenerator();
        if ( identifierGenerator instanceof OgmSequenceGenerator ) {
          OgmSequenceGenerator sequenceGenerator = (OgmSequenceGenerator) identifierGenerator;
          sequences.add( sequenceGenerator.generatorKey().toString() );
        }
      }
      return sequences;
    }
View Full Code Here

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

    }
  }

  private void addUniqueConstraint(IdentifierGenerator identifierGenerator) {
    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

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

    }
  }

  private void addSequence(IdentifierGenerator identifierGenerator) {
    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

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

    }
  }

  private void addSequence(IdentifierGenerator identifierGenerator) {
    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
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.