Package net.sf.jkniv.sqlegance
Enum LanguageType
- java.lang.Object
-
- java.lang.Enum<LanguageType>
-
- net.sf.jkniv.sqlegance.LanguageType
-
- All Implemented Interfaces:
Serializable,Comparable<LanguageType>
public enum LanguageType extends Enum<LanguageType>
Type of sql sentence supported at xml files.- Since:
- 0.0.2, 0.6.0 default value change to NATIVE
- Author:
- Alisson Gomes
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LanguageTypeget(String type)Get the language type from Stringstatic LanguageTypevalueOf(String name)Returns the enum constant of this type with the specified name.static LanguageType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
JPQL
public static final LanguageType JPQL
-
HQL
public static final LanguageType HQL
-
NATIVE
public static final LanguageType NATIVE
-
CRITERIA
public static final LanguageType CRITERIA
-
STORED
public static final LanguageType STORED
-
-
Method Detail
-
values
public static LanguageType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LanguageType c : LanguageType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LanguageType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
get
public static LanguageType get(String type)
Get the language type from String- Parameters:
type- of language: NATIVE, STORED, JPQL, HQL...- Returns:
- the type of query, if anyone
typematch the default value NATIVE is returned.
-
-