org.openxma.dsl.dom.model.DataBaseConstraintType Maven / Gradle / Ivy
/**
*
*
*
* $Id$
*/
package org.openxma.dsl.dom.model;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
*
* A representation of the literals of the enumeration 'Data Base Constraint Type',
* and utility methods for working with them.
*
* @see org.openxma.dsl.dom.DomPackage#getDataBaseConstraintType()
* @model
* @generated
*/
public enum DataBaseConstraintType implements Enumerator {
/**
* The 'NULL' literal object.
*
*
* @see #NULL_VALUE
* @generated
* @ordered
*/
NULL(0, "NULL", "NULL"), /**
* The 'INDEX' literal object.
*
*
* @see #INDEX_VALUE
* @generated
* @ordered
*/
INDEX(1, "INDEX", "index"),
/**
* The 'UNIQUE' literal object.
*
*
* @see #UNIQUE_VALUE
* @generated
* @ordered
*/
UNIQUE(2, "UNIQUE", "unique"),
/**
* The 'NATURAL' literal object.
*
*
* @see #NATURAL_VALUE
* @generated
* @ordered
*/
NATURAL(3, "NATURAL", "natural"),
/**
* The 'PRIMARY' literal object.
*
*
* @see #PRIMARY_VALUE
* @generated
* @ordered
*/
PRIMARY(4, "PRIMARY", "primary");
/**
* The 'NULL' literal value.
*
*
* If the meaning of 'NULL' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #NULL
* @model
* @generated
* @ordered
*/
public static final int NULL_VALUE = 0;
/**
* The 'INDEX' literal value.
*
*
* If the meaning of 'INDEX' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #INDEX
* @model literal="index"
* @generated
* @ordered
*/
public static final int INDEX_VALUE = 1;
/**
* The 'UNIQUE' literal value.
*
*
* If the meaning of 'UNIQUE' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #UNIQUE
* @model literal="unique"
* @generated
* @ordered
*/
public static final int UNIQUE_VALUE = 2;
/**
* The 'NATURAL' literal value.
*
*
* If the meaning of 'NATURAL' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #NATURAL
* @model literal="natural"
* @generated
* @ordered
*/
public static final int NATURAL_VALUE = 3;
/**
* The 'PRIMARY' literal value.
*
*
* If the meaning of 'PRIMARY' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #PRIMARY
* @model literal="primary"
* @generated
* @ordered
*/
public static final int PRIMARY_VALUE = 4;
/**
* An array of all the 'Data Base Constraint Type' enumerators.
*
*
* @generated
*/
private static final DataBaseConstraintType[] VALUES_ARRAY =
new DataBaseConstraintType[] {
NULL,
INDEX,
UNIQUE,
NATURAL,
PRIMARY,
};
/**
* A public read-only list of all the 'Data Base Constraint Type' enumerators.
*
*
* @generated
*/
public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the 'Data Base Constraint Type' literal with the specified literal value.
*
*
* @generated
*/
public static DataBaseConstraintType get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
DataBaseConstraintType result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the 'Data Base Constraint Type' literal with the specified name.
*
*
* @generated
*/
public static DataBaseConstraintType getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
DataBaseConstraintType result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the 'Data Base Constraint Type' literal with the specified integer value.
*
*
* @generated
*/
public static DataBaseConstraintType get(int value) {
switch (value) {
case NULL_VALUE: return NULL;
case INDEX_VALUE: return INDEX;
case UNIQUE_VALUE: return UNIQUE;
case NATURAL_VALUE: return NATURAL;
case PRIMARY_VALUE: return PRIMARY;
}
return null;
}
/**
*
*
* @generated
*/
private final int value;
/**
*
*
* @generated
*/
private final String name;
/**
*
*
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
*
*
* @generated
*/
private DataBaseConstraintType(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
*
*
* @generated
*/
public int getValue() {
return value;
}
/**
*
*
* @generated
*/
public String getName() {
return name;
}
/**
*
*
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
*
*
* @generated
*/
@Override
public String toString() {
return literal;
}
} //DataBaseConstraintType