EmployeeContractType.java
// license-header java merge-point
/* Autogenerated by AndroMDA Enumeration.vsl in andromda-ejb3-cartridge on 08/08/2014 12:21:07 - do not edit */
package org.andromda.demo.ejb3.employee;
import java.util.ArrayList;
import java.util.Collection;
/**
* Autogenerated enumeration EmployeeContractType.
*
* <p>
* TODO: Model Documentation for org.andromda.demo.ejb3.employee.EmployeeContractType
* </p>
*/
public enum EmployeeContractType
{
/** TODO: Model Documentation for Enumeration Literal FULL_TIME value "FULL_TIME" */
FULL_TIME("FULL_TIME"),
/** TODO: Model Documentation for Enumeration Literal PART_TIME value "PART_TIME" */
PART_TIME("PART_TIME"),
/** TODO: Model Documentation for Enumeration Literal CONTRACT value "CONTRACT" */
CONTRACT("CONTRACT");
/**
* The serial version UID of this class. Needed for serialization.
*/
private static final long serialVersionUID = 2448663860496667604L;
private String enumValue = null;
/**
* EmployeeContractType constructor with enumeration literal value allowing
* super classes to access it.
*/
private EmployeeContractType(String value)
{
this.enumValue = value;
}
/**
* Return the EmployeeContractType from a string value
* @param value
* @return EmployeeContractType enum object
*/
public static EmployeeContractType fromString(String value)
{
return valueOf(value);
}
/**
* Returns an instance of EmployeeContractType from String <code>value</code>.
* Required by JAXB2 enumeration implementation
*
* @param value the value to create the EmployeeContractType from.
* @return static Enumeration with corresponding value
*/
public static EmployeeContractType fromValue(String value)
{
for (EmployeeContractType enumName: EmployeeContractType.values())
{
if (enumName.getValue().equals(value))
{
return enumName;
}
}
throw new IllegalArgumentException("EmployeeContractType.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;
}
/**
* Return a Collection of all literal values for this enumeration, can not be modified.
* @return Collection<String> literal values
*/
public static Collection<String> literals()
{
final Collection<String> literals = new ArrayList<String>(values().length);
for (int i = 0; i < values().length; i++)
{
literals.add(values()[i].name());
}
return literals;
}
}