Package org.hawaiiframework.sql
Class SqlQueryResolverComposite
- java.lang.Object
-
- org.hawaiiframework.sql.SqlQueryResolverComposite
-
- All Implemented Interfaces:
SqlQueryResolver
,org.springframework.core.Ordered
public class SqlQueryResolverComposite extends Object implements SqlQueryResolver, org.springframework.core.Ordered
ASqlQueryResolver
that delegates to others.- Since:
- 2.0.0
- Author:
- Marcel Overdijk
-
-
Constructor Summary
Constructors Constructor Description SqlQueryResolverComposite()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOrder()
List<SqlQueryResolver>
getSqlQueryResolvers()
Return the list ofSqlQueryResolver
s to delegate to.String
resolveSqlQuery(String sqlQueryName)
Resolve the given sql query by name.void
setOrder(int order)
void
setSqlQueryResolvers(List<SqlQueryResolver> sqlQueryResolvers)
Set the list ofSqlQueryResolver
s to delegate to.
-
-
-
Method Detail
-
getSqlQueryResolvers
public List<SqlQueryResolver> getSqlQueryResolvers()
Return the list ofSqlQueryResolver
s to delegate to.
-
setSqlQueryResolvers
public void setSqlQueryResolvers(List<SqlQueryResolver> sqlQueryResolvers)
Set the list ofSqlQueryResolver
s to delegate to.
-
getOrder
public int getOrder()
- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int order)
-
resolveSqlQuery
public String resolveSqlQuery(String sqlQueryName) throws HawaiiException
Description copied from interface:SqlQueryResolver
Resolve the given sql query by name.To allow for
SqlQueryResolver
chaining, aViewResolver
should returnnull
if a sql query with the given name is not defined in it.- Specified by:
resolveSqlQuery
in interfaceSqlQueryResolver
- Parameters:
sqlQueryName
- name of the sql query to resolve- Returns:
- the sql query, or
null
if not found (optional, to allow forSqlQueryResolver
chaining) - Throws:
HawaiiException
- if the sql query could not be resolved (typically in case of problems resolving the sql query)
-
-