GeneratorType.java
// license-header java merge-point
//
// Attention: Generated code! Do not modify by hand!
// Generated by: TypeSafeEnumeration.vsl in andromda-java-cartridge.
// Model Class: JDBCMetadataModel::org.andromda.jdbcmetadata::GeneratorType
// Metafacade: org.andromda.metafacades.uml.Enumeration
//
package org.andromda.jdbcmetadata;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* <p>Either the standard javax.persistence Generator type or a hibernate-specific type (strategy)
* or a customized type implemented through
* @org.hibernate.annotations.GenericGenerator(name="${attribute.generatorName}",
* strategy="${attribute.generatorGenericStrategy}")</p>
*/
public enum GeneratorType
{
/** TODO: Model Documentation for Enumeration Literal AUTO value "auto" */
AUTO("auto"),
/** TODO: Model Documentation for Enumeration Literal IDENTITY value "identity" */
IDENTITY("identity"),
/** TODO: Model Documentation for Enumeration Literal SEQUENCE value "sequence" */
SEQUENCE("sequence"),
/** TODO: Model Documentation for Enumeration Literal TABLE value "table" */
TABLE("table"),
/** TODO: Model Documentation for Enumeration Literal INCREMENT value "increment" */
INCREMENT("increment"),
/** TODO: Model Documentation for Enumeration Literal HILO value "hilo" */
HILO("hilo"),
/** TODO: Model Documentation for Enumeration Literal SEQHILO value "seqhilo" */
SEQHILO("seqhilo"),
/** TODO: Model Documentation for Enumeration Literal UUID value "uuid" */
UUID("uuid"),
/** TODO: Model Documentation for Enumeration Literal UUID2 value "uuid2" */
UUID2("uuid2"),
/** TODO: Model Documentation for Enumeration Literal GUID value "guid" */
GUID("guid"),
/** TODO: Model Documentation for Enumeration Literal NATIVE value "native" */
NATIVE("native"),
/** TODO: Model Documentation for Enumeration Literal ASSIGNED value "assigned" */
ASSIGNED("assigned"),
/** TODO: Model Documentation for Enumeration Literal SELECT value "select" */
SELECT("select"),
/** TODO: Model Documentation for Enumeration Literal FOREIGN value "foreign" */
FOREIGN("foreign"),
/** TODO: Model Documentation for Enumeration Literal SEQUENCE_IDENTITY value "SEQUENCE_IDENTITY" */
SEQUENCE_IDENTITY("SEQUENCE_IDENTITY");
/**
* The serial version UID of this class. Needed for serialization.
*/
private static final long serialVersionUID = -2976361512778720647L;
private final String enumValue;
/**
* The constructor with enumeration literal value allowing
* super classes to access it.
*/
private GeneratorType(String value)
{
this.enumValue = value;
}
/*
* Do not override this method directly. Use an alternate name
* if providing a different toString implementation
* @see Object#toString()
@Override
public String toString()
{
return String.valueOf(this.enumValue);
}
*/
/**
* Retrieves an instance of GeneratorType from <code>its name</code>.
*
* @param name the name to create the GeneratorType from.
* @return The enumeration literal named after the 'name' argument
*/
public static GeneratorType fromString(String name)
{
return GeneratorType.valueOf(name);
}
/**
* Returns an enumeration literal String <code>value</code>.
* Required by JAXB2 enumeration implementation
*
* @return String with corresponding value
*/
public String value()
{
return this.enumValue;
}
/**
* Returns an instance of GeneratorType from String <code>value</code>.
* Required by JAXB2 enumeration implementation
*
* @param value the value to create the GeneratorType from.
* @return static Enumeration with corresponding value
*/
public static GeneratorType fromValue(String value)
{
for (GeneratorType enumName: GeneratorType.values())
{
if (enumName.getValue().equals(value))
{
return enumName;
}
}
throw new IllegalArgumentException("GeneratorType.fromValue(" + value + ')');
}
/**
* Gets the underlying value of this type safe enumeration.
* This method is necessary to comply with DaoBase implementation.
* @return The name of this literal.
*/
public String getValue()
{
return this.enumValue;
}
/**
* Returns an unmodifiable list containing the literals that are known by this enumeration.
*
* @return A List containing the actual literals defined by this enumeration, this list
* can not be modified.
*/
public static List<String> literals()
{
return GeneratorType.literals;
}
/**
* Returns an unmodifiable list containing the names of the literals that are known
* by this enumeration.
*
* @return A List containing the actual names of the literals defined by this
* enumeration, this list can not be modified.
*/
public static List<String> names()
{
return GeneratorType.names;
}
private static Map<String, GeneratorType> values = new LinkedHashMap<String, GeneratorType>(15, 1);
private static List<String> literals = new ArrayList<String>(15);
private static List<String> names = new ArrayList<String>(15);
private static List<GeneratorType> valueList = new ArrayList<GeneratorType>(15);
/**
* Initializes the values.
*/
static
{
synchronized (GeneratorType.values)
{
GeneratorType.values.put(AUTO.enumValue, AUTO);
GeneratorType.values.put(IDENTITY.enumValue, IDENTITY);
GeneratorType.values.put(SEQUENCE.enumValue, SEQUENCE);
GeneratorType.values.put(TABLE.enumValue, TABLE);
GeneratorType.values.put(INCREMENT.enumValue, INCREMENT);
GeneratorType.values.put(HILO.enumValue, HILO);
GeneratorType.values.put(SEQHILO.enumValue, SEQHILO);
GeneratorType.values.put(UUID.enumValue, UUID);
GeneratorType.values.put(UUID2.enumValue, UUID2);
GeneratorType.values.put(GUID.enumValue, GUID);
GeneratorType.values.put(NATIVE.enumValue, NATIVE);
GeneratorType.values.put(ASSIGNED.enumValue, ASSIGNED);
GeneratorType.values.put(SELECT.enumValue, SELECT);
GeneratorType.values.put(FOREIGN.enumValue, FOREIGN);
GeneratorType.values.put(SEQUENCE_IDENTITY.enumValue, SEQUENCE_IDENTITY);
}
synchronized (GeneratorType.valueList)
{
GeneratorType.valueList.add(AUTO);
GeneratorType.valueList.add(IDENTITY);
GeneratorType.valueList.add(SEQUENCE);
GeneratorType.valueList.add(TABLE);
GeneratorType.valueList.add(INCREMENT);
GeneratorType.valueList.add(HILO);
GeneratorType.valueList.add(SEQHILO);
GeneratorType.valueList.add(UUID);
GeneratorType.valueList.add(UUID2);
GeneratorType.valueList.add(GUID);
GeneratorType.valueList.add(NATIVE);
GeneratorType.valueList.add(ASSIGNED);
GeneratorType.valueList.add(SELECT);
GeneratorType.valueList.add(FOREIGN);
GeneratorType.valueList.add(SEQUENCE_IDENTITY);
GeneratorType.valueList = Collections.unmodifiableList(valueList);
}
synchronized (GeneratorType.literals)
{
GeneratorType.literals.add(AUTO.enumValue);
GeneratorType.literals.add(IDENTITY.enumValue);
GeneratorType.literals.add(SEQUENCE.enumValue);
GeneratorType.literals.add(TABLE.enumValue);
GeneratorType.literals.add(INCREMENT.enumValue);
GeneratorType.literals.add(HILO.enumValue);
GeneratorType.literals.add(SEQHILO.enumValue);
GeneratorType.literals.add(UUID.enumValue);
GeneratorType.literals.add(UUID2.enumValue);
GeneratorType.literals.add(GUID.enumValue);
GeneratorType.literals.add(NATIVE.enumValue);
GeneratorType.literals.add(ASSIGNED.enumValue);
GeneratorType.literals.add(SELECT.enumValue);
GeneratorType.literals.add(FOREIGN.enumValue);
GeneratorType.literals.add(SEQUENCE_IDENTITY.enumValue);
GeneratorType.literals = Collections.unmodifiableList(literals);
}
synchronized (GeneratorType.names)
{
GeneratorType.names.add("AUTO");
GeneratorType.names.add("IDENTITY");
GeneratorType.names.add("SEQUENCE");
GeneratorType.names.add("TABLE");
GeneratorType.names.add("INCREMENT");
GeneratorType.names.add("HILO");
GeneratorType.names.add("SEQHILO");
GeneratorType.names.add("UUID");
GeneratorType.names.add("UUID2");
GeneratorType.names.add("GUID");
GeneratorType.names.add("NATIVE");
GeneratorType.names.add("ASSIGNED");
GeneratorType.names.add("SELECT");
GeneratorType.names.add("FOREIGN");
GeneratorType.names.add("SEQUENCE_IDENTITY");
GeneratorType.names = Collections.unmodifiableList(names);
}
}
// type-safe-enumeration-object java merge-point
}