Class FKColumn

java.lang.Object
org.ivoa.dm.registry.vodataservice.FKColumn
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>

@Entity @VoDml(id="VODataService:FKColumn", role=objectType) public class FKColumn extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A pair of columns that are used to join two tables. To do an inner join of data from the two tables, a query should include a constraint that sets the value from the first column equal to the value in the second column. This type assumes that it is used in the context of implied source (i.e., current) and target tables, as in the ForeignKey type's fkColumn. objectType: FKColumn
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • fromColumn

      @VoDml(id="VODataService:FKColumn.fromColumn", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String fromColumn
      The unqualified name of the column from the current table. : Attribute fromColumn : multiplicity 1
    • targetColumn

      @VoDml(id="VODataService:FKColumn.targetColumn", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String targetColumn
      The unqualified name of the column from the target table. : Attribute targetColumn : multiplicity 1
  • Constructor Details

    • FKColumn

      public FKColumn()
      Creates a new FKColumn
    • FKColumn

      public FKColumn(String fromColumn, String targetColumn)
      full parameter constructor.
      Parameters:
      fromColumn - The unqualified name of the column from the current table.
      targetColumn - The unqualified name of the column from the target table.
    • FKColumn

      public FKColumn(FKColumn 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
    • updateUsing

      public void updateUsing(FKColumn 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.
    • getFromColumn

      public String getFromColumn()
      Returns fromColumn Attribute.
      Returns:
      fromColumn Attribute
    • setFromColumn

      public void setFromColumn(String pFromColumn)
      Set fromColumn Attribute.
      Parameters:
      pFromColumn - value to set
    • withFromColumn

      public FKColumn withFromColumn(String pFromColumn)
      fluent setter for fromColumn Attribute.
      Parameters:
      pFromColumn - value to set
      Returns:
      FKColumn
    • getTargetColumn

      public String getTargetColumn()
      Returns targetColumn Attribute.
      Returns:
      targetColumn Attribute
    • setTargetColumn

      public void setTargetColumn(String pTargetColumn)
      Set targetColumn Attribute.
      Parameters:
      pTargetColumn - value to set
    • withTargetColumn

      public FKColumn withTargetColumn(String pTargetColumn)
      fluent setter for targetColumn Attribute.
      Parameters:
      pTargetColumn - value to set
      Returns:
      FKColumn
    • createFKColumn

      public static FKColumn createFKColumn(Consumer<FKColumn.FKColumnBuilder> f)
      create a FKColumn 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>