Class MetaCompositeType

java.lang.Object
org.pgcodekeeper.core.database.base.schema.meta.MetaStatement
org.pgcodekeeper.core.database.base.schema.meta.MetaCompositeType
All Implemented Interfaces:
Serializable, ICompositeType, ISearchPath, IStatement, IType

public final class MetaCompositeType extends MetaStatement implements ICompositeType
Represents composite type metadata object. Stores information about composite type attributes including their names and types.
See Also:
  • Constructor Details

    • MetaCompositeType

      public MetaCompositeType(ObjectLocation object)
      Creates a new composite type metadata object.
      Parameters:
      object - the object location information
  • Method Details

    • getSchemaName

      public String getSchemaName()
      Returns the schema name of this composite type.
      Specified by:
      getSchemaName in interface ISearchPath
      Returns:
      the schema name
    • addAttr

      public void addAttr(String name, String type)
      Adds an attribute to this composite type.
      Parameters:
      name - the attribute name
      type - the attribute type
    • getAttrType

      public String getAttrType(String attrName)
      Returns the type of the specified attribute.
      Specified by:
      getAttrType in interface ICompositeType
      Parameters:
      attrName - the attribute name
      Returns:
      the attribute type, or null if not found
    • getAttrs

      public List<Pair<String,String>> getAttrs()
      Description copied from interface: ICompositeType
      Returns list of all attributes.
      Specified by:
      getAttrs in interface ICompositeType
      Returns:
      list of attributes