Tabnine Logo
ClasspathStatementLocator.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.skife.jdbi.v2.ClasspathStatementLocator
constructor

Best Java code snippets using org.skife.jdbi.v2.ClasspathStatementLocator.<init> (Showing top 7 results out of 315)

origin: org.jdbi/jdbi

protected StatementLocator getStatementLocator()
{
  return new ClasspathStatementLocator();
}
origin: org.kill-bill.commons/killbill-jdbi

protected StatementLocator getStatementLocator()
{
  return new ClasspathStatementLocator();
}
origin: org.kill-bill.commons/killbill-jdbi

  @Test
  public void testCachesOriginalQueryWhenNotFound() throws Exception
  {
    StatementLocator statementLocator = new ClasspathStatementLocator();
    StatementContext statementContext = new TestingStatementContext(new HashMap<String, Object>()) {

      @Override
      public Class<?> getSqlObjectType() {
        return TestClasspathStatementLocator.class;
      }
    };

    String input = "missing query";
    String located = statementLocator.locate(input, statementContext);

    assertEquals(input, located); // first time just caches it

    located = statementLocator.locate(input, statementContext);

    assertEquals(input, located); // second time reads from cache
  }
}
origin: org.jdbi/jdbi

@Test
public void testCachesOriginalQueryWhenNotFound() throws Exception
{
  StatementLocator statementLocator = new ClasspathStatementLocator();
  StatementContext statementContext = new TestingStatementContext(new HashMap<String, Object>()) {
    @Override
    public Class<?> getSqlObjectType() {
      return TestClasspathStatementLocator.class;
    }
    @Override
    public Method getSqlObjectMethod() {
      return null;
    }
  };
  String input = "missing query";
  String located = statementLocator.locate(input, statementContext);
  assertEquals(input, located); // first time just caches it
  located = statementLocator.locate(input, statementContext);
  assertEquals(input, located); // second time reads from cache
}
origin: org.jdbi/jdbi

@Test
public void testCachesOriginalQueryByMethodWhenNotFound() throws Exception
{
  StatementLocator statementLocator = new ClasspathStatementLocator();
  StatementContext statementContext = new TestingStatementContext(new HashMap<String, Object>()) {
    @Override
    public Class<?> getSqlObjectType() {
      return TestClasspathStatementLocator.class;
    }
    @Override
    public Method getSqlObjectMethod() {
      try {
        return TestClasspathStatementLocator.class.getMethod("testCachesOriginalQueryByMethodWhenNotFound");
      } catch (NoSuchMethodException e) {
        throw new RuntimeException(e);
      }
    }
  };
  String input = "missing query";
  String located = statementLocator.locate(input, statementContext);
  assertEquals(input, located); // first time just caches it
  located = statementLocator.locate(input, statementContext);
  assertEquals(input, located); // second time reads from cache
}
origin: org.kill-bill.commons/killbill-jdbi

new ClasspathStatementLocator(),
builder,
new ColonPrefixNamedParamStatementRewriter(),
origin: org.jdbi/jdbi

new ClasspathStatementLocator(),
builder,
new ColonPrefixNamedParamStatementRewriter(),
org.skife.jdbi.v2ClasspathStatementLocator<init>

Popular methods of ClasspathStatementLocator

  • looksLikeSql
    Very basic sanity test to see if a string looks like it might be sql
  • isComment
  • left
  • mungify
  • selectClassLoader
    There *must* be a better place to put this without creating a helpers class just for it
  • stripStart

Popular in Java

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • compareTo (BigDecimal)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Reference (javax.naming)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now