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

com.avaje.ebeaninternal.api.SpiExpressionList Maven / Gradle / Ivy

package com.avaje.ebeaninternal.api;

import java.util.ArrayList;

import com.avaje.ebean.ExpressionFactory;
import com.avaje.ebean.ExpressionList;
import com.avaje.ebean.event.BeanQueryRequest;
import com.avaje.ebeaninternal.server.deploy.BeanDescriptor;
import com.avaje.ebeaninternal.server.query.LuceneResolvableRequest;

/**
 * Internal extension of ExpressionList.
 */
public interface SpiExpressionList extends ExpressionList {

    public boolean isLuceneResolvable(LuceneResolvableRequest req);
    
    public SpiLuceneExpr createLuceneExpr(SpiExpressionRequest request, SpiLuceneExpr.ExprOccur occur);

    /**
     * Trim the path for filterMany() expressions.
     */
    public void trimPath(int prefixTrim);
    
	/**
	 * Restore the ExpressionFactory after deserialisation.
	 */
	public void setExpressionFactory(ExpressionFactory expr);

    /**
     * Process "Many" properties populating ManyWhereJoins.
     * 

* Predicates on Many properties require an extra independent * join clause. *

*/ public void containsMany(BeanDescriptor desc, ManyWhereJoins manyWhereJoins); /** * Return true if this list is empty. */ public boolean isEmpty(); /** * Concatenate the expression sql into a String. *

* The list of expressions are evaluated in order building a sql statement * with bind parameters. *

*/ public String buildSql(SpiExpressionRequest request); /** * Combine the expression bind values into a list. *

* Expressions are evaluated in order and all the resulting bind values are * returned as a List. *

* * @return the list of all the bind values in order. */ public ArrayList buildBindValues(SpiExpressionRequest request); /** * Calculate a hash based on the expressions but excluding the actual bind * values. */ public int queryPlanHash(BeanQueryRequest request); }