All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.googlecode.mjorm.mql.functions.NowVariableFunction Maven / Gradle / Ivy

package com.googlecode.mjorm.mql.functions;

import java.util.Date;

import com.googlecode.mjorm.mql.AbstractMqlVariableFunction;

public abstract class NowVariableFunction
	extends AbstractMqlVariableFunction {

	public static final NowVariableFunction INSTANCE = createFunction("now");

	public static NowVariableFunction createFunction(final String name) {
		return new NowVariableFunction() {
			@Override
			protected void init() {
				setExactArgs(0);
				setFunctionName(name);
			}
		};
	}

	@Override
	protected Object doInvoke(Object[] values) {
		return new Date();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy