com.j256.ormlite.support.GeneratedKeyHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ormlite-core Show documentation
Show all versions of ormlite-core Show documentation
Lightweight Object Relational Model (ORM) for persisting objects to SQL databases.
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;
}