Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ddlutils.io
Class WaitingObject

    java.lang.Object
      org.apache.ddlutils.io.WaitingObject

    public class WaitingObject

extends Object

Represents an object waiting for insertion into the database. Is used by the `DataToDatabaseSink` to insert the objects in the correct order according to their foreign keys.

Version:
  $Revision: 289996 $

Constructor Summary
`WaitingObject(DynaBean obj, Identity objIdentity)` Creates a new `WaitingObject` instance for the given object.

Method Summary
`void` | `addPendingFK(Identity fkIdentity)` Adds the identity of another object that the object is waiting for.
`DynaBean` | `getObject()` Returns the waiting object.
`Iterator` | `getPendingFKs()` Returns the identities of the object that this object is waiting for.
`boolean` | `hasPendingFKs()` Determines whether there are any identities of waited-for objects registered with this waiting object.
`Identity` | `removePendingFK(Identity fkIdentity)` Removes the specified identity from list of identities of the waited-for objects.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### WaitingObject

    public WaitingObject(DynaBean obj,
                         Identity objIdentity)

  Creates a new `WaitingObject` instance for the given object.

  Parameters:
    `obj` - The object that is waiting
    `objIdentity` - The (original) identity of the object

Method Detail

### getObject

    public DynaBean getObject()

  Returns the waiting object.

  Returns:
    The object

### addPendingFK

    public void addPendingFK(Identity fkIdentity)

  Adds the identity of another object that the object is waiting for.

  Parameters:
    `fkIdentity` - The identity of the waited-for object

### getPendingFKs

    public Iterator getPendingFKs()

  Returns the identities of the object that this object is waiting for.

  Returns:
    The identities

### removePendingFK

    public Identity removePendingFK(Identity fkIdentity)

  Removes the specified identity from list of identities of the waited-for objects.

  Parameters:
    `fkIdentity` - The identity to remove
  Returns:
    The removed identity if any

### hasPendingFKs

    public boolean hasPendingFKs()

  Determines whether there are any identities of waited-for objects registered with this waiting object.

  Returns:
    `true` if identities of waited-for objects are registered

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.