Package org.hibernate.ogm.grid

Examples of org.hibernate.ogm.grid.RowKey


  private final Map<RowKey, Tuple> tuples = new HashMap<RowKey, Tuple>();

  public Neo4jAssociationSnapshot(Node ownerNode, AssociationKey associationKey) {
    for ( Relationship relationship : relationships( ownerNode, associationKey ) ) {
      RowKey rowKey = convert( associationKey, relationship );
      Tuple tuple = new Tuple( new Neo4jTupleSnapshot( relationship ) );
      tuples.put( rowKey, tuple );
    }
  }
View Full Code Here


      if ( container.hasProperty( columnName ) ) {
        values[i] = container.getProperty( columnName );
      }
    }

    return new RowKey( associationKey.getTable(), columnNames, values );
  }
View Full Code Here

      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

  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

      if ( container.hasProperty( columnName ) ) {
        values[i] = container.getProperty( columnName );
      }
    }

    return new RowKey( associationKey.getTable(), columnNames, values );
  }
View Full Code Here

      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

    @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

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

    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

      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

TOP

Related Classes of org.hibernate.ogm.grid.RowKey

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.