org.openxma.dsl.dom.model.CrudOperationType 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 'Crud Operation Type',
* and utility methods for working with them.
*
* @see org.openxma.dsl.dom.DomPackage#getCrudOperationType()
* @model
* @generated
*/
public enum CrudOperationType implements Enumerator {
/**
* The 'NULL' literal object.
*
*
* @see #NULL_VALUE
* @generated
* @ordered
*/
NULL(0, "NULL", "NULL"), /**
* The 'CREATE' literal object.
*
*
* @see #CREATE_VALUE
* @generated
* @ordered
*/
CREATE(1, "CREATE", "create"),
/**
* The 'READ' literal object.
*
*
* @see #READ_VALUE
* @generated
* @ordered
*/
READ(2, "READ", "read"),
/**
* The 'UPDATE' literal object.
*
*
* @see #UPDATE_VALUE
* @generated
* @ordered
*/
UPDATE(3, "UPDATE", "update"),
/**
* The 'DELETE' literal object.
*
*
* @see #DELETE_VALUE
* @generated
* @ordered
*/
DELETE(4, "DELETE", "delete"),
/**
* The 'ALL' literal object.
*
*
* @see #ALL_VALUE
* @generated
* @ordered
*/
ALL(5, "ALL", "crud");
/**
* 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 'CREATE' literal value.
*
*
* If the meaning of 'CREATE' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #CREATE
* @model literal="create"
* @generated
* @ordered
*/
public static final int CREATE_VALUE = 1;
/**
* The 'READ' literal value.
*
*
* If the meaning of 'READ' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #READ
* @model literal="read"
* @generated
* @ordered
*/
public static final int READ_VALUE = 2;
/**
* The 'UPDATE' literal value.
*
*
* If the meaning of 'UPDATE' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #UPDATE
* @model literal="update"
* @generated
* @ordered
*/
public static final int UPDATE_VALUE = 3;
/**
* The 'DELETE' literal value.
*
*
* If the meaning of 'DELETE' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #DELETE
* @model literal="delete"
* @generated
* @ordered
*/
public static final int DELETE_VALUE = 4;
/**
* The 'ALL' literal value.
*
*
* If the meaning of 'ALL' literal object isn't clear,
* there really should be more of a description here...
*
*
* @see #ALL
* @model literal="crud"
* @generated
* @ordered
*/
public static final int ALL_VALUE = 5;
/**
* An array of all the 'Crud Operation Type' enumerators.
*
*
* @generated
*/
private static final CrudOperationType[] VALUES_ARRAY =
new CrudOperationType[] {
NULL,
CREATE,
READ,
UPDATE,
DELETE,
ALL,
};
/**
* A public read-only list of all the 'Crud Operation Type' enumerators.
*
*
* @generated
*/
public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the 'Crud Operation Type' literal with the specified literal value.
*
*
* @generated
*/
public static CrudOperationType get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
CrudOperationType result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the 'Crud Operation Type' literal with the specified name.
*
*
* @generated
*/
public static CrudOperationType getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
CrudOperationType result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the 'Crud Operation Type' literal with the specified integer value.
*
*
* @generated
*/
public static CrudOperationType get(int value) {
switch (value) {
case NULL_VALUE: return NULL;
case CREATE_VALUE: return CREATE;
case READ_VALUE: return READ;
case UPDATE_VALUE: return UPDATE;
case DELETE_VALUE: return DELETE;
case ALL_VALUE: return ALL;
}
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 CrudOperationType(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;
}
} //CrudOperationType