org.objectweb.cjdbc.common.sql.metadata
Class MetadataContainer

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byorg.objectweb.cjdbc.common.sql.metadata.MetadataContainer
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public final class MetadataContainer
extends java.util.HashMap

A MetadataContainer is basically a hashtable of jdbc metadata. We may want to override a few options from the usual Hashtable so I've put it in a separate class.

Version:
1.0
Author:
Nicolas Modrzyk , Emmanuel Cecchet
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.HashMap
 
Nested classes inherited from class java.util.AbstractMap
 
Field Summary
private  java.lang.String line
           
private static long serialVersionUID
           
private  java.lang.String url
           
 
Fields inherited from class java.util.HashMap
 
Fields inherited from class java.util.AbstractMap
 
Constructor Summary
MetadataContainer(java.lang.String url)
          Creates a new MetadataContainer object
 
Method Summary
static java.lang.String getContainerKey(java.lang.String methodName, java.lang.Class[] parametersType, java.lang.Object[] arguments)
          Get the metadata container key for the given query.
 java.lang.String getUrl()
          Returns the url value.
 boolean isCompatible(MetadataContainer container, Trace logger)
          Check to see if two metadata sets are identical.
 java.lang.String toString()
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

line

private final java.lang.String line

url

private java.lang.String url
Constructor Detail

MetadataContainer

public MetadataContainer(java.lang.String url)
Creates a new MetadataContainer object

Parameters:
url - which url is this container pointed to
Method Detail

isCompatible

public boolean isCompatible(MetadataContainer container,
                            Trace logger)
Check to see if two metadata sets are identical. All incompatible values are logged as warning into the logger given.

Parameters:
container - the container to check compatibility with
logger - the logger, if null, echo on stderr
Returns:
true if all metadata are identical.

toString

public java.lang.String toString()
See Also:
Object.toString()

getUrl

public java.lang.String getUrl()
Returns the url value.

Returns:
Returns the url.

getContainerKey

public static java.lang.String getContainerKey(java.lang.String methodName,
                                               java.lang.Class[] parametersType,
                                               java.lang.Object[] arguments)
Get the metadata container key for the given query. Serializes the method call into a "getXXX(Y,Z,...)" String (with name, signature and arguments).

Parameters:
methodName - method invoked to generate the key in the container
parametersType - parameters type of invoked method
arguments - arguments used to invoke the method
Returns:
container key for the given method call


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.