Package org.milyn.scribe.reflection

Examples of org.milyn.scribe.reflection.LookupMethod


  /* (non-Javadoc)
   * @see org.milyn.scribe.invoker.DAOInvoker#findBy(java.lang.String, java.util.Map)
   */
  public Object lookup(final String name, final Map<String, ?> parameters) {

    final LookupMethod method = daoRuntimeInfo.getLookupWithNamedParametersMethod(name);

    assertMethod(method, name, Lookup.class);

    return method.invoke(dao, parameters);

  }
View Full Code Here


  /* (non-Javadoc)
   * @see org.milyn.scribe.invoker.DAOInvoker#findBy(java.lang.String, java.util.Map)
   */
  public Object lookup(final String name, final Object ... parameters) {

    final LookupMethod method = daoRuntimeInfo.getLookupWithNamedParametersMethod(name);

    assertMethod(method, name, Lookup.class);

    return method.invoke(dao, parameters);

  }
View Full Code Here

  }


  public void test_getFindByMethod() {

    LookupMethod method = fullAnnotatedDaoRuntimeInfo.getLookupWithNamedParametersMethod("id");

    assertNotNull(method);

    Map<String, Object> params = new HashMap<String, Object>();
    params.put("id", 1L);

    method.invoke(fullAnnotatedDao, params);

    verify(fullAnnotatedDao).findById(eq(1L));

    assertNull(minimumAnnotatedDaoRuntimeInfo.getLookupWithNamedParametersMethod("id"));
  }
View Full Code Here

TOP

Related Classes of org.milyn.scribe.reflection.LookupMethod

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.