APISonar


org.hibernate.type.StandardBasicTypes.DATE

> org > hibernate > type > StandardBasicTypes > DATE
org APIs hibernate APIs type APIs StandardBasicTypes APIs DATE APIs

Example 1
public Query setDate(int position, Date date) {
		setParameter(position, date, StandardBasicTypes.DATE);
		return this;
	}
Example 2
public void testCurrentDateFunction() {
		Map<String, SQLFunction> functions = dialect.getFunctions();
		SQLFunction sqlFunction = functions.get( "current_date" );

		Type firstArgumentType = null;
		Mapping mapping = null;
		assertEquals( StandardBasicTypes.DATE, sqlFunction.getReturnType( firstArgumentType, mapping ) );

		firstArgumentType = null;
		List arguments = Collections.emptyList();
		SessionFactoryImplementor factory = null;
		assertEquals( "today", sqlFunction.render( firstArgumentType, arguments, factory ) );
	}