Package de.xima.fc.persistence
Enum ConnectionIdentifier.Type
- java.lang.Object
-
- java.lang.Enum<ConnectionIdentifier.Type>
-
- de.xima.fc.persistence.ConnectionIdentifier.Type
-
- All Implemented Interfaces:
Serializable,Comparable<ConnectionIdentifier.Type>
- Enclosing class:
- ConnectionIdentifier
public static enum ConnectionIdentifier.Type extends Enum<ConnectionIdentifier.Type>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CORECore system DB connection.DB_ACCESS_ENTITYConnection to a specific database defined by a DB access entity.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends Serializable>getIdClass()booleanisValidId(Serializable id)Checks if the given ID is valid for this connection type.static ConnectionIdentifier.TypevalueOf(String name)Returns the enum constant of this type with the specified name.static ConnectionIdentifier.Type[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CORE
public static final ConnectionIdentifier.Type CORE
Core system DB connection. No ID required. There exists exactly one core system DB connection.
-
DB_ACCESS_ENTITY
public static final ConnectionIdentifier.Type DB_ACCESS_ENTITY
Connection to a specific database defined by a DB access entity. The ID must be of type Long and refer to the ID (primary key) of the DB access entity.
-
-
Method Detail
-
values
public static ConnectionIdentifier.Type[] 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 (ConnectionIdentifier.Type c : ConnectionIdentifier.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConnectionIdentifier.Type 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
-
isValidId
public boolean isValidId(Serializable id)
Checks if the given ID is valid for this connection type.- Parameters:
id- the ID to check- Returns:
- true if the ID is valid for this type, false otherwise
-
getIdClass
public Class<? extends Serializable> getIdClass()
-
-