org.ujorm.orm.ao
Enum Orm2ddlPolicy

java.lang.Object
  extended by java.lang.Enum<Orm2ddlPolicy>
      extended by org.ujorm.orm.ao.Orm2ddlPolicy
All Implemented Interfaces:
Serializable, Comparable<Orm2ddlPolicy>

public enum Orm2ddlPolicy
extends Enum<Orm2ddlPolicy>

Values list to control how the DLL (Data Definition Language) statements will be used to a defining data structure modification. The default value is CREATE_OR_UPDATE_DDL.

See Also:
MetaParams, Default value

Enum Constant Summary
CREATE_DDL
          Create full DDL structure in condition that the the database structure was not found.
CREATE_OR_UPDATE_DDL
          Create or update full DDL structure.
DO_NOTHING
          Framework is expected to match the DDL structure with the ORM model and do not make any validation.
INHERITED
          The value is defined from a parent.
VALIDATE
          Throw the IllegalStateException in case missing a table, index, or column in the connected database.
WARNING
          The policy makes no change in the database, however it logs a message in case missing a table, index, or column in the connected database - unlike option DO_NOTHING which make no log.
 
Method Summary
static Orm2ddlPolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Orm2ddlPolicy[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DO_NOTHING

public static final Orm2ddlPolicy DO_NOTHING
Framework is expected to match the DDL structure with the ORM model and do not make any validation.

See Also:
WARNING

WARNING

public static final Orm2ddlPolicy WARNING
The policy makes no change in the database, however it logs a message in case missing a table, index, or column in the connected database - unlike option DO_NOTHING which make no log.

See Also:
DO_NOTHING

CREATE_DDL

public static final Orm2ddlPolicy CREATE_DDL
Create full DDL structure in condition that the the database structure was not found.


CREATE_OR_UPDATE_DDL

public static final Orm2ddlPolicy CREATE_OR_UPDATE_DDL
Create or update full DDL structure. It is the DEFAULT value.


VALIDATE

public static final Orm2ddlPolicy VALIDATE
Throw the IllegalStateException in case missing a table, index, or column in the connected database.


INHERITED

public static final Orm2ddlPolicy INHERITED
The value is defined from a parent. The hierarchy from the parent to a child is: In case the parent ROOT is undefined, then the CREATE_OR_UPDATE_DDL will be used.

See Also:
CREATE_OR_UPDATE_DDL
Method Detail

values

public static Orm2ddlPolicy[] 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 (Orm2ddlPolicy c : Orm2ddlPolicy.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Orm2ddlPolicy 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 name
NullPointerException - if the argument is null


Copyright 2013, Pavel Ponec