Examples of Tuple


Examples of org.drools.spi.Tuple

        List asserted = sink.getAssertedTuples( );

        assertEquals( 1, asserted.size( ) );

        Tuple tuple = ( Tuple ) asserted.get( 0 );

        assertSame( object1, tuple.get( paramDecl ) );
    }
View Full Code Here

Examples of org.drools.spi.Tuple

    void removeFromAgenda(TupleKey key,
                          PropagationContext context,
                          Rule rule) throws FactException
    {
        AgendaItem eachItem;
        Tuple tuple;
        ModuleImpl module = (ModuleImpl) modules.get( rule.getModule( ) );
        Iterator itemIter = module.getActivationQueue( ).iterator( );            

        while ( itemIter.hasNext( ) )
        {
View Full Code Here

Examples of org.elasticsearch.common.collect.Tuple

                    }
                }
                if (lastFound > -1) {
                    try (IndexInput indexInput = directory.openInput(CHECKSUMS_PREFIX + lastFound, IOContext.READONCE)) {
                        indexInput.readInt(); // version
                        return new Tuple(indexInput.readStringStringMap(), lastFound);
                    }
                }
                return new Tuple(new HashMap<>(), -1l);
            }
        }
View Full Code Here

Examples of org.hibernate.metamodel.relational.Tuple

    }
    if ( values.size() == 1 ) {
      this.value = values.get( 0 );
    }
    else {
      final Tuple tuple = values.get( 0 ).getTable().createTuple( getRole() );
      for ( SimpleValue value : values ) {
        tuple.addValue( value );
      }
      this.value = tuple;
    }
  }
View Full Code Here

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

  // At the moment we only support the case where one entity type is returned
  private List<Object> listOfEntities(SessionImplementor session, Type[] resultTypes, ClosableIterator<Tuple> tuples) {
    List<Object> results = new ArrayList<Object>();
    Class<?> returnedClass = resultTypes[0].getReturnedClass();
    while ( tuples.hasNext() ) {
      Tuple tuple = tuples.next();
      OgmLoader loader = createLoader( session, returnedClass );
      results.add( entity( session, tuple, loader ) );
    }
    return results;
  }
View Full Code Here

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

    Object gridValue = convertToGridType( value, propertyType );
    return gridValue;
  }

  private Object convertToGridType(Object value, Type propertyType) {
    Tuple dummy = new Tuple();
    GridType gridType = typeTranslator().getType( propertyType );
    gridType.nullSafeSet( dummy, value, new String[] { "key" }, null );
    return dummy.get( "key" );
  }
View Full Code Here

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

    Object[] values = { 123, "Hello", 456L };

    EntityKey key = new EntityKey( keyMetadata, values );

    // when
    Tuple tuple = dialect1.createTuple( key, emptyTupleContext() );
    tuple.put( "foo", "bar" );
    dialect1.insertOrUpdateTuple( key, tuple, emptyTupleContext() );

    // then
    Tuple readTuple = dialect2.getTuple( key, null );
    assertThat( readTuple.get( "foo" ) ).isEqualTo( "bar" );
  }
View Full Code Here

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

    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 );
    association.put( rowKey, tuple );
    dialect1.insertOrUpdateAssociation( key, association, null );

    // then
    Association readAssociation = dialect2.getAssociation( key, null );
    Tuple readKey = readAssociation.get( rowKey );
    assertThat( readKey ).isNotNull();
    assertThat( readKey.get( "zip" ) ).isEqualTo( "zap" );
  }
View Full Code Here

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

    return createTuple( entityNode, context );
  }

  @Override
  public Tuple createTuple(EntityKey key, TupleContext tupleContext) {
    return new Tuple();
  }
View Full Code Here

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

  public Tuple createTuple(EntityKey key, TupleContext tupleContext) {
    return new Tuple();
  }

  private static Tuple createTuple(Node entityNode, TupleContext tupleContext) {
    return new Tuple( new Neo4jTupleSnapshot( entityNode, tupleContext.getAllAssociatedEntityKeyMetadata(), tupleContext.getAllRoles() ) );
  }
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.