org.springframework.data.repository.core.support
Class PropertiesBasedNamedQueries
java.lang.Object
org.springframework.data.repository.core.support.PropertiesBasedNamedQueries
- All Implemented Interfaces:
- NamedQueries
public class PropertiesBasedNamedQueries
- extends Object
- implements NamedQueries
NamedQueries
implementation backed by a Properties
instance.
- Author:
- Oliver Gierke
Method Summary |
String |
getQuery(String queryName)
Returns the named query with the given name or null if none exists. |
boolean |
hasQuery(String queryName)
Returns whether the map contains a named query for the given name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY
public static final NamedQueries EMPTY
PropertiesBasedNamedQueries
public PropertiesBasedNamedQueries(Properties properties)
- Creates a new
PropertiesBasedNamedQueries
for the given Properties
instance.
- Parameters:
properties
-
hasQuery
public boolean hasQuery(String queryName)
- Description copied from interface:
NamedQueries
- Returns whether the map contains a named query for the given name. If this method returns true you can
expect
NamedQueries.getQuery(String)
to return a non-null query for the very same name.
- Specified by:
hasQuery
in interface NamedQueries
- Returns:
getQuery
public String getQuery(String queryName)
- Description copied from interface:
NamedQueries
- Returns the named query with the given name or null if none exists.
- Specified by:
getQuery
in interface NamedQueries
- Returns:
Copyright © 2012. All Rights Reserved.