org.ujorm.orm.ao
Enum CommentPolicy

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

public enum CommentPolicy
extends Enum<CommentPolicy>

Policy for assigning a comment form Comment annotation to database.

See Also:
Comment, MySqlDialect column implementation

Enum Constant Summary
ALWAYS
          Write all available comments from annotations to database on each meta-model loading event.
FOR_NEW_OBJECT
          Assign the comment for a new table or new column.
NEVER
          No comments are assigned
ON_ANY_CHANGE
          Assign all available comments from annotations to database on a new database object event, exactly on new table, column or index.
 
Method Summary
static CommentPolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CommentPolicy[] 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

ON_ANY_CHANGE

public static final CommentPolicy ON_ANY_CHANGE
Assign all available comments from annotations to database on a new database object event, exactly on new table, column or index. It is a default value.


FOR_NEW_OBJECT

public static final CommentPolicy FOR_NEW_OBJECT
Assign the comment for a new table or new column.


NEVER

public static final CommentPolicy NEVER
No comments are assigned


ALWAYS

public static final CommentPolicy ALWAYS
Write all available comments from annotations to database on each meta-model loading event.

Method Detail

values

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

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

valueOf

public static CommentPolicy 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