java.lang.Object
org.seasar.doma.jdbc.AbstractSqlFileRepository
- All Implemented Interfaces:
SqlFileRepository
- Direct Known Subclasses:
GreedyCacheSqlFileRepository,NoCacheSqlFileRepository
A skeletal implementation of the
SqlFileRepository interface.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final SqlFilecreateSqlFile(Method method, String path, Dialect dialect) Creates the SQL file.protected final StringgetPrimaryPath(String path, Dialect dialect) Returns the primary path to find SQL file for specific RDBMS.protected StringRetrieves the SQL string from the SQL file.final SqlFilegetSqlFile(Method method, String path, Dialect dialect) Returns the SQL file.protected abstract SqlFilegetSqlFileWithCacheControl(Method method, String path, Dialect dialect) Returns the SQL file in consideration of cache control.protected final SqlNodeParses the SQL string.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.seasar.doma.jdbc.SqlFileRepository
clearCache
-
Constructor Details
-
AbstractSqlFileRepository
public AbstractSqlFileRepository()
-
-
Method Details
-
getSqlFile
Description copied from interface:SqlFileRepositoryReturns the SQL file.- Specified by:
getSqlFilein interfaceSqlFileRepository- Parameters:
method- the DAO methodpath- the SQL file pathdialect- the SQL dialect- Returns:
- the SQL file
-
getSqlFileWithCacheControl
Returns the SQL file in consideration of cache control.- Parameters:
method- the Dao methodpath- the SQL file pathdialect- the dialect- Returns:
- the SQL file
- Throws:
SqlFileNotFoundException- if the SQL file is not foundJdbcException- if an error occurs
-
createSqlFile
Creates the SQL file.- Parameters:
method- the Dao methodpath- the SQL file pathdialect- the dialect- Returns:
- the SQL file
-
getPrimaryPath
Returns the primary path to find SQL file for specific RDBMS.- Parameters:
path- the SQL file pathdialect- the dialect- Returns:
- the primary path
-
parse
Parses the SQL string.- Parameters:
sql- the SQL string- Returns:
- the SQL node
-
getSql
Retrieves the SQL string from the SQL file.- Parameters:
path- the SQL file path- Returns:
- the SQL string
-