Oracle Warehouse Builder Java API Reference
10g Release 1 (10.1)

B12155-01

oracle.owb.flatfile
Interface Field

All Superinterfaces:
Attribute, Datatyped, Extensible, OWBNamedObject, PropertyOwner

public interface Field
extends Attribute, Extensible

Field interface represents a flat file entity field.

Since:
9.0.4
Version:
9.0.4
Author:
Luda Mogilevich (lyudmila.mogilevich@oracle.com)

Field Summary
static java.lang.String MAPPINGDEFAULTDATATYPE
          Constant to specify the default for the mapping datatype.

 

Method Summary
 Datatype getDatatype()
          Returns the datatype object of the Field.
 java.lang.String getDefaultIfCondition()
          Returns the DEFAULTIF condition.
 Datatype getMappingDatatype()
          Gets the mapping data type for the Field.
 int getMappingLength()
          Gets the length of the mapping data type.
 int getMappingLengthRaw()
          Gets the raw length of the mapping data type.
 int getMappingPrecision()
          Gets the precision of the mapping data type.
 int getMappingPrecisionRaw()
          Gets the raw precision of the mapping data type.
 int getMappingScale()
          Gets the scale of the mapping data type.
 int getMappingScaleRaw()
          Gets the raw scale of the mapping data type.
 java.lang.String getMask()
          Gets the date mask of the Field.
 java.lang.String getNullIfCondition()
          Returns the NULLIF condition.
 Record getOwningRecord()
          Returns the owning record.
 int getStartPosition()
          Gets the start position of the field.
 boolean isMappingPrecisionOmitted()
          Gets whether or not the precision of the mapping data type is omitted.
 void setDatatype(Datatype datatype)
          Sets the datatype of the field.
 void setDatatype(java.lang.String datatypeName)
          Sets the datatype of the field.
 void setDefaultIfCondition(java.lang.String condition)
          Sets the DEFAULTIF condition of the Field.
 void setMappingDatatype(Datatype datatype)
          Sets the mapping data type for the Field.
 void setMappingDatatype(java.lang.String datatypeName)
          Sets the mapping data type for the Field.
 void setMappingLength(int length)
          Sets the length of the mapping data type.
 void setMappingPrecision(int precision)
          Sets the precision of the mapping data type.
 void setMappingPrecisionOmitted(boolean value)
          Sets whether or not the precision of the mapping data type is omitted.
 void setMappingScale(int scale)
          Sets the scale of the mapping data type.
 void setMask(java.lang.String mask)
          Sets the date mask of the Field.
 void setNullIfCondition(java.lang.String condition)
          Sets the NULLIF condition of the Field.
 void setStartPosition(int position)
          Sets the start position of the Field.

 

Methods inherited from interface oracle.owb.foundation.OWBNamedObject
delete, getBusinessName, getClassDefinition, getComponent, getDescription, getName, getUOID, isDeletable, isEditable, isRenamable, setBusinessName, setDescription, setName

 

Methods inherited from interface oracle.owb.foundation.type.Datatyped
getLength, getPrecision, getScale, isPrecisionOmitted, setLength, setPrecision, setPrecisionOmitted, setScale

 

Methods inherited from interface oracle.owb.foundation.property.PropertyOwner
getDefaultPropertyValue, getLogicalPropertyKeys, getPhysicalPropertyKeys, getPropertyDomain, getPropertyKeys, getPropertyValue, getPropertyValueString, isLogicalProperty, isPhysicalProperty, isReadOnlyProperty, setPropertyValue, setPropertyValueByString

 

Field Detail

MAPPINGDEFAULTDATATYPE

public static final java.lang.String MAPPINGDEFAULTDATATYPE
Constant to specify the default for the mapping datatype. The datatype name can be any name from the valid mapping data type set plus "DEFAULT". If a data type is "DEFAULT", null wil be set as a mapping datatype. When retrieving you will get the default mapping datatype which is an SQL*Loader data type converted to the correspondent mapping (SQL) data type. For example, the default for Sql*loader type "INTEGER EXTERNAL" is "NUMBER".
See Also:
Constant Field Values
Method Detail

getOwningRecord

public Record getOwningRecord()
Returns the owning record.
Returns:
the Record containing this Field

getDatatype

public Datatype getDatatype()
Returns the datatype object of the Field.
Specified by:
getDatatype in interface Datatyped
Returns:
the Datatype of the Field
See Also:
setDatatype(oracle.owb.foundation.type.Datatype)

setDatatype

public void setDatatype(Datatype datatype)
Sets the datatype of the field.
Specified by:
setDatatype in interface Datatyped
Parameters:
datatype - of the Field
See Also:
getDatatype()

setDatatype

public void setDatatype(java.lang.String datatypeName)
Sets the datatype of the field.
Parameters:
datatypeName - of the Field
See Also:
getDatatype()

setStartPosition

public void setStartPosition(int position)
Sets the start position of the Field.
Parameters:
position - where this Field begins in a fixed length Record
See Also:
getStartPosition()

getStartPosition

public int getStartPosition()
Gets the start position of the field.
Returns:
where this Field begins in a fixed length Record
See Also:
setStartPosition(int)

setMask

public void setMask(java.lang.String mask)
Sets the date mask of the Field. The mask is only used if the Field's datatype is DATE.
Parameters:
mask - a String defining the date mask used to convert character data in the file to an Oracle DATE
See Also:
getMask()

getMask

public java.lang.String getMask()
Gets the date mask of the Field.
Returns:
a String defining the date mask used to convert character data in the file to an Oracle DATE
See Also:
setMask(java.lang.String)

setNullIfCondition

public void setNullIfCondition(java.lang.String condition)
Sets the NULLIF condition of the Field. If this condition is true in the loaded data file SQL*Loader will insert a NULL value into the target table.
Parameters:
condition - a String defining the NULLIF condition; an expression; for example "=BLANKS"
See Also:
getNullIfCondition()

getNullIfCondition

public java.lang.String getNullIfCondition()
Returns the NULLIF condition.
Returns:
a String defining the NULLIF condition for this Field
See Also:
setNullIfCondition(java.lang.String)

setDefaultIfCondition

public void setDefaultIfCondition(java.lang.String condition)
Sets the DEFAULTIF condition of the Field. If this condition is true in the loaded data file SQL*Loader will insert either a NULL or a zero into the target table, depending on the Field's datatype.
Parameters:
condition - a String defining the default if condition; an expression; for example "=BLANKS"
See Also:
getDefaultIfCondition()

getDefaultIfCondition

public java.lang.String getDefaultIfCondition()
Returns the DEFAULTIF condition.
Returns:
a String defining the DEFAULTIF condition for this Field
See Also:
setDefaultIfCondition(java.lang.String)

setMappingDatatype

public void setMappingDatatype(java.lang.String datatypeName)
Sets the mapping data type for the Field. The mapping data type affects the PL/SQL generated if the FlatFile containing the Field is used as a target in mapping. Likewise it can affect the metadata created if the Record containing the Field is used to define an ExternalTable. The datatype name can be any name from the valid mapping data type set plus "DEFAULT". If a data type is "DEFAULT", null wil be set as a mapping datatype. When retrieving you will get the default mapping datatype which is an SQL*Loader data type converted to the correspondent mapping (SQL) data type. For example, the default for Sql*loader type "INTEGER EXTERNAL" is "NUMBER".
Parameters:
datatypeName - a name of a datatype to define how mapping will treat this Field
See Also:
getMappingDatatype()

setMappingDatatype

public void setMappingDatatype(Datatype datatype)
Sets the mapping data type for the Field. The mapping data type affects the PL/SQL generated if the FlatFile containing the Field is used as a target in mapping. Likewise it can affect the metadata created if the Record containing the Field is used to define an ExternalTable.
Parameters:
datatype - a Datatype object to define how mapping will treat this Field
See Also:
getMappingDatatype()

getMappingDatatype

public Datatype getMappingDatatype()
Gets the mapping data type for the Field. The mapping data type affects the PL/SQL generated if the FlatFile containing the Field is used as a target in mapping. Likewise it can affect the metadata created if the Record containing the Field is used to define an ExternalTable. If a mapping datatype was not set or equal null, the default of the the converted SQL*Loader datatype to mapping datatype will be returned. In order to get the real database value of the Mapping Datatype use getMappingDatatypeRaw()
Returns:
a Datatype object that defines how mapping will treat this Field
See Also:
setMappingDatatype(java.lang.String)

setMappingLength

public void setMappingLength(int length)
Sets the length of the mapping data type. The mapping length is used if the mapping data type is a character type. The mapping data type affects the PL/SQL generated if the FlatFile containing the Field is used as a target in mapping. Likewise it can affect the metadata created if the Record containing the Field is used to define an ExternalTable.
Parameters:
length - the length of the mapping data type
See Also:
getMappingLength()

getMappingLength

public int getMappingLength()
Gets the length of the mapping data type. The mapping length is used if the mapping data type is a character type. The mapping data type affects the PL/SQL generated if the FlatFile containing the Field is used as a target in mapping. Likewise it can affect the metadata created if the Record containing the Field is used to define an ExternalTable.
Returns:
the length of the mapping data type
See Also:
setMappingLength(int)

getMappingLengthRaw

public int getMappingLengthRaw()
Gets the raw length of the mapping data type. The mapping length is used if the mapping data type is a character type. The mapping data type affects the PL/SQL generated if the FlatFile containing the Field is used as a target in mapping. Likewise it can affect the metadata created if the Record containing the Field is used to define an ExternalTable.
Returns:
the length of the mapping data type

setMappingPrecisionOmitted

public void setMappingPrecisionOmitted(boolean value)
Sets whether or not the precision of the mapping data type is omitted. The mapping precision may be used if the mapping data type is a numeric type. The mapping data type affects the PL/SQL generated if the FlatFile containing the Field is used as a target in mapping. Likewise it can affect the metadata created if the Record containing the Field is used to define an ExternalTable.
Parameters:
value - a boolean value
See Also:
isMappingPrecisionOmitted()

isMappingPrecisionOmitted

public boolean isMappingPrecisionOmitted()
Gets whether or not the precision of the mapping data type is omitted. The mapping precision may be used if the mapping data type is a numeric type. The mapping data type affects the PL/SQL generated if the FlatFile containing the Field is used as a target in mapping. Likewise it can affect the metadata created if the Record containing the Field is used to define an ExternalTable.
Returns:
a boolean value - true means that the mapping precision is omitted, false means that it is not omitted
See Also:
setMappingPrecisionOmitted(boolean)

setMappingPrecision

public void setMappingPrecision(int precision)
Sets the precision of the mapping data type. The mapping precision may be used if the mapping data type is a numeric type. The mapping data type affects the PL/SQL generated if the FlatFile containing the Field is used as a target in mapping. Likewise it can affect the metadata created if the Record containing the Field is used to define an ExternalTable.
Parameters:
precision - the precision of the mapping data type

getMappingPrecision

public int getMappingPrecision()
Gets the precision of the mapping data type. The mapping precision may be used if the mapping data type is a numeric type. The mapping data type affects the PL/SQL generated if the FlatFile containing the Field is used as a target in mapping. Likewise it can affect the metadata created if the Record containing the Field is used to define an ExternalTable.
Returns:
the precision of the mapping data type
See Also:
getMappingPrecision()

getMappingPrecisionRaw

public int getMappingPrecisionRaw()
Gets the raw precision of the mapping data type. The mapping precision may be used if the mapping data type is a numeric type. The mapping data type affects the PL/SQL generated if the FlatFile containing the Field is used as a target in mapping. Likewise it can affect the metadata created if the Record containing the Field is used to define an ExternalTable.
Returns:
the precision of the mapping data type
See Also:
setMappingPrecision(int)

setMappingScale

public void setMappingScale(int scale)
Sets the scale of the mapping data type. The mapping scale is used if the mapping data type is a numeric type. The mapping data type affects the PL/SQL generated if the FlatFile containing the Field is used as a target in mapping. Likewise it can affect the metadata created if the Record containing the Field is used to define an ExternalTable.
Parameters:
scale - the scale of the mapping data type
See Also:
getMappingScale()

getMappingScale

public int getMappingScale()
Gets the scale of the mapping data type. The mapping scale is used if the mapping data type is a numeric type. The mapping data type affects the PL/SQL generated if the FlatFile containing the Field is used as a target in mapping. Likewise it can affect the metadata created if the Record containing the Field is used to define an ExternalTable.
Returns:
the scale of the mapping data type
See Also:
setMappingScale(int)

getMappingScaleRaw

public int getMappingScaleRaw()
Gets the raw scale of the mapping data type. The mapping scale is used if the mapping data type is a numeric type. The mapping data type affects the PL/SQL generated if the FlatFile containing the Field is used as a target in mapping. Likewise it can affect the metadata created if the Record containing the Field is used to define an ExternalTable.
Returns:
the scale of the mapping data type

Oracle Warehouse Builder Java API Reference
10g Release 1 (10.1)

B12155-01

Copyright © 2003, Oracle. All Rights Reserved.