001package io.ebean.config;
002
003/**
004 * A customer Id generator that can be registered with Ebean and
005 * assigned to @Id properties using the name attribute of @GeneratedValue.
006 */
007public interface IdGenerator {
008
009  /**
010   * Return the next Id value.
011   */
012  Object nextValue();
013
014  /**
015   * Return the name of the IdGenerator.
016   * <p>
017   * The name is used to assign the IdGenerator to a property using
018   * <code>@GeneratedValue(name="myGeneratorName")</code>
019   * </p>
020   */
021  String getName();
022}