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

wtf.metio.yosql.codegen.dao.MethodExceptionHandler Maven / Gradle / Ivy

There is a newer version: 2023.5.3
Show newest version
/*
 * This file is part of yosql. It is subject to the license terms in the LICENSE file found in the top-level
 * directory of this distribution and at https://creativecommons.org/publicdomain/zero/1.0/. No part of yosql,
 * including this file, may be copied, modified, propagated, or distributed except according to the terms contained
 * in the LICENSE file.
 */

package wtf.metio.yosql.codegen.dao;

import com.squareup.javapoet.TypeName;
import wtf.metio.yosql.models.immutables.SqlConfiguration;

/**
 * Controls how methods handle exceptions.
 */
public interface MethodExceptionHandler {

    /**
     * Controls which exceptions are thrown from a method generated by the given SQL configuration.
     *
     * @param configuration The given configuration.
     * @return All thrown exceptions.
     */
    Iterable thrownExceptions(SqlConfiguration configuration);

    /**
     * Controls which exception is thrown for a converter method.
     *
     * @return The thrown exception.
     */
    TypeName thrownException();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy