Class SqlObjectClasspathSqlLocator

All Implemented Interfaces:

public class SqlObjectClasspathSqlLocator extends Object implements SqlLocator
Locates SQL in .sql files on the classpath for use with SqlQuery. Given a class and method name, for example, load a classpath resource name like com/foo/Bar/query.sql and use it with the annotation. The contents are then parsed, cached, and returned for use by a statement.
See Also:
  • Constructor Details

    • SqlObjectClasspathSqlLocator

      public SqlObjectClasspathSqlLocator()
    • SqlObjectClasspathSqlLocator

      public SqlObjectClasspathSqlLocator(ClasspathSqlLocator locator)
  • Method Details

    • locate

      public String locate(Class<?> sqlObjectType, Method method, ConfigRegistry config)
      Description copied from interface: SqlLocator
      Locates and returns the SQL for the given SQL Object type and method.
      Specified by:
      locate in interface SqlLocator
      sqlObjectType - the SQL object type
      method - the method
      config - the config registry
      the SQL for the given method.