com.cefriel.template.io.Reader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mapping-template Show documentation
Show all versions of mapping-template Show documentation
A template-based component exploiting Apache Velocity to define
declarative mappings for schema and data transformations.
/*
* Copyright (c) 2019-2023 Cefriel.
*
* 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.cefriel.template.io;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
public interface Reader {
/**
* Add header prepended to each query executed through the Reader.
* @param header The string to be prepended.
*/
void setQueryHeader(String header);
/**
* Append a string to the header to be prepended to each query executed through the Reader.
* @param s The string to be appended to the current header.
*/
void appendQueryHeader(String s);
/**
* Execute the query returning a {@link java.util.List} of {@link java.util.Map}{@code }.
* Each map in the list represents a row of the results returned executing the query. Each key
* in the map is bound to the value returned for the considered row.
* @param query The query to be executed
* @return The result of the query
* @throws Exception
*/
List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy