org.jminor.common.model
Enum IdSource

java.lang.Object
  extended by java.lang.Enum<IdSource>
      extended by org.jminor.common.model.IdSource
All Implemented Interfaces:
Serializable, Comparable<IdSource>

public enum IdSource
extends Enum<IdSource>

A enum representing the possible ways of retrieving a new ID value.


Enum Constant Summary
AUTO_INCREMENT
          the id value is set automatically from a sequence (e.g. by trigger) or is automatically incremented
MAX_PLUS_ONE
          the id value is derived from the max id value in the table
NONE
          the id is set manually or can be disregarded
QUERY
          the id source is a query
SEQUENCE
          the id value should be selected from a sequence
 
Method Summary
 boolean isAutoGenerated()
           
 boolean isAutoIncrement()
           
 boolean isQueried()
           
static IdSource valueOf(String name)
          Returns the enum constant of this type with the specified name.
static IdSource[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AUTO_INCREMENT

public static final IdSource AUTO_INCREMENT
the id value is set automatically from a sequence (e.g. by trigger) or is automatically incremented


MAX_PLUS_ONE

public static final IdSource MAX_PLUS_ONE
the id value is derived from the max id value in the table


NONE

public static final IdSource NONE
the id is set manually or can be disregarded


SEQUENCE

public static final IdSource SEQUENCE
the id value should be selected from a sequence


QUERY

public static final IdSource QUERY
the id source is a query

Method Detail

values

public static IdSource[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (IdSource c : IdSource.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static IdSource valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

isQueried

public boolean isQueried()

isAutoIncrement

public boolean isAutoIncrement()

isAutoGenerated

public boolean isAutoGenerated()