001package io.ebean.config.dbplatform; 002 003/** 004 * The types of Identity generation that can be defined. 005 */ 006public enum IdType { 007 008 /** 009 * Use a Database Identity (autoincrement) to generate the identity. 010 */ 011 IDENTITY, 012 013 /** 014 * Use a Database sequence to generate the identity. 015 * <p> 016 * Note: Some databases support getGeneratedKeys with sequences and this then 017 * does not involve an extra statement to return the id. 018 * </p> 019 */ 020 SEQUENCE, 021 022 /** 023 * Use an IdGenerator to generate the identity (prior to insert). 024 * <p> 025 * Note: There is a IdGenerator for UUID's and it is automatically assigned to 026 * id properties of type UUID. 027 * </p> 028 */ 029 GENERATOR, 030 031 /** 032 * Expected that the identity is externally set (for example a ISO code for 033 * country or currency or a user defined code for lookup tables). 034 * <p> 035 * Used when the key is a compound key or lookup table code. 036 * </p> 037 */ 038 EXTERNAL, 039 040 /** 041 * Auto mapping to platform preferred identity strategy. 042 */ 043 AUTO 044 045}