Class ContextResolvedModel

java.lang.Object
org.apache.flink.table.catalog.ContextResolvedModel

@Internal public final class ContextResolvedModel extends Object
This class contains information about a model and its relationship with a Catalog, if any.

There can be 2 kinds of ContextResolvedModel:

  • A permanent model: a model which is stored in a Catalog and has an associated unique ObjectIdentifier.
  • A temporary model: a model which is stored in the CatalogManager, has an associated unique ObjectIdentifier and is flagged as temporary.

The different handling of temporary and permanent model is Catalog and CatalogManager instance specific, hence for these two kind of models, an instance of this object represents the relationship between the specific ResolvedCatalogModel instance and the specific Catalog/CatalogManager instances. For example, the same ResolvedCatalogModel can be temporary for one catalog, but permanent for another one.

  • Method Details

    • permanent

      public static ContextResolvedModel permanent(org.apache.flink.table.catalog.ObjectIdentifier identifier, org.apache.flink.table.catalog.Catalog catalog, org.apache.flink.table.catalog.ResolvedCatalogModel resolvedModel)
    • temporary

      public static ContextResolvedModel temporary(org.apache.flink.table.catalog.ObjectIdentifier identifier, org.apache.flink.table.catalog.ResolvedCatalogModel resolvedModel)
    • isTemporary

      public boolean isTemporary()
      Returns:
      true if the model is temporary.
    • isPermanent

      public boolean isPermanent()
    • getIdentifier

      public org.apache.flink.table.catalog.ObjectIdentifier getIdentifier()
    • getCatalog

      public Optional<org.apache.flink.table.catalog.Catalog> getCatalog()
      Returns empty if isPermanent() is false.
    • getResolvedModel

      public org.apache.flink.table.catalog.ResolvedCatalogModel getResolvedModel()
      Returns a fully resolved catalog object.
    • getModel

      public org.apache.flink.table.catalog.CatalogModel getModel()
      Returns the original metadata object returned by the catalog.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object