quickstart.pojo.model.OrgCat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plasma-test-model Show documentation
Show all versions of plasma-test-model Show documentation
The Plasma Test Model Module
The newest version!
package quickstart.pojo.model;
import org.plasma.sdo.PlasmaEnum;
/**
* This generated Enumeration represents the domain model enumeration OrgCat which is part of namespace http://plasma-test/humanresources as defined within the Configuration.
* * Generated SDO enumerations embody not only logical-name literals
* but also physical or instance names, which are often shorter (possibly abbreviated)
* and applicable as a data-store space-saving device.
* Application programs should typically use the physical or instance name
* for an enumeration literal when setting a data object property which is constrained by an enumeration.
*/
public enum OrgCat implements PlasmaEnum
{
/**
* Derived from field nonprofit
*
* Holds the logical and physical names for literal nonprofit.
*/
NONPROFIT("N","Derived from field nonprofit"),
/**
* Derived from field government
*
* Holds the logical and physical names for literal government.
*/
GOVERNMENT("G","Derived from field government"),
/**
* Derived from field retail
*
* Holds the logical and physical names for literal retail.
*/
RETAIL("R","Derived from field retail"),
/**
* Derived from field wholesale
*
* Holds the logical and physical names for literal wholesale.
*/
WHOLESALE("W","Derived from field wholesale");
private String instanceName;
private String description;
private OrgCat(String instanceName, String description) {
this.instanceName = instanceName;
this.description = description;
}
/**
* Returns the logical name associated with this enumeration literal.
*/
public String getName()
{
return this.name();
}
/**
* Returns the physical or instance name associated with this enumeration literal.
*/
public String getInstanceName() {
return this.instanceName;
}
/**
* Returns the descriptive text associated with this enumeration literal.
*/
public String getDescription() {
return this.description;
}
/**
* Returns the enum values for this class as an array of implemented interfaces
* @see PlasmaEnum
*/
public static PlasmaEnum[] enumValues()
{
return values();
}
/**
* Returns the enumeration value matching the given name.
*/
public static OrgCat fromName(String name) {
for (PlasmaEnum enm : enumValues()) {
if (enm.getName().equals(name))
return (OrgCat)enm;
}
throw new IllegalArgumentException("no enumeration value found for name '" + name + "'");
}
/**
* Returns the enumeration value matching the given physical or instance name.
*/
public static OrgCat fromInstanceName(String instanceName) {
for (PlasmaEnum enm : enumValues()) {
if (enm.getInstanceName().equals(instanceName))
return (OrgCat)enm;
}
throw new IllegalArgumentException("no enumeration value found for instance name '" + instanceName + "'");
}
}