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

com.jpaquery.core.impl.BetweenPathImpl Maven / Gradle / Ivy

There is a newer version: 1.1.3
Show newest version
package com.jpaquery.core.impl;

import com.jpaquery.core.facade.BetweenPath;
import com.jpaquery.core.facade.JpaQuery;
import com.jpaquery.core.facade.Where;
import com.jpaquery.core.facade.WherePath.WherePathType;

public class BetweenPathImpl implements BetweenPath {

	JpaQueryHandler finderHandler;
	JpaQueryImpl finderImpl;
	WhereImpl whereImpl;
	WherePathImpl wherePathImpl;
	WherePathType wherePathType;
	boolean ifExist;
	Object arg;

	public BetweenPathImpl(JpaQueryHandler finderHandler, JpaQueryImpl finderImpl,
			WhereImpl whereImpl, WherePathImpl wherePathImpl,
			WherePathType wherePathType, boolean ifExist, Object arg) {
		this.finderHandler = finderHandler;
		this.finderImpl = finderImpl;
		this.whereImpl = whereImpl;
		this.wherePathImpl = wherePathImpl;
		this.wherePathType = wherePathType;
		this.ifExist = ifExist;
		this.arg = arg;
	}

	public Where and(T obj) {
		Object secondArg = finderHandler.getPathInfo();
		secondArg = secondArg == null ? obj : secondArg;
		wherePathImpl.fillPath(wherePathType, ifExist, arg, secondArg);
		return whereImpl;
	}

	public Where and(JpaQuery subFinder) {
		wherePathImpl.fillPath(wherePathType, ifExist, arg, subFinder);
		return whereImpl;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy