Package org.apache.flink.table.catalog
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 aCatalog
, if any.There can be 2 kinds of
ContextResolvedModel
:- A permanent model: a model which is stored in a
Catalog
and has an associated uniqueObjectIdentifier
. - A temporary model: a model which is stored in the
CatalogManager
, has an associated uniqueObjectIdentifier
and is flagged as temporary.
The different handling of temporary and permanent model is
Catalog
andCatalogManager
instance specific, hence for these two kind of models, an instance of this object represents the relationship between the specificResolvedCatalogModel
instance and the specificCatalog
/CatalogManager
instances. For example, the sameResolvedCatalogModel
can be temporary for one catalog, but permanent for another one. - A permanent model: a model which is stored in a
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Optional<org.apache.flink.table.catalog.Catalog>
getCatalog()
Returns empty ifisPermanent()
is false.org.apache.flink.table.catalog.ObjectIdentifier
getIdentifier()
org.apache.flink.table.catalog.CatalogModel
getModel()
Returns the original metadata object returned by the catalog.org.apache.flink.table.catalog.ResolvedCatalogModel
getResolvedModel()
Returns a fully resolved catalog object.int
hashCode()
boolean
isPermanent()
boolean
isTemporary()
static ContextResolvedModel
permanent(org.apache.flink.table.catalog.ObjectIdentifier identifier, org.apache.flink.table.catalog.Catalog catalog, org.apache.flink.table.catalog.ResolvedCatalogModel resolvedModel)
static ContextResolvedModel
temporary(org.apache.flink.table.catalog.ObjectIdentifier identifier, org.apache.flink.table.catalog.ResolvedCatalogModel resolvedModel)
String
toString()
-
-
-
Method Detail
-
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 ifisPermanent()
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.
-
-