diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/persistence/XmlPersistenceUnitCachingType.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/persistence/XmlPersistenceUnitCachingType.java | 309 |
1 files changed, 309 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/persistence/XmlPersistenceUnitCachingType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/persistence/XmlPersistenceUnitCachingType.java new file mode 100644 index 0000000000..bc17df3564 --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/persistence/XmlPersistenceUnitCachingType.java @@ -0,0 +1,309 @@ +/******************************************************************************* + * Copyright (c) 2009 Oracle. All rights reserved. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0, which accompanies this distribution + * and is available at http://www.eclipse.org/legal/epl-v10.html. + * + * Contributors: + * Oracle - initial API and implementation + ******************************************************************************/ +package org.eclipse.jpt.core.jpa2.resource.persistence; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Xml Persistence Unit Caching Type</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see org.eclipse.jpt.core.jpa2.resource.persistence.Persistence2_0Package#getXmlPersistenceUnitCachingType() + * @model + * @generated + */ +public enum XmlPersistenceUnitCachingType implements Enumerator +{ + /** + * The '<em><b>ALL</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #ALL_VALUE + * @generated + * @ordered + */ + ALL(0, "ALL", "ALL"), + + /** + * The '<em><b>NONE</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #NONE_VALUE + * @generated + * @ordered + */ + NONE(1, "NONE", "NONE"), + + /** + * The '<em><b>ENABLE SELECTIVE</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #ENABLE_SELECTIVE_VALUE + * @generated + * @ordered + */ + ENABLE_SELECTIVE(2, "ENABLE_SELECTIVE", "ENABLE_SELECTIVE"), + + /** + * The '<em><b>DISABLE SELECTIVE</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #DISABLE_SELECTIVE_VALUE + * @generated + * @ordered + */ + DISABLE_SELECTIVE(3, "DISABLE_SELECTIVE", "DISABLE_SELECTIVE"), /** + * The '<em><b>UNSPECIFIED</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #UNSPECIFIED_VALUE + * @generated + * @ordered + */ + UNSPECIFIED(4, "UNSPECIFIED", "UNSPECIFIED"); + + /** + * The '<em><b>ALL</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>ALL</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #ALL + * @model + * @generated + * @ordered + */ + public static final int ALL_VALUE = 0; + + /** + * The '<em><b>NONE</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>NONE</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #NONE + * @model + * @generated + * @ordered + */ + public static final int NONE_VALUE = 1; + + /** + * The '<em><b>ENABLE SELECTIVE</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>ENABLE SELECTIVE</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #ENABLE_SELECTIVE + * @model + * @generated + * @ordered + */ + public static final int ENABLE_SELECTIVE_VALUE = 2; + + /** + * The '<em><b>DISABLE SELECTIVE</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>DISABLE SELECTIVE</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #DISABLE_SELECTIVE + * @model + * @generated + * @ordered + */ + public static final int DISABLE_SELECTIVE_VALUE = 3; + + /** + * The '<em><b>UNSPECIFIED</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>UNSPECIFIED</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #UNSPECIFIED + * @model + * @generated + * @ordered + */ + public static final int UNSPECIFIED_VALUE = 4; + + /** + * An array of all the '<em><b>Xml Persistence Unit Caching Type</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final XmlPersistenceUnitCachingType[] VALUES_ARRAY = + new XmlPersistenceUnitCachingType[] + { + ALL, + NONE, + ENABLE_SELECTIVE, + DISABLE_SELECTIVE, + UNSPECIFIED, + }; + + /** + * A public read-only list of all the '<em><b>Xml Persistence Unit Caching Type</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List<XmlPersistenceUnitCachingType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Xml Persistence Unit Caching Type</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static XmlPersistenceUnitCachingType get(String literal) + { + for (int i = 0; i < VALUES_ARRAY.length; ++i) + { + XmlPersistenceUnitCachingType result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) + { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Xml Persistence Unit Caching Type</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static XmlPersistenceUnitCachingType getByName(String name) + { + for (int i = 0; i < VALUES_ARRAY.length; ++i) + { + XmlPersistenceUnitCachingType result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) + { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Xml Persistence Unit Caching Type</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static XmlPersistenceUnitCachingType get(int value) + { + switch (value) + { + case ALL_VALUE: return ALL; + case NONE_VALUE: return NONE; + case ENABLE_SELECTIVE_VALUE: return ENABLE_SELECTIVE; + case DISABLE_SELECTIVE_VALUE: return DISABLE_SELECTIVE; + case UNSPECIFIED_VALUE: return UNSPECIFIED; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private XmlPersistenceUnitCachingType(int value, String name, String literal) + { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() + { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() + { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLiteral() + { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() + { + return literal; + } + +} //XmlPersistenceUnitCachingType |