edu.iris.dmc.pdcc.container
Class PdccTableContainer

java.lang.Object
  extended byedu.iris.dmc.pdcc.container.PdccTableContainer
All Implemented Interfaces:
ObjectContainer

public class PdccTableContainer
extends java.lang.Object
implements ObjectContainer


Constructor Summary
PdccTableContainer()
           
 
Method Summary
 void add(java.lang.Object addThis)
          Object must be a PdccTableRecord
 boolean checkPKey(java.lang.String tableName, int pKey)
          check to see if the table record with the indicated primary key is present in this container.
 void commitChange(java.lang.Object obj)
          not currently implemented
 java.lang.Object get(int lookupId)
          Get the parent database table matching the lookupId, as represented by lookupId.
 java.lang.Object get(int lookupId, java.lang.String tableName, int seqNum)
          Get the child database table that is part of a repeating sequence.
 java.util.Vector getAll(int lookupId)
          return the lookupID-mapped vector of db tables
 int getDictionaryLookup(int blkType, int dictIdx)
          get the lookupId associated with the provided dictionary blockette type and dictionary reference number (dictIdx).
 java.lang.Object getNext()
          this method is not implemented
 int iterate()
          this method is not implemented
 int iterate(int catNum)
          this method is not implemented
 int iterate(int volNum, int catNum)
          this method is not implemented
 boolean locate(int lookupId)
          lookupId will be a Blockette lookupId return true if there are one or more PdccTableRecords available
 java.lang.Object remove(int lookupId)
          remove the PARENT table record object mapped under the indicated lookupId from the container.
 java.lang.Object remove(int lookupId, java.lang.String dbTblName, int index)
          remove the CHILD repeating field table record object mapped by the lookupId, tablename, and sequential index number
 void setDictionaryLookup(int blkType, int dictIdx, int lookupId)
          set the blockette type and dictionary index number to be associated with a lookupId, reflecting a particular dictionary blockette.
 void setIsParent(boolean flag)
          externally indicate that the next record to be passed to add() is a parent table, which may or may not contain child repeating tables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdccTableContainer

public PdccTableContainer()
Method Detail

add

public void add(java.lang.Object addThis)
         throws java.lang.Exception
Object must be a PdccTableRecord

Specified by:
add in interface ObjectContainer
Throws:
java.lang.Exception

get

public java.lang.Object get(int lookupId,
                            java.lang.String tableName,
                            int seqNum)
                     throws ContainerException
Get the child database table that is part of a repeating sequence. Match to the table name and the sequence number. lookupId will be a Blockette lookupId seqNum will be a sequence number listed in the SEQ field (0 or greater) returned Object will be a PdccTableRecord. return null if record can't be found.

Throws:
ContainerException

get

public java.lang.Object get(int lookupId)
                     throws ContainerException
Get the parent database table matching the lookupId, as represented by lookupId. (Interface implementation.) lookupId will be a Blockette lookupId returned object will be a PdccTableRecord, which is the parent, non-sequence table for the lookupId. return null if record can't be found. NOTE: You will need to cast the returned Object as a PdccTableRecord to make use of the object methods.

Specified by:
get in interface ObjectContainer
Throws:
ContainerException

getAll

public java.util.Vector getAll(int lookupId)
                        throws ContainerException
return the lookupID-mapped vector of db tables

Throws:
ContainerException

remove

public java.lang.Object remove(int lookupId)
                        throws ContainerException
remove the PARENT table record object mapped under the indicated lookupId from the container. Return the removed parent object (or null.)

Specified by:
remove in interface ObjectContainer
Throws:
ContainerException

remove

public java.lang.Object remove(int lookupId,
                               java.lang.String dbTblName,
                               int index)
                        throws ContainerException
remove the CHILD repeating field table record object mapped by the lookupId, tablename, and sequential index number

Throws:
ContainerException

locate

public boolean locate(int lookupId)
               throws ContainerException
lookupId will be a Blockette lookupId return true if there are one or more PdccTableRecords available

Specified by:
locate in interface ObjectContainer
Throws:
ContainerException

iterate

public int iterate(int volNum,
                   int catNum)
this method is not implemented

Specified by:
iterate in interface ObjectContainer

iterate

public int iterate(int catNum)
this method is not implemented

Specified by:
iterate in interface ObjectContainer

iterate

public int iterate()
this method is not implemented

Specified by:
iterate in interface ObjectContainer

getNext

public java.lang.Object getNext()
                         throws ContainerException
this method is not implemented

Specified by:
getNext in interface ObjectContainer
Throws:
ContainerException

getDictionaryLookup

public int getDictionaryLookup(int blkType,
                               int dictIdx)
get the lookupId associated with the provided dictionary blockette type and dictionary reference number (dictIdx). Use in conjunction with lookupIdMap to locate a dictionary table PKEY. Return 0 of nothing meaningful found.


setDictionaryLookup

public void setDictionaryLookup(int blkType,
                                int dictIdx,
                                int lookupId)
set the blockette type and dictionary index number to be associated with a lookupId, reflecting a particular dictionary blockette. map: blkType+dictIdx --> dictLookupId


checkPKey

public boolean checkPKey(java.lang.String tableName,
                         int pKey)
check to see if the table record with the indicated primary key is present in this container. Return true if so, false if it is not present.


commitChange

public void commitChange(java.lang.Object obj)
                  throws ContainerException
not currently implemented

Throws:
ContainerException

setIsParent

public void setIsParent(boolean flag)
externally indicate that the next record to be passed to add() is a parent table, which may or may not contain child repeating tables



brought to you by Incorporated Research Institutions for Seismology
June 29 2006