com.sybase.persistence
Class ConnectionManager

java.lang.Object
  extended by com.sybase.persistence.ConnectionManager

public final class ConnectionManager
extends java.lang.Object


Method Summary
 void deleteConnection(Connection connection)
          Deletes given connection
static void endSetDefaultConnection(Connection connection)
          Sybase internal use only.
 int getCacheSize()
          Returns the cache size
 Connection getConnection(java.lang.String name)
          Gets the Connection by name.
 Connection getConnectionById(java.lang.String uuid)
          Gets the Connection by uuid.
 Connection[] getConnections()
          Gets all saved Connection objects.
 Connection getDefaultConnection()
          Gets the default connection.
static ConnectionManager getInstance()
          Gets the singleton instance of
 int getPageSize()
          Returns the page size
static boolean isUsingDynamicPublication()
           
 void saveConnection(Connection connection)
          Saves or updates the specified Connection.
 void setCacheSize(int size)
          Sets the cache size
 void setDefaultConnection(Connection connection)
          Sybase internal use only.
 void setPageSize(int size)
          Sets the page size
static void useDynamicPublication(boolean useDynamicPublication)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ConnectionManager getInstance()
Gets the singleton instance of

Returns:
ConnectionManager instance ConnectionManager.

deleteConnection

public void deleteConnection(Connection connection)
Deletes given connection

Parameters:
profile -

getConnection

public Connection getConnection(java.lang.String name)
Gets the Connection by name.

Parameters:
name - The name of connection to find.
Returns:
Returns the specified Connection or a null reference if not found.

getConnectionById

public Connection getConnectionById(java.lang.String uuid)
Gets the Connection by uuid.

Parameters:
uuid - The uuid of connection to find.
Returns:
Returns the specified Connection or a null reference if not found.

getConnections

public Connection[] getConnections()
Gets all saved Connection objects.

Returns:
Connection array

getDefaultConnection

public Connection getDefaultConnection()
Gets the default connection.

Returns:

setDefaultConnection

public void setDefaultConnection(Connection connection)
Sybase internal use only.


endSetDefaultConnection

public static void endSetDefaultConnection(Connection connection)
Sybase internal use only.


saveConnection

public void saveConnection(Connection connection)
Saves or updates the specified Connection.

Parameters:
connection - The Connection to save or update.

setPageSize

public void setPageSize(int size)
Sets the page size

Parameters:
size -

setCacheSize

public void setCacheSize(int size)
Sets the cache size

Parameters:
size -

getPageSize

public int getPageSize()
Returns the page size

Returns:
pageSize

getCacheSize

public int getCacheSize()
Returns the cache size

Returns:
cacheSize

isUsingDynamicPublication

public static boolean isUsingDynamicPublication()
Returns:
Returns the useDynamicPublication.

useDynamicPublication

public static void useDynamicPublication(boolean useDynamicPublication)
Parameters:
useDynamicPublication - The useDynamicPublication to set.