Class Table

java.lang.Object
org.ivoa.dm.registry.vodataservice.Table
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Direct Known Subclasses:
Atable

@Entity @VoDml(id="VODataService:Table", role=objectType) public class Table extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
. objectType: Table
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • name

      @VoDml(id="VODataService:Table.name", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String name
      The fully qualified name of the table. This name should include all catalogue or schema prefixes needed to sufficiently uniquely distinguish it in a query. In general, the format of the qualified name may depend on the context; however, when the table is intended to be queryable via ADQL, then the catalogue and schema qualifiers are delimited from the table name with dots (.). : Attribute name : multiplicity 1
    • title

      @VoDml(id="VODataService:Table.title", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String title
      A descriptive, human-interpretable name for the table. This is used for display purposes. There is no requirement regarding uniqueness. : Attribute title : multiplicity 0..1
    • description

      @VoDml(id="VODataService:Table.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String description
      A free-text description of the table's contents . : Attribute description : multiplicity 0..1
    • utype

      @VoDml(id="VODataService:Table.utype", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String utype
      An identifier for a concept in a data model that the data in this table represent. The form of the utype string depends on the data model; common forms are sequences of dotted identifiers (e.g., in SSA) or URIs (e.g., in RegTAP). : Attribute utype : multiplicity 0..1
    • nrows

      @VoDml(id="VODataService:Table.nrows", role=attribute, type="ivoa:nonnegativeInteger", typeRole=primitiveType) protected Integer nrows
      The approximate size of the table in rows. This is not expected to be exact. For instance, the estimates on table sizes databases keep for query planning purposes are suitable for this field. : Attribute nrows : multiplicity 0..1
    • column

      @VoDml(id="VODataService:Table.column", role=composition, type="VODataService:TableParam", typeRole=objectType) protected List<TableParam> column
      A description of a table column. composition column : ( Multiplicity : 0..* )
    • foreignKey

      @VoDml(id="VODataService:Table.foreignKey", role=composition, type="VODataService:ForeignKey", typeRole=objectType) protected List<ForeignKey> foreignKey
      A description of a foreign keys, one or more columns from the current table that can be used to join with another table. composition foreignKey : ( Multiplicity : 0..* )
    • type

      @VoDml(id="VODataService:Table.type", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String type
      A name for the role this table plays. Recognized values include “output”, indicating this table is output from a query; “base_table”, indicating a table whose records represent the main subjects of its schema; and “view”, indicating that the table represents a useful combination or subset of other tables. Other values are allowed. : Attribute type : multiplicity 1
  • Constructor Details

    • Table

      public Table()
      Creates a new Table
    • Table

      public Table(String name, String title, String description, String utype, Integer nrows, List<TableParam> column, List<ForeignKey> foreignKey, String type)
      full parameter constructor.
      Parameters:
      name - The fully qualified name of the table. This name should include all catalogue or schema prefixes needed to sufficiently uniquely distinguish it in a query. In general, the format of the qualified name may depend on the context; however, when the table is intended to be queryable via ADQL, then the catalogue and schema qualifiers are delimited from the table name with dots (.).
      title - A descriptive, human-interpretable name for the table. This is used for display purposes. There is no requirement regarding uniqueness.
      description - A free-text description of the table's contents .
      utype - An identifier for a concept in a data model that the data in this table represent. The form of the utype string depends on the data model; common forms are sequences of dotted identifiers (e.g., in SSA) or URIs (e.g., in RegTAP).
      nrows - The approximate size of the table in rows. This is not expected to be exact. For instance, the estimates on table sizes databases keep for query planning purposes are suitable for this field.
      column - A description of a table column.
      foreignKey - A description of a foreign keys, one or more columns from the current table that can be used to join with another table.
      type - A name for the role this table plays. Recognized values include “output”, indicating this table is output from a query; “base_table”, indicating a table whose records represent the main subjects of its schema; and “view”, indicating that the table represents a useful combination or subset of other tables. Other values are allowed.
    • Table

      public Table(Table other)
      Copy Constructor. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
      Returns:
      the id
    • copyMe

      public Table copyMe()
      make a clone of the object taking into account current polymorhic type.
      Returns:
      the cloned object.
    • updateUsing

      public void updateUsing(Table other)
      Update this object with the content of the given object. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
    • getName

      public String getName()
      Returns name Attribute.
      Returns:
      name Attribute
    • setName

      public void setName(String pName)
      Set name Attribute.
      Parameters:
      pName - value to set
    • withName

      public Table withName(String pName)
      fluent setter for name Attribute.
      Parameters:
      pName - value to set
      Returns:
      Table
    • getTitle

      public String getTitle()
      Returns title Attribute.
      Returns:
      title Attribute
    • setTitle

      public void setTitle(String pTitle)
      Set title Attribute.
      Parameters:
      pTitle - value to set
    • withTitle

      public Table withTitle(String pTitle)
      fluent setter for title Attribute.
      Parameters:
      pTitle - value to set
      Returns:
      Table
    • getDescription

      public String getDescription()
      Returns description Attribute.
      Returns:
      description Attribute
    • setDescription

      public void setDescription(String pDescription)
      Set description Attribute.
      Parameters:
      pDescription - value to set
    • withDescription

      public Table withDescription(String pDescription)
      fluent setter for description Attribute.
      Parameters:
      pDescription - value to set
      Returns:
      Table
    • getUtype

      public String getUtype()
      Returns utype Attribute.
      Returns:
      utype Attribute
    • setUtype

      public void setUtype(String pUtype)
      Set utype Attribute.
      Parameters:
      pUtype - value to set
    • withUtype

      public Table withUtype(String pUtype)
      fluent setter for utype Attribute.
      Parameters:
      pUtype - value to set
      Returns:
      Table
    • getNrows

      public Integer getNrows()
      Returns nrows Attribute.
      Returns:
      nrows Attribute
    • setNrows

      public void setNrows(Integer pNrows)
      Set nrows Attribute.
      Parameters:
      pNrows - value to set
    • withNrows

      public Table withNrows(Integer pNrows)
      fluent setter for nrows Attribute.
      Parameters:
      pNrows - value to set
      Returns:
      Table
    • getColumn

      public List<TableParam> getColumn()
      Returns column composition as an immutable list.
      Returns:
      column composition.
    • setColumn

      public void setColumn(List<TableParam> pColumn)
      Defines whole column composition.
      Parameters:
      pColumn - composition to set.
    • addToColumn

      public void addToColumn(TableParam p)
      Add a org.ivoa.dm.registry.vodataservice.TableParam to the composition.
      Parameters:
      p - org.ivoa.dm.registry.vodataservice.TableParam to add
    • removeFromColumn

      public void removeFromColumn(TableParam p)
      Remove a org.ivoa.dm.registry.vodataservice.TableParam from the composition.
      Parameters:
      p - org.ivoa.dm.registry.vodataservice.TableParam to remove
    • replaceInColumn

      public void replaceInColumn(TableParam _p)
      update a org.ivoa.dm.registry.vodataservice.TableParam in the composition.
      Parameters:
      _p - org.ivoa.dm.registry.vodataservice.TableParam to update the match is done via the database key
    • getForeignKey

      public List<ForeignKey> getForeignKey()
      Returns foreignKey composition as an immutable list.
      Returns:
      foreignKey composition.
    • setForeignKey

      public void setForeignKey(List<ForeignKey> pForeignKey)
      Defines whole foreignKey composition.
      Parameters:
      pForeignKey - composition to set.
    • addToForeignKey

      public void addToForeignKey(ForeignKey p)
      Add a org.ivoa.dm.registry.vodataservice.ForeignKey to the composition.
      Parameters:
      p - org.ivoa.dm.registry.vodataservice.ForeignKey to add
    • removeFromForeignKey

      public void removeFromForeignKey(ForeignKey p)
      Remove a org.ivoa.dm.registry.vodataservice.ForeignKey from the composition.
      Parameters:
      p - org.ivoa.dm.registry.vodataservice.ForeignKey to remove
    • replaceInForeignKey

      public void replaceInForeignKey(ForeignKey _p)
      update a org.ivoa.dm.registry.vodataservice.ForeignKey in the composition.
      Parameters:
      _p - org.ivoa.dm.registry.vodataservice.ForeignKey to update the match is done via the database key
    • getType

      public String getType()
      Returns type Attribute.
      Returns:
      type Attribute
    • setType

      public void setType(String pType)
      Set type Attribute.
      Parameters:
      pType - value to set
    • withType

      public Table withType(String pType)
      fluent setter for type Attribute.
      Parameters:
      pType - value to set
      Returns:
      Table
    • createTable

      public static Table createTable(Consumer<Table.TableBuilder> f)
      create a Table in functional builder style.
      Parameters:
      f - the functional builder.
      Returns:
      an object initialized from the builder.
    • forceLoad

      public void forceLoad()
      Specified by:
      forceLoad in interface org.ivoa.vodml.jpa.JPAManipulations
    • delete

      public void delete(jakarta.persistence.EntityManager em)
      Specified by:
      delete in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>