org.exolab.jms.tools.migration.proxy
Class Destinations

java.lang.Object
  |
  +--org.exolab.jms.tools.migration.proxy.Destinations

public class Destinations
extends java.lang.Object

Provides persistency for JmsDestination instances.

Version:
$Revision: 1.8 $ $Date: 2002/01/17 08:20:04 $
Author:
Tim Anderson

Constructor Summary
Destinations(java.sql.Connection connection)
          Construct a new Destinations instance
 
Method Summary
 void add(JmsDestination destination)
          Add a new destination to the database, assigning it a unique identity.
 void close()
          Deallocates resources owned or referenced by the instance
 JmsDestination get(long destinationId)
          Returns the destination associated with the specified identifier
 java.util.List getDestinations()
          Returns the list of destination objects
 long getId(JmsDestination destination)
          Returns the destination identifier for a given destination
protected  void load()
          Load all destinations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Destinations

public Destinations(java.sql.Connection connection)
             throws java.sql.SQLException
Construct a new Destinations instance
Parameters:
connection - the database connection
Throws:
java.sql.SQLException - if a database error is encountered
Method Detail

add

public void add(JmsDestination destination)
         throws java.sql.SQLException
Add a new destination to the database, assigning it a unique identity.
Parameters:
destination - the destination to add
Throws:
java.sql.SQLException - if a database error is encountered

get

public JmsDestination get(long destinationId)
Returns the destination associated with the specified identifier
Parameters:
destinationId - the destination identifier
Returns:
the destination, or null if no corresponding destination exists

getId

public long getId(JmsDestination destination)
Returns the destination identifier for a given destination
Parameters:
destination - the destination
Returns:
the destination identifier, or -1 if no corresponding destination exists

getDestinations

public java.util.List getDestinations()
Returns the list of destination objects
Returns:
a list of javax.jms.Destination instances

close

public void close()
Deallocates resources owned or referenced by the instance

load

protected void load()
             throws java.sql.SQLException
Load all destinations
Throws:
java.sql.SQLException - if a database error is encountered


Copyright © 1999-2003 The OpenJMS Group. All Rights Reserved.