com.impetus.client.es.ESQuery Maven / Gradle / Ivy
/*******************************************************************************
* * Copyright 2013 Impetus Infotech.
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* *
* * http://www.apache.org/licenses/LICENSE-2.0
* *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* * See the License for the specific language governing permissions and
* * limitations under the License.
******************************************************************************/
package com.impetus.client.es;
import java.util.Iterator;
import java.util.List;
import javax.persistence.Query;
import javax.persistence.metamodel.EntityType;
import org.elasticsearch.index.query.AndFilterBuilder;
import org.elasticsearch.index.query.FilterBuilder;
import org.elasticsearch.index.query.OrFilterBuilder;
import org.elasticsearch.index.query.RangeFilterBuilder;
import org.elasticsearch.index.query.TermFilterBuilder;
import com.impetus.kundera.client.Client;
import com.impetus.kundera.metadata.model.EntityMetadata;
import com.impetus.kundera.metadata.model.KunderaMetadata;
import com.impetus.kundera.metadata.model.MetamodelImpl;
import com.impetus.kundera.persistence.EntityReader;
import com.impetus.kundera.persistence.PersistenceDelegator;
import com.impetus.kundera.query.KunderaQuery;
import com.impetus.kundera.query.KunderaQuery.FilterClause;
import com.impetus.kundera.query.QueryImpl;
/**
* @author vivek.mishra Implementation of query interface {@link Query}.
*/
public class ESQuery extends QueryImpl
{
/**
* Constructor using fields.
*
* @param query
* jpa query.
* @param persistenceDelegator
* persistence delegator.
*/
public ESQuery(String query, PersistenceDelegator persistenceDelegator)
{
super(query, persistenceDelegator);
}
public ESQuery(String query, KunderaQuery kunderaQuery, PersistenceDelegator persistenceDelegator)
{
super(query, persistenceDelegator);
this.kunderaQuery = kunderaQuery;
}
/*
* (non-Javadoc)
*
* @see
* com.impetus.kundera.query.QueryImpl#populateEntities(com.impetus.kundera
* .metadata.model.EntityMetadata, com.impetus.kundera.client.Client)
*/
@Override
protected List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy