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

com.j256.ormlite.support.GeneratedKeyHolder Maven / Gradle / Ivy

Go to download

Lightweight Object Relational Model (ORM) for persisting objects to SQL databases.

There is a newer version: 6.1
Show newest version
package com.j256.ormlite.support;

import java.sql.SQLException;

/**
 * The holder of a generated key so we can return the value of generated keys from update methods. Used by the
 * {@link DatabaseConnection#insert(String, Object[], com.j256.ormlite.field.FieldType[], GeneratedKeyHolder)} method.
 * 
 * @author graywatson
 */
public interface GeneratedKeyHolder {

	/**
	 * Return the name of the generated column we are interested in.
	 */
	public String getColumnName();

	/**
	 * Add the key number on the key holder. May be called multiple times.
	 */
	public void addKey(Number key) throws SQLException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy