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

com.github.antelopeframework.mybatis.criterion.NotNullExpression Maven / Gradle / Ivy

There is a newer version: 1.1.5
Show newest version
package com.github.antelopeframework.mybatis.criterion;

/**
 * Constrains a property to be non-null
 * 
 * @author yangzhi.yzh
 *
 */
public class NotNullExpression  implements Criterion {
	private static final long serialVersionUID = 1L;

	private final String column;
	
	/**
	 * Constructs a NotNullExpression
	 *
	 * @param column The name of the property to check for null
	 *
	 * @see Restrictions#isNull
	 */
	protected NotNullExpression(String column) {
		this.column = column;
	}
	
	@Override
	public String toSqlString(CriteriaQuery criteriaQuery) {
		return column + " is not null";
	}

	@Override
	public TypedValue[] getTypedValues(CriteriaQuery criteriaQuery) {
		return NO_VALUES;
	}
	
	@Override
	public String toString() {
		return column + " is not null";
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy