Class ForeignKey
java.lang.Object
org.ivoa.dm.registry.vodataservice.ForeignKey
- All Implemented Interfaces:
 org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="VODataService:ForeignKey",
       role=objectType)
public class ForeignKey
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A description of the mapping a foreign key -- a set of
                          columns from one table -- to columns in another table.  
                         
                           When foreign keys are declared in this way, clients can expect
                           that joins constrained with the foreign keys are preformed
                           efficiently (e.g., using an index). 
 objectType:  ForeignKey
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for ForeignKey, mainly for use in the functional builder pattern. - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Longinserted database keyprotected StringA free-text description of what this key points to and what the relationship means.A pair of column names, one from this table and one from the target table that should be used to join the tables in a query.protected StringThe fully qualified name (including catalogue and schema, as applicable) of the table that can be joined with the table containing this foreign key.protected StringAn identifier for a concept in a data model that the association enabled by this key represents. - 
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ForeignKeyfull parameter constructor.ForeignKey(ForeignKey other) Copy Constructor. - 
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a org.ivoa.dm.registry.vodataservice.FKColumn to the composition.static ForeignKeycreate a ForeignKey in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns description Attribute.Returns fkColumn composition as an immutable list.getId()Returns targetTable Attribute.getUtype()Returns utype Attribute.voidRemove a org.ivoa.dm.registry.vodataservice.FKColumn from the composition.voidupdate a org.ivoa.dm.registry.vodataservice.FKColumn in the composition.voidsetDescription(String pDescription) Set description Attribute.voidsetFkColumn(List<FKColumn> pFkColumn) Defines whole fkColumn composition.voidsetTargetTable(String pTargetTable) Set targetTable Attribute.voidSet utype Attribute.voidupdateUsing(ForeignKey other) Update this object with the content of the given object.withDescription(String pDescription) fluent setter for description Attribute.withTargetTable(String pTargetTable) fluent setter for targetTable Attribute.fluent setter for utype Attribute. 
- 
Field Details
- 
_id
inserted database key - 
targetTable
@VoDml(id="VODataService:ForeignKey.targetTable", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String targetTableThe fully qualified name (including catalogue and schema, as applicable) of the table that can be joined with the table containing this foreign key. : Attribute targetTable : multiplicity 1 - 
fkColumn
@VoDml(id="VODataService:ForeignKey.fkColumn", role=composition, type="VODataService:FKColumn", typeRole=objectType) protected List<FKColumn> fkColumnA pair of column names, one from this table and one from the target table that should be used to join the tables in a query. composition fkColumn : ( Multiplicity : 1..* ) - 
description
@VoDml(id="VODataService:ForeignKey.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String descriptionA free-text description of what this key points to and what the relationship means. : Attribute description : multiplicity 0..1 - 
utype
@VoDml(id="VODataService:ForeignKey.utype", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String utypeAn identifier for a concept in a data model that the association enabled by this key represents. 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 
 - 
 - 
Constructor Details
- 
ForeignKey
public ForeignKey()Creates a new ForeignKey - 
ForeignKey
full parameter constructor.- Parameters:
 targetTable- The fully qualified name (including catalogue and schema, as applicable) of the table that can be joined with the table containing this foreign key.fkColumn- A pair of column names, one from this table and one from the target table that should be used to join the tables in a query.description- A free-text description of what this key points to and what the relationship means.utype- An identifier for a concept in a data model that the association enabled by this key represents. 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).
 - 
ForeignKey
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
 other- the object to be copied.
 
 - 
 - 
Method Details
- 
getId
- Specified by:
 getIdin interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>- Returns:
 - the id
 
 - 
updateUsing
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.
 - 
getTargetTable
Returns targetTable Attribute.- Returns:
 - targetTable Attribute
 
 - 
setTargetTable
Set targetTable Attribute.- Parameters:
 pTargetTable- value to set
 - 
withTargetTable
fluent setter for targetTable Attribute.- Parameters:
 pTargetTable- value to set- Returns:
 - ForeignKey
 
 - 
getFkColumn
Returns fkColumn composition as an immutable list.- Returns:
 - fkColumn composition.
 
 - 
setFkColumn
Defines whole fkColumn composition.- Parameters:
 pFkColumn- composition to set.
 - 
addToFkColumn
Add a org.ivoa.dm.registry.vodataservice.FKColumn to the composition.- Parameters:
 p- org.ivoa.dm.registry.vodataservice.FKColumn to add
 - 
removeFromFkColumn
Remove a org.ivoa.dm.registry.vodataservice.FKColumn from the composition.- Parameters:
 p- org.ivoa.dm.registry.vodataservice.FKColumn to remove
 - 
replaceInFkColumn
update a org.ivoa.dm.registry.vodataservice.FKColumn in the composition.- Parameters:
 _p- org.ivoa.dm.registry.vodataservice.FKColumn to update the match is done via the database key
 - 
getDescription
Returns description Attribute.- Returns:
 - description Attribute
 
 - 
setDescription
Set description Attribute.- Parameters:
 pDescription- value to set
 - 
withDescription
fluent setter for description Attribute.- Parameters:
 pDescription- value to set- Returns:
 - ForeignKey
 
 - 
getUtype
Returns utype Attribute.- Returns:
 - utype Attribute
 
 - 
setUtype
Set utype Attribute.- Parameters:
 pUtype- value to set
 - 
withUtype
fluent setter for utype Attribute.- Parameters:
 pUtype- value to set- Returns:
 - ForeignKey
 
 - 
createForeignKey
create a ForeignKey in functional builder style.- Parameters:
 f- the functional builder.- Returns:
 - an object initialized from the builder.
 
 - 
forceLoad
public void forceLoad()- Specified by:
 forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations
 - 
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
 deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
 
 -