Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02

weblogic.wtc.jatmi
Class DynamicFldTbl

java.lang.Object
  extended by weblogic.wtc.jatmi.DynamicFldTbl
All Implemented Interfaces:
FldTbl

public class DynamicFldTbl
extends Object
implements FldTbl

This class provides a dynamic implementation of the FldTbl interface. It parses an FML or FML32 field definition file at run-time, then provides name-to-field id and field id-to-name mappings.


Constructor Summary
DynamicFldTbl(String fieldFileName, boolean hdrType32)
          Parses an FML or FML32 field table definition file.
DynamicFldTbl(String fieldFileName, boolean hdrType32, int initialCapacity, float loadFactor)
          Parses an FML or FML32 field table definition file.
 
Method Summary
 String Fldid_to_name(int fldId)
          Returns the name of the field corresponding to the given field id.
 String[] getFldNames()
          Returns an array of strings representing the names of the fields in the table.
 int name_to_Fldid(String name)
          Returns the id of the field corresponding to the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicFldTbl

public DynamicFldTbl(String fieldFileName,
                     boolean hdrType32)
Parses an FML or FML32 field table definition file. Because applications written to use field tables do not expect exceptions, no exceptions are thrown if the definition file cannot be found or if there are parsing errors. If such an error occurred, the methods returning name sets and field/name mappings will return null or error values.

Parameters:
fieldFileName - The pathname of the field table file. This may be an absolute pathname, a path relative to the directory from which Java was started or a relative path that may be found as a resource on the classpath.
hdrType32 - true for FML32, false for FML.

DynamicFldTbl

public DynamicFldTbl(String fieldFileName,
                     boolean hdrType32,
                     int initialCapacity,
                     float loadFactor)
Parses an FML or FML32 field table definition file. Because applications written to use field tables do not expect exceptions, no exceptions are thrown if the definition file cannot be found or if there are parsing errors. If such an error occurred, the methods returning name sets and field/name mappings will return null or error values.

Parameters:
fieldFileName - The pathname of the field table file. This may be an absolute pathname, a path relative to the directory from which Java was started or a relative path that may be found as a resource on the classpath.
hdrType32 - true for FML32, false for FML.
initialCapacity - A hint about the size of the field table. This value and the loadFactor can be used to tune the implementation in the same way that initialCapacity and loadFactor are used in the Java HashMap class.
loadFactor - A tuning hint used in the same way as the loadFactor in the Java HashMap class.
Method Detail

Fldid_to_name

public String Fldid_to_name(int fldId)
Returns the name of the field corresponding to the given field id.

Specified by:
Fldid_to_name in interface FldTbl
Parameters:
fldId - The field id of the field.
Returns:
The name of the field or null if there is no field with the given field id or if there was trouble finding or parsing the field definition file.

getFldNames

public String[] getFldNames()
Returns an array of strings representing the names of the fields in the table.

Specified by:
getFldNames in interface FldTbl
Returns:
The names of the fields in the table. If there was trouble finding or parsing the table, returns an empty array.

name_to_Fldid

public int name_to_Fldid(String name)
Returns the id of the field corresponding to the given name.

Specified by:
name_to_Fldid in interface FldTbl
Parameters:
name - The name of the field.
Returns:
The id of the field or -1 if there is no field with the given name or if there was trouble finding or parsing the field definition file.

Copyright 1996, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.3)

Part Number E41849-02