Examples of execute()


Examples of org.springframework.binding.convert.ConversionExecutor.execute()

  }

  private Object getFormattedValue(Expression fieldExpression) {
    ConversionExecutor converter = getConverter(fieldExpression);
    if (converter != null) {
      return converter.execute(fieldExpression.getValue(boundObject));
    } else {
      return fieldExpression.getValue(boundObject);
    }
  }
View Full Code Here

Examples of org.springframework.cassandra.core.CqlTemplate.execute()

          KeyspaceActionSpecification<?> spec = (KeyspaceActionSpecification<?>) i.next();
          String cql = (spec instanceof CreateKeyspaceSpecification) ? new CreateKeyspaceCqlGenerator(
              (CreateKeyspaceSpecification) spec).toCql() : new DropKeyspaceCqlGenerator(
              (DropKeyspaceSpecification) spec).toCql();

          template.execute(cql);
        }
      }

      if (scripts != null) {
View Full Code Here

Examples of org.springframework.core.task.AsyncTaskExecutor.execute()

    @Test
    public void testExecutionMethod() throws InterruptedException {
        AsyncTaskExecutor executor = new SimpleAsyncTaskExecutor("tTestExecutionMethod");
        SignallingRunnable runner = new SignallingRunnable("testExecutionMethod");
        executor.execute(runner, 125L);

        assertLastExecutionOperation(runner);
        assertCurrentThreadExecution();
    }
View Full Code Here

Examples of org.springframework.core.task.SimpleAsyncTaskExecutor.execute()

    final CountDownLatch latch = new CountDownLatch(100);
    final Set<Integer> results = new HashSet<Integer>();
    for (int i = 100; i < 200; i++) {
      results.add(i);
      final int j = i;
      executor.execute(new Runnable() {
        public void run() {
          String result = gw.send(j + "Hello world!"); // first 3 bytes is correlationid
          assertEquals(j + "Hello world!:echo", result);
          results.remove(j);
          latch.countDown();
View Full Code Here

Examples of org.springframework.core.task.TaskExecutor.execute()

    final CountDownLatch latch = new CountDownLatch(100);
    final Set<Integer> results = new HashSet<Integer>();
    for (int i = 100; i < 200; i++) {
      results.add(i);
      final int j = i;
      executor.execute(new Runnable() {
        public void run() {
          String result = gw.send(j + "Hello world!"); // first 3 bytes is correlationid
          assertEquals(j + "Hello world!:echo", result);
          results.remove(j);
          latch.countDown();
View Full Code Here

Examples of org.springframework.data.cassandra.core.CassandraAdminTemplate.execute()

    MappingCassandraConverter cassandraConverter = new MappingCassandraConverter();
    CassandraAdminTemplate cassandraTemplate = new CassandraAdminTemplate(AbstractEmbeddedCassandraIntegrationTest
        .cluster().connect(), cassandraConverter);

    CreateKeyspaceSpecification createKeyspaceSpecification = new CreateKeyspaceSpecification(keySpace).ifNotExists();
    cassandraTemplate.execute(createKeyspaceSpecification);
    cassandraTemplate.execute("USE " + keySpace);

    cassandraTemplate.createTable(true, CqlIdentifier.cqlId("users"), User.class, new HashMap<String, Object>());

    for (CassandraPersistentEntity<?> entity : cassandraTemplate.getConverter().getMappingContext()
View Full Code Here

Examples of org.springframework.data.hadoop.batch.pig.PigTasklet.execute()

  }

  @Test
  public void testTasklet() throws Exception {
    PigTasklet pt = ctx.getBean("tasklet", PigTasklet.class);
    pt.execute(null, null);
  }
}
View Full Code Here

Examples of org.springframework.data.jpa.repository.query.JpaQueryExecution.ModifyingExecution.execute()

    when(method.getReturnType()).thenReturn((Class) void.class);
    when(jpaQuery.createQuery(Mockito.any(Object[].class))).thenReturn(query);
    when(jpaQuery.getQueryMethod()).thenReturn(method);

    ModifyingExecution execution = new ModifyingExecution(method, em);
    execution.execute(jpaQuery, new Object[] {});

    verify(em, times(1)).clear();
  }

  @Test
View Full Code Here

Examples of org.springframework.data.mongodb.core.MongoTemplate.execute()

    List<Map<String, Object>> l = (List<Map<String, Object>>) dataMap.get("records");
    for (Map<String, Object> m : l) {
      Map<String, Object> rec = (Map<String, Object>) m.get("record");
      final BasicDBObject dbo = new BasicDBObject();
      dbo.putAll(rec);
      mongoTemplate.execute("records", new CollectionCallback<Object>() {
        public Object doInCollection(DBCollection collection) throws MongoException, DataAccessException {
          collection.insert(dbo);
          return null;
        }
      });
View Full Code Here

Examples of org.springframework.data.redis.core.StringRedisTemplate.execute()

    RedisConnectionFactory factory = mock(RedisConnectionFactory.class);
    final StringRedisTemplate template = spy(new StringRedisTemplate(factory));
    when(factory.getConnection()).thenReturn(conn);
    doReturn(stringConn).when(template).preProcessConnection(eq(conn), anyBoolean());

    template.execute(new SessionCallback<Object>() {
      @SuppressWarnings("rawtypes")
      public Object execute(RedisOperations operations) {
        checkConnection(template, stringConn);
        template.discard();
        assertSame(template, operations);
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.