com.univocity.parsers.common
Enum Nesting

java.lang.Object
  extended by java.lang.Enum<Nesting>
      extended by com.univocity.parsers.common.Nesting
All Implemented Interfaces:
Serializable, Comparable<Nesting>

public enum Nesting
extends Enum<Nesting>

Determines how data obtained from a given entity should be associated with the data of its parent.

Author:
uniVocity Software Pty Ltd - dev@univocity.com

Enum Constant Summary
JOIN
          Joins all data retrieved into the parent row.
LINK
          Links all data retrieved to a given field of the parent row.
REPLACE_JOIN
          Joins all data retrieved into the parent row, replacing the source value used to produce the child rows.
REPLACE_LINK
          Links all data retrieved the parent row, removing the source value used to produce child rows.
 
Method Summary
 boolean joins()
          Tests if this nesting option joins values of a linked entity with the values of a parent row.
 boolean links()
          Tests if this nesting option links values of a linked entity to the parent row.
 boolean replaces()
          Tests if this nesting option replaces the source value used to produce child rows.
static Nesting valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Nesting[] 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

JOIN

public static final Nesting JOIN
Joins all data retrieved into the parent row. For example, if parent row is [a,b,c] and the data retrieved for [b] has [t,u] and [x,y], the resulting join will produce [a,b,t,u,c] and [a,b,x,y,c]. Rows [t,u] and [x,y] will still be accessible through Result.getLinkedFieldData(int)


REPLACE_JOIN

public static final Nesting REPLACE_JOIN
Joins all data retrieved into the parent row, replacing the source value used to produce the child rows. For example, if parent row is [a,b,c] and the data retrieved for [b] has [t,u] and [x,y], the resulting join will produce [a,t,u,c] and [a,x,y,c]. Rows [t,u] and [x,y] will still be accessible through Result.getLinkedFieldData(int)


LINK

public static final Nesting LINK
Links all data retrieved to a given field of the parent row. For example, if parent row is [a,b,c] and the data retrieved for [b] has [t,u] and [x,y], the parent row will remain as [a,b,c], while rows [t,u] and [x,y] will be accessible through Result.getLinkedFieldData(int)


REPLACE_LINK

public static final Nesting REPLACE_LINK
Links all data retrieved the parent row, removing the source value used to produce child rows. For example, if parent row is [a,b,c] and the data retrieved for [b] has [t,u] and [x,y], the parent row will become as [a,c], while rows [t,u] and [x,y] will be accessible through Result.getLinkedFieldData(int)

Method Detail

values

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

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

valueOf

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

replaces

public boolean replaces()
Tests if this nesting option replaces the source value used to produce child rows.

Returns:
true if this nesting option replaces the source value used to produce child rows; false otherwise.

joins

public boolean joins()
Tests if this nesting option joins values of a linked entity with the values of a parent row.

Returns:
true if this nesting option replaces the source value used to produce child rows; false otherwise.

links

public boolean links()
Tests if this nesting option links values of a linked entity to the parent row.

Returns:
true if this nesting option links values of a linked entity to the parent row; false otherwise.


Copyright © 2018 uniVocity Software Pty Ltd. All rights reserved.