Examples of RowKey


Examples of org.hibernate.ogm.grid.RowKey

      query = assocSnapshot.getQueryObject();
      associationField = ROWS_FIELDNAME;
    }

    for ( AssociationOperation action : association.getOperations() ) {
      RowKey rowKey = action.getKey();
      Tuple rowValue = action.getValue();

      DBObject update = null;

      switch ( action.getType() ) {
View Full Code Here

Examples of org.hibernate.ogm.grid.RowKey

    @Override
    public Tuple next() {
      DBObject dbObject = cursor.next();

      RowKey rowKey = new RowKey(
          keyMetaData.getTable(),
          keyMetaData.getColumnNames(),
          new Object[] { dbObject.get( MongoDBDialect.ID_FIELDNAME ) }
          );
View Full Code Here

Examples of org.hibernate.ogm.grid.RowKey

        //otherwise read it from the database structure
        if ( getFromMongoData == true ) {
          columnValues.add( mongodbColumnData.get( columnKey ) );
        }
      }
      RowKey rowKey = new RowKey(
          key.getTable(),
          columnNames.toArray( new String[columnNames.size()] ),
          columnValues.toArray() );
      //Stock database structure per RowKey
      this.map.put( rowKey, row );
View Full Code Here

Examples of org.hibernate.ogm.grid.RowKey

    List<Object> values = new ArrayList<Object>();
    for ( String column : columnNames ) {
      columns.add( column );
      values.add( container.getProperty( column ) );
    }
    return new RowKey( associationKey.getTable(), columns.toArray( new String[columns.size()] ),
        values.toArray( new Object[values.size()] ) );
  }
View Full Code Here

Examples of org.hibernate.ogm.grid.RowKey

      break;
    }
  }

  private void putAssociationOperation(AssociationKey associationKey, AssociationOperation action) {
    RowKey rowKey = action.getKey();
    Relationship relationship = createRelationshipUnlessExists( findNode( associationKey.getEntityKey() ), associationKey, rowKey );
    applyTupleOperations( relationship.getEndNode(), action.getValue().getOperations() );
  }
View Full Code Here

Examples of org.hibernate.ogm.grid.RowKey

  private Node findNode(EntityKey entityKey) {
    return indexer.findNode( entityKey );
  }

  private void removeAssociationOperation(AssociationKey associationKey, AssociationOperation action) {
    RowKey rowKey = action.getKey();
    Relationship relationship = indexer.findRelationship( relationshipType( associationKey ), rowKey );
    removeRelationship( relationship );
  }
View Full Code Here

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

        .build();
    Object[] values = { 123, "Hello", 456L };

    AssociationKey key = new AssociationKey( keyMetadata, values, null );

    RowKey rowKey = new RowKey( columnNames, values );
    Tuple tuple = new Tuple();
    tuple.put( "zip", "zap" );

    // when
    Association association = dialect1.createAssociation( key, null );
View Full Code Here

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

  public void shouldSerializeAndDeserializeRowKey() throws Exception {
    String[] columnNames = { "foo", "bar", "baz" };
    Object[] values = { 123, "Hello", 456L };

    // given
    SerializableRowKey key = new SerializableRowKey( new RowKey( columnNames, values ) );

    // when
    byte[] bytes = marshall( key );
    SerializableRowKey unmarshalledKey = unmarshall( bytes );
View Full Code Here

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

  public void shouldSerializeAndDeserializeRowKey() throws Exception {
    String[] columnNames = { "foo", "bar", "baz" };
    Object[] values = { 123, "Hello", 456L };

    // given
    RowKey key = new RowKey( columnNames, values );

    // when
    byte[] bytes = externalizerHelper.marshall( key );
    RowKey unmarshalledKey = externalizerHelper.unmarshall( bytes );

    // then
    assertThat( unmarshalledKey.getColumnNames() ).isEqualTo( key.getColumnNames() );
    assertThat( unmarshalledKey.getColumnValues() ).isEqualTo( key.getColumnValues() );

    assertTrue( key.equals( unmarshalledKey ) );
    assertTrue( unmarshalledKey.equals( key ) );
    assertThat( unmarshalledKey.hashCode() ).isEqualTo( key.hashCode() );
  }
View Full Code Here

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

  public Neo4jAssociationSnapshot(Node ownerNode, AssociationKey associationKey, AssociatedEntityKeyMetadata associatedEntityKeyMetadata, String relationshipType) {
    Contracts.assertParameterNotNull( relationshipType, "relationshipType" );

    for ( Relationship relationship : relationships( ownerNode, associationKey, relationshipType ) ) {
      Neo4jTupleAssociationSnapshot snapshot = new Neo4jTupleAssociationSnapshot( relationship, associationKey, associatedEntityKeyMetadata );
      RowKey rowKey = convert( associationKey, snapshot );
      tuples.put( rowKey, new Tuple( snapshot ) );
    }
  }
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.