EmployeeDeptCode.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 EmployeeDeptCode.
*
* <p>
* TODO: Model Documentation for org.andromda.demo.ejb3.employee.EmployeeDeptCode
* </p>
*/
public enum EmployeeDeptCode
{
/** TODO: Model Documentation for Enumeration Literal MARKETING value MARKETING */
MARKETING("mkt01",001),
/** TODO: Model Documentation for Enumeration Literal RESEARCE value RESEARCE */
RESEARCE("rsch01",002),
/** TODO: Model Documentation for Enumeration Literal ACCOUNTS value ACCOUNTS */
ACCOUNTS("act01",003);
/**
* <p>
* TODO: Model Documentation for code
* </p>
*/
private String code;
/**
* <p>
* TODO: Model Documentation for barcode
* </p>
*/
public int barcode;
/**
* The serial version UID of this class. Needed for serialization.
*/
private static final long serialVersionUID = -7275946184205852732L;
private String enumValue = null;
/**
* EmployeeDeptCode constructor with enumeration literal value allowing
* super classes to access it.
*/
private EmployeeDeptCode(String value)
{
this.enumValue = value;
}
/**
* EmployeeDeptCode constructor with list of member variables
*/
private EmployeeDeptCode(String code, int barcode)
{
setCode(code);
setBarcode(barcode);
}
/**
* Get the code property
* @return String
*/
public String getCode()
{
return code;
}
/**
* Set the code property.
* @param value the new value
*/
public void setCode(String value)
{
this.code = value;
}
/**
* Get the barcode property
* @return int
*/
public int getBarcode()
{
return barcode;
}
/**
* Set the barcode property.
* @param value the new value
*/
public void setBarcode(int value)
{
this.barcode = value;
}
/**
* Return the EmployeeDeptCode from a string value
* @param value
* @return EmployeeDeptCode enum object
*/
public static EmployeeDeptCode fromInt(int value)
{
return values()[value];
}
/**
* Returns an instance of EmployeeDeptCode from String <code>value</code>.
* Required by JAXB2 enumeration implementation
*
* @param value the value to create the EmployeeDeptCode from.
* @return static Enumeration with corresponding value
*/
public static EmployeeDeptCode fromValue(String value)
{
for (EmployeeDeptCode enumName: EmployeeDeptCode.values())
{
if (enumName.getValue() == value)
{
return enumName;
}
}
throw new IllegalArgumentException("EmployeeDeptCode.fromValue(" + String.valueOf(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;
}
}