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

com.wizarius.orm.database.handlers.WritableHandler Maven / Gradle / Ivy

There is a newer version: 0.0.27.3
Show newest version
package com.wizarius.orm.database.handlers;

import com.wizarius.orm.database.DBParsedField;
import com.wizarius.orm.database.interfaces.DBEntity;

import java.lang.reflect.Field;
import java.sql.PreparedStatement;
import java.sql.SQLException;

/**
 * Created by Vladyslav Shyshkin on 04.04.2018.
 */
public interface WritableHandler {
    /**
     * Set value in prepared statement
     *
     * @param field             field
     * @param entity            entity
     * @param parsedField       parsed field
     * @param parameterIndex    parameterIndex in prepare statement
     * @param preparedStatement prepare statement
     * @throws Exception on unable to build sql query on get field
     */
    void set(Field field,
             DBEntity entity,
             DBParsedField parsedField,
             int parameterIndex,
             PreparedStatement preparedStatement) throws Exception;

    /**
     * Set value in prepared statement
     *
     * @param value             value
     * @param parameterIndex    parameter index
     * @param preparedStatement prepared statement
     * @throws SQLException on unable to build sql query
     */
    void set(T value,
             int parameterIndex,
             PreparedStatement preparedStatement) throws SQLException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy