FileDocCategorySizeDatePackage
SQLFunctionRegistry.javaAPI DocHibernate 3.2.51109Mon May 08 15:59:20 BST 2006org.hibernate.dialect.function

SQLFunctionRegistry

public class SQLFunctionRegistry extends Object

Fields Summary
private final org.hibernate.dialect.Dialect
dialect
private final Map
userFunctions
Constructors Summary
public SQLFunctionRegistry(org.hibernate.dialect.Dialect dialect, Map userFunctions)

		this.dialect = dialect;
		this.userFunctions = new HashMap();
		this.userFunctions.putAll( userFunctions );
	
Methods Summary
public SQLFunctionfindSQLFunction(java.lang.String functionName)

		String name = functionName.toLowerCase();
		SQLFunction userFunction = (SQLFunction) userFunctions.get( name );
		
		return userFunction!=null?userFunction:(SQLFunction) dialect.getFunctions().get(name); // TODO: lowercasing done here. Was done "at random" before; maybe not needed at all ?
	
public booleanhasFunction(java.lang.String functionName)

		String name = functionName.toLowerCase();
		boolean hasUserFunction = userFunctions.containsKey ( name );
		
		return hasUserFunction || dialect.getFunctions().containsKey ( name ); // TODO: toLowerCase was not done before. Only used in Template.