Examples of Tuple


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

    for ( EntityKeyMetadata entityKeyMetadata : entityKeyMetadatas ) {
      ResourceIterator<Node> queryNodes = entityQueries.get( entityKeyMetadata ).findEntities( executionEngine );
      try {
        while ( queryNodes.hasNext() ) {
          Node next = queryNodes.next();
          Tuple tuple = new Tuple( new Neo4jTupleSnapshot( next ) );
          consumer.consume( tuple );
        }
      }
      finally {
        queryNodes.close();
View Full Code Here

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

   * Returns a map with the named parameter values from the given parameters object, converted by the {@link GridType}
   * corresponding to each parameter type.
   */
  private Map<String, Object> getNamedParameterValuesConvertedByGridType(QueryParameters queryParameters) {
    Map<String, Object> parameterValues = new HashMap<String, Object>( queryParameters.getNamedParameters().size() );
    Tuple dummy = new Tuple();
    TypeTranslator typeTranslator = serviceRegistry.getService( TypeTranslator.class );

    for ( Entry<String, TypedValue> parameter : queryParameters.getNamedParameters().entrySet() ) {
      GridType gridType = typeTranslator.getType( parameter.getValue().getType() );
      gridType.nullSafeSet( dummy, parameter.getValue().getValue(), new String[]{ parameter.getKey() }, null );
      parameterValues.put( parameter.getKey(), dummy.get( parameter.getKey() ) );
    }

    return parameterValues;
  }
View Full Code Here

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

    }
  }

  @SuppressWarnings("unchecked")
  private Tuple createTuple(final Element element) {
    return new Tuple( new MapTupleSnapshot( (Map<String, Object>) element.getObjectValue() ) );
  }
View Full Code Here

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

  public Tuple createTuple(EntityKey key, TupleContext tupleContext) {
    final Cache<SerializableEntityKey> entityCache = datastoreProvider.getEntityCache();
    final HashMap<String, Object> tuple = new HashMap<String, Object>();
    entityCache.put( new Element( new SerializableEntityKey( key ), tuple ) );

    return new Tuple( new MapTupleSnapshot( tuple ) );
  }
View Full Code Here

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

  protected Tuple convert(Map<String, Object> next) {
    return createTuple( (Node) next.values().iterator().next() );
  }

  private Tuple createTuple(Node node) {
    return new Tuple( new Neo4jTupleSnapshot( node ) );
  }
View Full Code Here

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

    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

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

    }
  }

  @Override
  public Tuple get(RowKey rowKey) {
    Tuple tuple = tuples.get( rowKey );
    return tuple;
  }
View Full Code Here

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

  public Tuple next() {
    return convert( iterator.next() );
  }

  protected Tuple convert(Map<String, Object> next) {
    return new Tuple( new MapTupleSnapshot( next ) );
  }
View Full Code Here

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

  @Override
  public Tuple getTuple(EntityKey key, TupleContext tupleContext) {
    EntityDocument entity = getDataStore().getEntity( Identifier.createEntityId( key ) );
    if ( entity != null ) {
      return new Tuple( new CouchDBTupleSnapshot( entity.getProperties() ) );
    }

    return null;
  }
View Full Code Here

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

    return null;
  }

  @Override
  public Tuple createTuple(EntityKey key, TupleContext tupleContext) {
    return new Tuple( new CouchDBTupleSnapshot( key ) );
  }
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.