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 TypeMethodDescriptionstatic CATypePackageResolverTypecreate(CATypePackageCompilerFactoryType inCompilers, CADatabaseTransactionType inTransaction) A database type package resolver.findTypePackage(CATypePackageIdentifier identifier) Find a package with the given identifier.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.findTypeRecord(com.io7m.lanark.core.RDottedName name) Find the record type with the given fully qualified name.findTypeScalar(com.io7m.lanark.core.RDottedName name) Find the scalar type with the given fully qualified name.toString()
-
Method Details
-
create
public static CATypePackageResolverType create(CATypePackageCompilerFactoryType inCompilers, CADatabaseTransactionType inTransaction) A database type package resolver.- Parameters:
inCompilers- The compilersinTransaction- The transaction- Returns:
- A resolver
-
findTypeScalar
Description copied from interface:CATypePackageResolverTypeFind the scalar type with the given fully qualified name.- Specified by:
findTypeScalarin interfaceCATypePackageResolverType- Parameters:
name- The name- Returns:
- The type, if any
-
findTypeRecord
Description copied from interface:CATypePackageResolverTypeFind the record type with the given fully qualified name.- Specified by:
findTypeRecordin interfaceCATypePackageResolverType- 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:CATypePackageResolverTypeFind a package with the given name that satisfies the given version range.- Specified by:
findTypePackageIdin interfaceCATypePackageResolverType- Parameters:
name- The nameversionRange- The version range- Returns:
- The package identifier, if any
-
findTypePackage
Description copied from interface:CATypePackageResolverTypeFind a package with the given identifier.- Specified by:
findTypePackagein interfaceCATypePackageResolverType- Parameters:
identifier- The identifier- Returns:
- The package, if any
-
toString
-