com.wizarius.orm.database.handlers.ReadableHandler Maven / Gradle / Ivy
Show all versions of wizarius-orm Show documentation
package com.wizarius.orm.database.handlers;
import com.wizarius.orm.database.entityreader.DBParsedField;
import java.lang.reflect.Field;
import java.sql.ResultSet;
/**
* Created by Vladyslav Shyshkin on 29.12.2017.
*
* TODO remove exception
*/
public interface ReadableHandler {
/**
* Set data into object
*
* @param field field in instance
* @param instance instance
* @param rs result set
* @param resultSetFieldName result set field name
* @param parsedField parsed field
* @throws Exception on unable to set data to instance
*/
void set(Field field, Object instance, ResultSet rs, String resultSetFieldName, DBParsedField parsedField) throws Exception;
/**
* Set data into object
*
* @param field field in instance
* @param instance instnace
* @param rs result set
* @param columnIndex columnt index
* @param parsedField parsed field
* @throws Exception on unable to set data to instnace
*/
void set(Field field, Object instance, ResultSet rs, int columnIndex, DBParsedField parsedField) throws Exception;
}