Examples of prepare()


Examples of org.springframework.batch.item.adapter.HippyMethodInvoker.prepare()

    if (method.getName() != null) {
      HippyMethodInvoker invoker = new HippyMethodInvoker();
      invoker.setTargetObject(target);
      invoker.setTargetMethod(method.getName());
      try {
        invoker.prepare();
        return (JobExecution) invoker.invoke();
      }
      catch (Exception e) {
        throw new IllegalArgumentException("Could not create job execution from method: " + method.getName(),
            e);
View Full Code Here

Examples of org.springframework.beans.support.ArgumentConvertingMethodInvoker.prepare()

  public void testInvokeWithIntArgument() throws Exception {
    ArgumentConvertingMethodInvoker methodInvoker = new ArgumentConvertingMethodInvoker();
    methodInvoker.setTargetClass(MethodInvokerTests.TestClass1.class);
    methodInvoker.setTargetMethod("intArgument");
    methodInvoker.setArguments(new Object[] {new Integer(5)});
    methodInvoker.prepare();
    methodInvoker.invoke();

    methodInvoker = new ArgumentConvertingMethodInvoker();
    methodInvoker.setTargetClass(MethodInvokerTests.TestClass1.class);
    methodInvoker.setTargetMethod("intArgument");
View Full Code Here

Examples of org.springframework.data.jpa.repository.query.StringQuery.LikeParameterBinding.prepare()

  }

  private static void assertAugmentedValue(Type type, Object value) {

    LikeParameterBinding binding = new LikeParameterBinding("foo", type);
    assertThat(binding.prepare("value"), is(value));
  }
}
View Full Code Here

Examples of org.springframework.data.jpa.repository.query.StringQuery.ParameterBinding.prepare()

   */
  @Override
  protected void bind(Query jpaQuery, JpaParameter methodParameter, Object value, int position) {

    ParameterBinding binding = getBindingFor(jpaQuery, position, methodParameter);
    super.bind(jpaQuery, methodParameter, binding.prepare(value), position);
  }

  /* (non-Javadoc)
   * @see org.springframework.data.jpa.repository.query.ParameterBinder#canBindParameter(org.springframework.data.jpa.repository.query.JpaParameters.JpaParameter)
   */
 
View Full Code Here

Examples of org.springframework.data.mongodb.core.MongoTemplate.QueryCursorPreparer.prepare()

  }

  private DBCursor pepare(Query query) {

    CursorPreparer preparer = new MongoTemplate(factory).new QueryCursorPreparer(query, null);
    return preparer.prepare(cursor);
  }
}
View Full Code Here

Examples of org.springframework.mail.javamail.MimeMessagePreparator.prepare()

        email.setSubject("subject");
        email.setTextBody("text");

        MimeMessagePreparator preparator = sender.generateMimeMessagePreparator(email, "UTF-8");
        MimeMessage mimeMessage = createMimeMessage();
        preparator.prepare(mimeMessage);

        assertEquals(1, mimeMessage.getFrom().length);
        InternetAddress address = (InternetAddress)mimeMessage.getFrom()[0];
        assertEquals("From", address.getPersonal());
        assertEquals("from@bla.com", address.getAddress());
View Full Code Here

Examples of org.springframework.scheduling.support.MethodInvokingRunnable.prepare()

          MethodInvokingRunnable runnable = new MethodInvokingRunnable();
          runnable.setTargetObject(bean);
          runnable.setTargetMethod(method.getName());
          runnable.setArguments(new Object[0]);
          try {
            runnable.prepare();
          }
          catch (Exception e) {
            throw new IllegalStateException("failed to prepare task", e);
          }
          boolean processedSchedule = false;
View Full Code Here

Examples of org.springframework.util.MethodInvoker.prepare()

  public void testInvokeWithNullArgument() throws Exception {
    MethodInvoker methodInvoker = new MethodInvoker();
    methodInvoker.setTargetClass(MethodInvokerTests.TestClass1.class);
    methodInvoker.setTargetMethod("nullArgument");
    methodInvoker.setArguments(new Object[] {null});
    methodInvoker.prepare();
    methodInvoker.invoke();
  }

  public void testInvokeWithIntArgument() throws Exception {
    ArgumentConvertingMethodInvoker methodInvoker = new ArgumentConvertingMethodInvoker();
View Full Code Here

Examples of org.teiid.cache.Cachable.prepare()

    SessionAwareCache<Cachable> cache = new SessionAwareCache<Cachable>();
   
    CacheID id = new CacheID(buildWorkContext(), new ParseInfo(), "SELECT * FROM FOO");
   
    Cachable result = Mockito.mock(Cachable.class);
    Mockito.stub(result.prepare((Cache)anyObject(), (BufferManager)anyObject())).toReturn(true);
    Mockito.stub(result.restore((Cache)anyObject(), (BufferManager)anyObject())).toReturn(true);
       
    cache.put(id, Determinism.USER_DETERMINISTIC, result, null);
   
    // make sure that in the case of session specific; we do not call prepare
View Full Code Here

Examples of org.terrier.matching.PostingListManager.prepare()

        System.err
        .println("ERROR: Wrong function id specified for ProximityScoreModifierTREC2009");
      }
 
      PostingListManager plm = new PostingListManager(index, index.getCollectionStatistics(), terms);
      plm.prepare(false);
      phraseTerms = new String[plm.getNumTerms()];
      EntryStatistics[] es = new EntryStatistics[plm.getNumTerms()];
      IterablePosting[] ips = new IterablePosting[plm.getNumTerms()];
     
      for (int i = 0; i < plm.getNumTerms(); i++) {
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.