FileDocCategorySizeDatePackage
NoArgSQLFunction.javaAPI DocHibernate 3.2.51430Fri Apr 29 10:32:30 BST 2005org.hibernate.dialect.function

NoArgSQLFunction

public class NoArgSQLFunction extends Object implements SQLFunction
A function which takes no arguments
author
Michi

Fields Summary
private org.hibernate.type.Type
returnType
private boolean
hasParenthesesIfNoArguments
private String
name
Constructors Summary
public NoArgSQLFunction(String name, org.hibernate.type.Type returnType)

        this(name, returnType, true);
    
public NoArgSQLFunction(String name, org.hibernate.type.Type returnType, boolean hasParenthesesIfNoArguments)

        this.returnType = returnType;
        this.hasParenthesesIfNoArguments = hasParenthesesIfNoArguments;
        this.name = name;
    
Methods Summary
public org.hibernate.type.TypegetReturnType(org.hibernate.type.Type columnType, org.hibernate.engine.Mapping mapping)

        return returnType;
    
public booleanhasArguments()

        return false;
    
public booleanhasParenthesesIfNoArguments()

        return hasParenthesesIfNoArguments;
    
public java.lang.Stringrender(java.util.List args, org.hibernate.engine.SessionFactoryImplementor factory)

    	if ( args.size()>0 ) {
    		throw new QueryException("function takes no arguments: " + name);
    	}
    	return hasParenthesesIfNoArguments ? name + "()" : name;