Examples of generatorKey()


Examples of org.hibernate.id.PersistentIdentifierGenerator.generatorKey()

    }

    iter = iterateGenerators( dialect );
    while ( iter.hasNext() ) {
      PersistentIdentifierGenerator generator = (PersistentIdentifierGenerator) iter.next();
      Object key = generator.generatorKey();
      if ( !databaseMetadata.isSequence( key ) && !databaseMetadata.isTable( key ) ) {
        String[] lines = generator.sqlCreateStrings( dialect );
        script.addAll( Arrays.asList( lines ) );
      }
    }
View Full Code Here

Examples of org.hibernate.id.PersistentIdentifierGenerator.generatorKey()

    }

    iter = iterateGenerators( dialect );
    while ( iter.hasNext() ) {
      PersistentIdentifierGenerator generator = (PersistentIdentifierGenerator) iter.next();
      Object key = generator.generatorKey();
      if ( !databaseMetadata.isSequence( key ) && !databaseMetadata.isTable( key ) ) {
        throw new HibernateException( "Missing sequence or table: " + key );
      }
    }
  }
View Full Code Here

Examples of org.hibernate.id.PersistentIdentifierGenerator.generatorKey()

    }

    iter = iterateGenerators( dialect );
    while ( iter.hasNext() ) {
      PersistentIdentifierGenerator generator = (PersistentIdentifierGenerator) iter.next();
      Object key = generator.generatorKey();
      if ( !databaseMetadata.isSequence( key ) && !databaseMetadata.isTable( key ) ) {
        String[] lines = generator.sqlCreateStrings( dialect );
        script.addAll( Arrays.asList( lines ) );
      }
    }
View Full Code Here

Examples of org.hibernate.id.PersistentIdentifierGenerator.generatorKey()

    }

    iter = iterateGenerators( dialect );
    while ( iter.hasNext() ) {
      PersistentIdentifierGenerator generator = (PersistentIdentifierGenerator) iter.next();
      Object key = generator.generatorKey();
      if ( !databaseMetadata.isSequence( key ) && !databaseMetadata.isTable( key ) ) {
        throw new HibernateException( "Missing sequence or table: " + key );
      }
    }
  }
View Full Code Here

Examples of org.hibernate.id.SequenceGenerator.generatorKey()

                    if (ig instanceof SequenceGenerator) {
                        SequenceGenerator sequenceGenerator = (SequenceGenerator) ig;
                        createSequence(sequenceGenerator.getSequenceName(), schema);
                    } else if (ig instanceof SequenceStyleGenerator) {
                        SequenceStyleGenerator sequenceGenerator = (SequenceStyleGenerator) ig;
                        createSequence((String) sequenceGenerator.generatorKey(), schema);
                    }
                }
               
            }
        }
View Full Code Here

Examples of org.hibernate.id.enhanced.SequenceStyleGenerator.generatorKey()

                    if (ig instanceof SequenceGenerator) {
                        SequenceGenerator sequenceGenerator = (SequenceGenerator) ig;
                        createSequence(sequenceGenerator.getSequenceName(), schema);
                    } else if (ig instanceof SequenceStyleGenerator) {
                        SequenceStyleGenerator sequenceGenerator = (SequenceStyleGenerator) ig;
                        createSequence((String) sequenceGenerator.generatorKey(), schema);
                    }
                }
               
            }
        }
View Full Code Here

Examples of org.hibernate.ogm.id.impl.OgmSequenceGenerator.generatorKey()

      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.generatorKey()

  }

  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.generatorKey()

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

  private void addUniqueConstraint(Object generatorKey) {
    Label generatorKeyLabel = generatorKeyLabel( generatorKey );
View Full Code Here

Examples of org.hibernate.ogm.id.impl.OgmSequenceGenerator.generatorKey()

  }

  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
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.