net.sf.jmatchparser.util.csv.fieldreader
Enum FieldSource.EmptyAction

java.lang.Object
  extended by java.lang.Enum<FieldSource.EmptyAction>
      extended by net.sf.jmatchparser.util.csv.fieldreader.FieldSource.EmptyAction
All Implemented Interfaces:
Serializable, Comparable<FieldSource.EmptyAction>
Enclosing class:
FieldSource

public static enum FieldSource.EmptyAction
extends Enum<FieldSource.EmptyAction>

How to treat a field source that returns an empty string.


Enum Constant Summary
CLEAR
          Return an empty value, to clear the underlying field when updating a record.
COMPLAIN
          Throw an exception.
COMPLAIN_IF_NEW
          Throw an exception if a new record should be created, ignore it otherwise.
IGNORE
          Ignore the field as if it was not in the field source list, to not touch the underlying field when updating a record.
 
Method Summary
static FieldSource.EmptyAction valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FieldSource.EmptyAction[] 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

IGNORE

public static final FieldSource.EmptyAction IGNORE
Ignore the field as if it was not in the field source list, to not touch the underlying field when updating a record.


COMPLAIN

public static final FieldSource.EmptyAction COMPLAIN
Throw an exception.


CLEAR

public static final FieldSource.EmptyAction CLEAR
Return an empty value, to clear the underlying field when updating a record.


COMPLAIN_IF_NEW

public static final FieldSource.EmptyAction COMPLAIN_IF_NEW
Throw an exception if a new record should be created, ignore it otherwise.

See Also:
COMPLAIN, IGNORE
Method Detail

values

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

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

valueOf

public static FieldSource.EmptyAction 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 © 2011. All Rights Reserved.