Package org.ivoa.dm.regtap
Class Relationship
java.lang.Object
org.ivoa.dm.regtap.Relationship
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations
,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="RegTAP:Relationship",
role=objectType)
public class Relationship
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Relationships between resources (like mirroring, derivation, serving a data collection).
objectType: Relationship
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A builder class for Relationship, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Long
inserted database keyprotected String
The IVOA identifier for the resource referred to.protected String
The name of resource that this resource is related to.protected String
The type of the relationship; these terms are drawn from a controlled vocabulary and are DataCite-compatible. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new RelationshipRelationship
(String relationship_type, String related_id, String related_name) full parameter constructor.Relationship
(Relationship other) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic Relationship
create a Relationship in functional builder style.void
delete
(jakarta.persistence.EntityManager em) void
getId()
Returns related_id Attribute.Returns related_name Attribute.Returns relationship_type Attribute.void
setRelated_id
(String pRelated_id) Set related_id Attribute.void
setRelated_name
(String pRelated_name) Set related_name Attribute.void
setRelationship_type
(String pRelationship_type) Set relationship_type Attribute.void
updateUsing
(Relationship other) Update this object with the content of the given object.withRelated_id
(String pRelated_id) fluent setter for related_id Attribute.withRelated_name
(String pRelated_name) fluent setter for related_name Attribute.withRelationship_type
(String pRelationship_type) fluent setter for relationship_type Attribute.
-
Field Details
-
_id
inserted database key -
relationship_type
@VoDml(id="RegTAP:Relationship.relationship_type", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String relationship_typeThe type of the relationship; these terms are drawn from a controlled vocabulary and are DataCite-compatible. : Attribute relationship_type : multiplicity 1
-
-
Constructor Details
-
Relationship
public Relationship()Creates a new Relationship -
Relationship
full parameter constructor.- Parameters:
relationship_type
- The type of the relationship; these terms are drawn from a controlled vocabulary and are DataCite-compatible.related_id
- The IVOA identifier for the resource referred to.related_name
- The name of resource that this resource is related to.
-
Relationship
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:
getId
in 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.
-
getRelationship_type
Returns relationship_type Attribute.- Returns:
- relationship_type Attribute
-
setRelationship_type
Set relationship_type Attribute.- Parameters:
pRelationship_type
- value to set
-
withRelationship_type
fluent setter for relationship_type Attribute.- Parameters:
pRelationship_type
- value to set- Returns:
- Relationship
-
getRelated_id
Returns related_id Attribute.- Returns:
- related_id Attribute
-
setRelated_id
Set related_id Attribute.- Parameters:
pRelated_id
- value to set
-
withRelated_id
fluent setter for related_id Attribute.- Parameters:
pRelated_id
- value to set- Returns:
- Relationship
-
getRelated_name
Returns related_name Attribute.- Returns:
- related_name Attribute
-
setRelated_name
Set related_name Attribute.- Parameters:
pRelated_name
- value to set
-
withRelated_name
fluent setter for related_name Attribute.- Parameters:
pRelated_name
- value to set- Returns:
- Relationship
-
createRelationship
create a Relationship in functional builder style.- Parameters:
f
- the functional builder.- Returns:
- an object initialized from the builder.
-
forceLoad
public void forceLoad()- Specified by:
forceLoad
in interfaceorg.ivoa.vodml.jpa.JPAManipulations
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
delete
in interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-