Class MetaCast

java.lang.Object
org.pgcodekeeper.core.schema.meta.MetaStatement
org.pgcodekeeper.core.schema.meta.MetaCast
All Implemented Interfaces:
Serializable, ICast, IStatement

public final class MetaCast extends MetaStatement implements ICast
Represents a database cast metadata object. Stores information about type casting operations including source and target types and the casting context (IMPLICIT, ASSIGNMENT, or EXPLICIT).
See Also:
  • Constructor Details

    • MetaCast

      public MetaCast(String source, String target, ICast.CastContext context)
      Creates a new cast metadata object.
      Parameters:
      source - the source data type
      target - the target data type
      context - the casting context
    • MetaCast

      public MetaCast(String source, String target, ICast.CastContext context, PgObjLocation object)
      Creates a new cast metadata object with location information.
      Parameters:
      source - the source data type
      target - the target data type
      context - the casting context
      object - the object location information
  • Method Details

    • getSource

      public String getSource()
      Description copied from interface: ICast
      Gets the source type of the cast.
      Specified by:
      getSource in interface ICast
      Returns:
      the source type name
    • getTarget

      public String getTarget()
      Description copied from interface: ICast
      Gets the target type of the cast.
      Specified by:
      getTarget in interface ICast
      Returns:
      the target type name
    • getContext

      public ICast.CastContext getContext()
      Description copied from interface: ICast
      Gets the context in which this cast can be invoked.
      Specified by:
      getContext in interface ICast
      Returns:
      the cast context