# Class CADatabaseTypePackageResolver

java.lang.Object
com.io7m.cardant.database.api.CADatabaseTypePackageResolver

All Implemented Interfaces:
  `CATypePackageResolverType`

public final class CADatabaseTypePackageResolver extends Object implements CATypePackageResolverType
A database type package resolver.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CATypePackageResolverType`
  `create(CATypePackageCompilerFactoryType inCompilers, CADatabaseTransactionType inTransaction)`
  A database type package resolver.
  `Optional<CATypePackage>`
  `findTypePackage(CATypePackageIdentifier identifier)`
  Find a package with the given identifier.
  `Optional<CATypePackageIdentifier>`
  `findTypePackageId(com.io7m.lanark.core.RDottedName name, com.io7m.verona.core.VersionRange versionRange)`
  Find a package with the given name that satisfies the given version range.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface com.io7m.cardant.type_packages.resolver.api.CATypePackageResolverType

  `findTypeRecord, findTypeScalar`

- ## Method Details

  - ### create

    public static CATypePackageResolverType create(CATypePackageCompilerFactoryType inCompilers, CADatabaseTransactionType inTransaction)
    A database type package resolver.
    Parameters:
      `inCompilers` - The compilers
      `inTransaction` - The transaction
    Returns:
      A resolver

  - ### findTypePackageId

    public Optional<CATypePackageIdentifier> findTypePackageId(com.io7m.lanark.core.RDottedName name, com.io7m.verona.core.VersionRange versionRange)
    Description copied from interface: `CATypePackageResolverType`
    Find a package with the given name that satisfies the given version range.
    Specified by:
      `findTypePackageId` in interface `CATypePackageResolverType`
    Parameters:
      `name` - The name
      `versionRange` - The version range
    Returns:
      The package identifier, if any

  - ### findTypePackage

    public Optional<CATypePackage> findTypePackage(CATypePackageIdentifier identifier)
    Description copied from interface: `CATypePackageResolverType`
    Find a package with the given identifier.
    Specified by:
      `findTypePackage` in interface `CATypePackageResolverType`
    Parameters:
      `identifier` - The identifier
    Returns:
      The package, if any

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`