org.ctoolkit.services.storage.criteria.CriteriaBuilder Maven / Gradle / Ivy
/*
* Copyright (c) 2017 Comvai, s.r.o. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.ctoolkit.services.storage.criteria;
/**
* Criteria builder interface in order to build implementation specific criteria and its expressions.
*
* @param a typed Query
* @param a persisted entity type
* @author Aurel Medvegy
*/
public interface CriteriaBuilder
{
/**
* Returns the implementation specific query builder.
*
* @param expression the criteria expression instance
* @return the implementation specific query builder
*/
Q build( BetweenExpression expression );
/**
* Returns the implementation specific query builder.
*
* @param expression the criteria expression instance
* @return the implementation specific query builder
*/
Q build( InExpression expression );
/**
* Returns the implementation specific query builder.
*
* @param expression the criteria expression instance
* @return the implementation specific query builder
*/
Q build( IdInExpression expression );
/**
* Returns the implementation specific query builder.
*
* @param expression the criteria expression instance
* @return the implementation specific query builder
*/
Q build( NameInExpression expression );
/**
* Returns the implementation specific query builder.
*
* @param expression the criteria expression instance
* @return the implementation specific query builder
*/
Q build( LikeExpression expression );
/**
* Returns the implementation specific query builder.
*
* @param expression the criteria expression instance
* @return the implementation specific query builder
*/
Q build( LogicalExpression expression );
/**
* Returns the implementation specific query builder.
*
* @param expression the criteria expression instance
* @return the implementation specific query builder
*/
Q build( NullExpression expression );
/**
* Returns the implementation specific query builder.
*
* @param expression the criteria expression instance
* @return the implementation specific query builder
*/
Q build( PropertyExpression expression );
/**
* Returns the implementation specific query builder.
*
* @param expression the criteria expression instance
* @return the implementation specific query builder
*/
Q build( SimpleExpression expression );
/**
* Returns the implementation specific query builder.
*
* @param expression the criteria expression instance
* @return the implementation specific query builder
*/
Q build( ReferenceIdExpression expression );
/**
* Returns the implementation specific query builder.
*
* @param expression the criteria expression instance
* @return the implementation specific query builder
*/
Q build( ReferenceNameExpression expression );
/**
* Returns the implementation specific query builder.
*
* @param criteria the criteria instance
* @return the implementation specific query builder
*/
Q build( Criteria criteria );
}