## org.eclipse.datatools.sqltools.core
Class DatabaseVendorDefinitionId

    java.lang.Object
      org.eclipse.datatools.sqltools.core.DatabaseVendorDefinitionId

All Implemented Interfaces:
  java.lang.Comparable

    public class DatabaseVendorDefinitionId

extends java.lang.Object
implements java.lang.Comparable

A class to uniquely identify a database definition, represented by product name and version.

Author:
  Hui Cao

Nested Class Summary
`static class` `DatabaseVendorDefinitionId.VersionComparator` A string comparator which is aware of version number

Constructor Summary
`DatabaseVendorDefinitionId(java.lang.String dbDefName)` Constructs the `DatabaseVendorDefinitionId` object by product name + "_" + version.
`DatabaseVendorDefinitionId(java.lang.String productName, java.lang.String version)` Constructs the `DatabaseVendorDefinitionId` object by product name and version.

Method Summary
`int` `compareTo(java.lang.Object o)` Override compareTo to make this object be able to serve as key in a TreeMap.
`boolean` `equals(java.lang.Object obj)` Returns true if the product names are equal and versions are compatible.
`java.lang.String` `getProductName()` Returns the product name
`java.lang.String` `getVersion()` Returns the version
`int` `hashCode()` Override hashCode to make this object be able to serve as key in a HashMap.
`java.lang.String` `toString()` name + "_" + version

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DatabaseVendorDefinitionId

    public DatabaseVendorDefinitionId(java.lang.String productName,
                                      java.lang.String version)

  Constructs the `DatabaseVendorDefinitionId` object by product name and version.

### DatabaseVendorDefinitionId

    public DatabaseVendorDefinitionId(java.lang.String dbDefName)

  Constructs the `DatabaseVendorDefinitionId` object by product name + "_" + version.

  Parameters:
    `dbDefName` - product name + "_" + version.

Method Detail

### getProductName

    public java.lang.String getProductName()

  Returns the product name

### getVersion

    public java.lang.String getVersion()

  Returns the version

### hashCode

    public int hashCode()

  Override hashCode to make this object be able to serve as key in a HashMap.

  Overrides:
    `hashCode` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object obj)

  Returns true if the product names are equal and versions are compatible.

  Overrides:
    `equals` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  name + "_" + version

  Overrides:
    `toString` in class `java.lang.Object`

### compareTo

    public int compareTo(java.lang.Object o)

  Override compareTo to make this object be able to serve as key in a TreeMap.

  Specified by:
    `compareTo` in interface `java.lang.Comparable`

Copyright © 2006 -- 2008 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.