Package org.hibernate.ogm.datastore.spi

Examples of org.hibernate.ogm.datastore.spi.Tuple


    }
  }

  @Override
  public Tuple createTupleAssociation(AssociationKey associationKey, RowKey rowKey) {
    return new Tuple();
  }
View Full Code Here


  public void forEachTuple(Consumer consumer, EntityKeyMetadata... entityKeyMetadatas) {
    for ( EntityKeyMetadata entityKeyMetadata : entityKeyMetadatas ) {
      IndexHits<Node> queryNodes = indexer.findNodes( entityKeyMetadata.getTable() );
      try {
        for ( Node node : queryNodes ) {
          Tuple tuple = createTuple( node );
          consumer.consume( tuple );
        }
      }
      finally {
        queryNodes.close();
View Full Code Here

  @Override
  public Tuple get(RowKey rowKey) {
    for ( Relationship relationship : relationships() ) {
      if ( matches( rowKey, relationship ) ) {
        return new Tuple( new Neo4jTupleSnapshot( relationship.getEndNode() ) );
      }
    }
    return null;
  }
View Full Code Here

      return resultIterator.hasNext();
    }

    @Override
    public Object next() {
      Tuple next = resultIterator.next();

      if ( isProjection() ) {
        return getAsProjection( next );
      }
      else {
View Full Code Here

  }

  @Override
  public Tuple getTuple(EntityKey key, TupleContext tupleContext) {
    DBObject found = this.getObject( key, tupleContext );
    return found != null ? new Tuple( new MongoDBTupleSnapshot( found, key ) ) : null;
  }
View Full Code Here

  }

  @Override
  public Tuple createTuple(EntityKey key) {
    DBObject toSave = this.prepareIdObject( key );
    return new Tuple( new MongoDBTupleSnapshot( toSave, key ) );
  }
View Full Code Here

      associationField = ROWS_FIELDNAME;
    }

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

      DBObject update = null;

      switch ( action.getType() ) {
      case CLEAR:
View Full Code Here

    }
  }

  @Override
  public Tuple createTupleAssociation(AssociationKey associationKey, RowKey rowKey) {
    return new Tuple( EmptyTupleSnapshot.SINGLETON );
  }
View Full Code Here

  public void forEachTuple(Consumer consumer, EntityKeyMetadata... entityKeyMetadatas) {
    DB db = provider.getDatabase();
    for ( EntityKeyMetadata entityKeyMetadata : entityKeyMetadatas ) {
      DBCollection collection = db.getCollection( entityKeyMetadata.getTable() );
      for ( DBObject dbObject : collection.find() ) {
        consumer.consume( new Tuple( new MassIndexingMongoDBTupleSnapshot( dbObject, entityKeyMetadata ) ) );
      }
    }
  }
View Full Code Here

          keyMetaData.getTable(),
          keyMetaData.getColumnNames(),
          new Object[] { dbObject.get( MongoDBDialect.ID_FIELDNAME ) }
          );

      return new Tuple( new MongoDBTupleSnapshot( dbObject, rowKey ) );
    }
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.datastore.spi.Tuple

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.