Package com.io7m.cardant.database.api

# 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.
  `Optional<CATypeRecord>`
  `findTypeRecord(com.io7m.lanark.core.RDottedName name)`
  Find the record type with the given fully qualified name.
  `Optional<CATypeScalarType>`
  `findTypeScalar(com.io7m.lanark.core.RDottedName name)`
  Find the scalar type with the given fully qualified name.
  `String`
  `toString()`

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

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

- ## 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

  - ### findTypeScalar

    public Optional<CATypeScalarType> findTypeScalar(com.io7m.lanark.core.RDottedName name)
    Description copied from interface: `CATypePackageResolverType`
    Find the scalar type with the given fully qualified name.
    Specified by:
      `findTypeScalar` in interface `CATypePackageResolverType`
    Parameters:
      `name` - The name
    Returns:
      The type, if any

  - ### findTypeRecord

    public Optional<CATypeRecord> findTypeRecord(com.io7m.lanark.core.RDottedName name)
    Description copied from interface: `CATypePackageResolverType`
    Find the record type with the given fully qualified name.
    Specified by:
      `findTypeRecord` in interface `CATypePackageResolverType`
    Parameters:
      `name` - The name
    Returns:
      The type, if any

  - ### 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`