Examples of IdSourceKeyMetadata


Examples of org.hibernate.ogm.grid.IdSourceKeyMetadata

    String tableName = input.readUTF();
    String[] columnNames = (String[]) input.readObject();
    Object[] values = (Object[]) input.readObject();

    IdSourceKeyMetadata metadata = IdSourceKeyMetadata.forTable( tableName, columnNames[0], null );
    return IdSourceKey.forTable( metadata , (String) values[0] );
  }
View Full Code Here

Examples of org.hibernate.ogm.model.key.spi.IdSourceKeyMetadata

  }

  @Test
  public void shoulReadAndWriteSequenceInClusteredMode() throws Exception {
    // given
    IdSourceKeyMetadata keyMetadata = IdSourceKeyMetadata.forTable( "Hibernate_Sequences", "sequence_name", "next_val" );
    IdSourceKey key = IdSourceKey.forTable( keyMetadata, "Foo_Sequence" );

    // when
    Number value = dialect1.nextValue( new NextValueRequest( key, 1, 1 ) );
    assertThat( value ).isEqualTo( 1L );
View Full Code Here

Examples of org.hibernate.ogm.model.key.spi.IdSourceKeyMetadata

    externalizerHelper = ExternalizerTestHelper.getInstance( IdSourceKeyExternalizer.INSTANCE );
  }

  @Test
  public void shouldSerializeAndDeserializeRowKey() throws Exception {
    IdSourceKeyMetadata keyMetadata = IdSourceKeyMetadata.forTable( "Hibernate_Sequences", "sequence_name", "next_val" );

    // given
    IdSourceKey key = IdSourceKey.forTable( keyMetadata, "Foo_Sequence" );

    // when
View Full Code Here

Examples of org.hibernate.ogm.model.key.spi.IdSourceKeyMetadata

    Number value = dialect.nextValue( new NextValueRequest( generatorKey, 0, 1 ) );
    assertThat( value ).isEqualTo( LOOPS * THREADS );
  }

  private IdSourceKey buildIdGeneratorKey(String sequenceName) {
    IdSourceKeyMetadata metadata = IdSourceKeyMetadata.forTable( HIBERNATE_SEQUENCES, "sequence_name", "next_val" );
    return IdSourceKey.forTable( metadata, sequenceName );
  }
View Full Code Here

Examples of org.hibernate.ogm.model.key.spi.IdSourceKeyMetadata

    String tableName = input.readUTF();
    String[] columnNames = (String[]) input.readObject();
    Object[] values = (Object[]) input.readObject();

    IdSourceKeyMetadata metadata = IdSourceKeyMetadata.forTable( tableName, columnNames[0], null );
    return IdSourceKey.forTable( metadata , (String) values[0] );
  }
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.