|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<DatabaseFunction>
net.java.ao.DatabaseFunction
public enum DatabaseFunction
An enum containing database agnostic representations of common
functions. These functions will be executed in the relevant manner
when executed on different databases. For example, the
CURRENT_TIMESTAMP
function will execute
CURRENT_TIMESTAMP
on MySQL, now()
on PostgreSQL and GetDate()
on SQL Server.
Enum Constant Summary | |
---|---|
CURRENT_DATE
Returns the current date without time information (e.g. |
|
CURRENT_TIMESTAMP
Returns the current date and time according to the database. |
Method Summary | |
---|---|
static DatabaseFunction |
get(String value)
Performs a linear search through all database functions available within this enum and returns the value which matches the specified String name. |
static DatabaseFunction |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static DatabaseFunction[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final DatabaseFunction CURRENT_DATE
public static final DatabaseFunction CURRENT_TIMESTAMP
Method Detail |
---|
public static final DatabaseFunction[] values()
for(DatabaseFunction c : DatabaseFunction.values()) System.out.println(c);
public static DatabaseFunction valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified namepublic static DatabaseFunction get(String value)
Performs a linear search through all database functions available
within this enum and returns the value which matches the
specified String name. Matching is performed based upon the
field name of the enum value. (e.g. passing a value of
"CURRENT_TIMESTAMP" will return the CURRENT_TIMESTAMP
value0).
value
- The String name of the function to look for.
null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |