Spring Data Commons

org.springframework.data.repository.core.support
Class PropertiesBasedNamedQueries

java.lang.Object
  extended by 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

Field Summary
static NamedQueries EMPTY
           
 
Constructor Summary
PropertiesBasedNamedQueries(Properties properties)
          Creates a new PropertiesBasedNamedQueries for the given Properties instance.
 
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
 

Field Detail

EMPTY

public static final NamedQueries EMPTY
Constructor Detail

PropertiesBasedNamedQueries

public PropertiesBasedNamedQueries(Properties properties)
Creates a new PropertiesBasedNamedQueries for the given Properties instance.

Parameters:
properties -
Method Detail

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:

Spring Data Commons

Copyright © 2012. All Rights Reserved.