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

com.ibm.fhir.persistence.jdbc.domain.SearchParam Maven / Gradle / Ivy

There is a newer version: 4.11.1
Show newest version
/*
 * (C) Copyright IBM Corp. 2021
 *
 * SPDX-License-Identifier: Apache-2.0
 */

package com.ibm.fhir.persistence.jdbc.domain;

import com.ibm.fhir.persistence.exception.FHIRPersistenceException;
import com.ibm.fhir.search.parameters.QueryParameter;

/**
 * Represents a search parameter in the search domain model
 */
public abstract class SearchParam {
    private final String rootResourceType;

    private final String name;

    private final QueryParameter queryParameter;

    protected SearchParam(String rootResourceType, String name, QueryParameter queryParameter) {
        this.rootResourceType = rootResourceType;
        this.name = name;
        this.queryParameter = queryParameter;
    }

    /**
     * Getter for the parameter's name
     * @return
     */
    protected String getName() {
        return this.name;
    }

    /**
     * Getter for the root resource type of the query
     * @return
     */
    protected String getRootResourceType() {
        return this.rootResourceType;
    }

    /**
     * Getter for the {@link QueryParameter} we've wrapped
     * @return
     */
    protected QueryParameter getQueryParameter() {
        return this.queryParameter;
    }

    public abstract  T visit(T query, SearchQueryVisitor visitor) throws FHIRPersistenceException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy