net.sf.farrago.namespace.flatfile
Enum FlatFileParams.SchemaType

java.lang.Object
  extended by java.lang.Enum<FlatFileParams.SchemaType>
      extended by net.sf.farrago.namespace.flatfile.FlatFileParams.SchemaType
All Implemented Interfaces:
Serializable, Comparable<FlatFileParams.SchemaType>
Enclosing class:
FlatFileParams

public static enum FlatFileParams.SchemaType
extends Enum<FlatFileParams.SchemaType>

Enumeration for schema types used by the flat file reader.


Enum Constant Summary
DESCRIBE
          Schema name for a special type of query that returns a one column result with space separated columns sizes
QUERY
          Schema name for a typical query, in which columns are casted to typed data
QUERY_TEXT
          Schema name for a query in which columns are returned as text.
SAMPLE
          Schema name for a special type of query that returns parsed text columns (including headers) as they appear in a text file.
 
Field Summary
private  String schemaName
           
private  String[] schemaNames
           
private static Map<String,FlatFileParams.SchemaType> types
           
 
Method Summary
 String getSchemaName()
           
static FlatFileParams.SchemaType getSchemaType(String schemaName)
           
static FlatFileParams.SchemaType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FlatFileParams.SchemaType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DESCRIBE

public static final FlatFileParams.SchemaType DESCRIBE
Schema name for a special type of query that returns a one column result with space separated columns sizes


SAMPLE

public static final FlatFileParams.SchemaType SAMPLE
Schema name for a special type of query that returns parsed text columns (including headers) as they appear in a text file. Sample queries are limited to a specified number of rows


QUERY

public static final FlatFileParams.SchemaType QUERY
Schema name for a typical query, in which columns are casted to typed data


QUERY_TEXT

public static final FlatFileParams.SchemaType QUERY_TEXT
Schema name for a query in which columns are returned as text. Similar to sample, except headers are not returned, and there is no limit on the amount of rows returned.

Field Detail

types

private static Map<String,FlatFileParams.SchemaType> types

schemaName

private String schemaName

schemaNames

private String[] schemaNames
Method Detail

values

public static final FlatFileParams.SchemaType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(FlatFileParams.SchemaType c : FlatFileParams.SchemaType.values())
        System.out.println(c);

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

valueOf

public static FlatFileParams.SchemaType 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

getSchemaType

public static FlatFileParams.SchemaType getSchemaType(String schemaName)

getSchemaName

public String getSchemaName()