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

org.icij.extract.mysql.SQLCodec Maven / Gradle / Ivy

There is a newer version: 7.3.0
Show newest version
package org.icij.extract.mysql;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;

public interface SQLCodec {

	/**
	 * Encode the "key", which is map of column names to values used to uniquely look up an object.
	 *
	 * @param o the object to encode
	 * @return a column name and key value map
	 */
	Map encodeKey(final Object o);

	/**
	 * Decode a result set into an object instance.
	 *
	 * @return a new instance of the codec type
	 */
	T decodeValue(final ResultSet rs) throws SQLException;

	/**
	 * Encode an object instance into a map of column names and values.
	 *
	 * @param o the instance to encode
	 * @return a column name and value map
	 */
	Map encodeValue(final Object o);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy