io.sphere.sdk.search.model.SearchModelImpl Maven / Gradle / Ivy
package io.sphere.sdk.search.model;
import io.sphere.sdk.models.Base;
import javax.annotation.Nullable;
public class SearchModelImpl extends Base implements SearchModel {
@Nullable
private final SearchModel parent;
@Nullable
private final String pathSegment;
protected SearchModelImpl(@Nullable final SearchModel parent, @Nullable final String pathSegment) {
this.parent = parent;
this.pathSegment = pathSegment;
}
//for testing
SearchModelImpl appended(final String pathSegment) {
return new SearchModelImpl<>(this, pathSegment) ;
}
@Nullable
@Override
public String getPathSegment() {
return pathSegment;
}
@Nullable
@Override
public SearchModel getParent() {
return parent;
}
protected SearchModel searchModel(final String pathSegment) {
return new SearchModelImpl<>(this, pathSegment);
}
protected BooleanSearchModel booleanSearchModel(final String pathSegment) {
return new BooleanSearchModel<>(this, pathSegment);
}
protected StringSearchModel stringSearchModel(final String pathSegment) {
return new StringSearchModel<>(this, pathSegment);
}
protected NumberSearchModel numberSearchModel(final String pathSegment) {
return new NumberSearchModel<>(this, pathSegment);
}
protected DateSearchModel dateSearchModel(final String pathSegment) {
return new DateSearchModel<>(this, pathSegment);
}
protected TimeSearchModel timeSearchModel(final String pathSegment) {
return new TimeSearchModel<>(this, pathSegment);
}
protected DateTimeSearchModel datetimeSearchModel(final String pathSegment) {
return new DateTimeSearchModel<>(this, pathSegment);
}
protected LocalizedStringFilterSearchModel localizedStringFilterSearchModel(final String pathSegment) {
return new LocalizedStringFilterSearchModel<>(this, pathSegment);
}
protected LocalizedStringFacetSearchModel localizedStringFacetSearchModel(final String pathSegment) {
return new LocalizedStringFacetSearchModel<>(this, pathSegment);
}
protected EnumFilterSearchModel enumFilterSearchModel(final String pathSegment) {
return new EnumFilterSearchModel<>(this, pathSegment);
}
protected EnumFacetSearchModel enumFacetSearchModel(final String pathSegment) {
return new EnumFacetSearchModel<>(this, pathSegment);
}
protected LocalizedEnumFilterSearchModel localizedEnumFilterSearchModel(final String pathSegment) {
return new LocalizedEnumFilterSearchModel<>(this, pathSegment);
}
protected LocalizedEnumFacetSearchModel localizedEnumFacetSearchModel(final String pathSegment) {
return new LocalizedEnumFacetSearchModel<>(this, pathSegment);
}
protected MoneyFilterSearchModel moneyFilterSearchModel(final String pathSegment) {
return new MoneyFilterSearchModel<>(this, pathSegment);
}
protected MoneyFacetSearchModel moneyFacetSearchModel(final String pathSegment) {
return new MoneyFacetSearchModel<>(this, pathSegment);
}
protected ReferenceFilterSearchModel referenceFilterSearchModel(final String pathSegment) {
return new ReferenceFilterSearchModel<>(this, pathSegment);
}
protected ReferenceFacetSearchModel referenceFacetSearchModel(final String pathSegment) {
return new ReferenceFacetSearchModel<>(this, pathSegment);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy