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

com.sap.cds.jdbc.hana.LocalizedViewSearchResolver Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
package com.sap.cds.jdbc.hana;

import java.util.Collection;
import java.util.Locale;

import com.sap.cds.jdbc.generic.AbstractSearchResolver;
import com.sap.cds.jdbc.spi.SearchResolver;
import com.sap.cds.ql.cqn.CqnElementRef;
import com.sap.cds.ql.cqn.CqnPredicate;
import com.sap.cds.ql.cqn.CqnSelect;
import com.sap.cds.reflect.CdsModel;
import com.sap.cds.reflect.CdsStructuredType;

/**
 * A {@link SearchResolver} implementation that renders LIKE expressions
 * directly on the searchable elements of the localized views generated by the
 * CDS compiler.
 */
public class LocalizedViewSearchResolver extends AbstractSearchResolver {

	public LocalizedViewSearchResolver(CdsModel cdsModel, Locale locale) {
		super(cdsModel, locale);
	}

	@Override
	protected void resolve(CqnSelect select, CqnPredicate search, CdsStructuredType targetType,
			Collection searchableRefs) {

			resolveUsingLocalizedViewWithLike(select, search, targetType, searchableRefs, false);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy