Package org.ivoa.dm.tapschema
Class Schema
java.lang.Object
org.ivoa.dm.tapschema.Schema
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations
,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>
@Entity
@VoDml(id="tapschema:Schema",
role=objectType)
public class Schema
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>
The schema.
objectType: Schema
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A builder class for Schema, mainly for use in the functional builder pattern. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToTables
(Table p) Add a org.ivoa.dm.tapschema.Table to the composition.static Schema
create a Schema in functional builder style.void
delete
(jakarta.persistence.EntityManager em) void
Returns description Attribute.getId()
return the database key id.Returns schema_index Attribute.Returns schema_name Attribute.Returns tables composition as an immutable list.getUtype()
Returns utype Attribute.void
Remove a org.ivoa.dm.tapschema.Table from the composition.void
replaceInTables
(Table _p) update a org.ivoa.dm.tapschema.Table in the composition.void
setDescription
(String pDescription) Set description Attribute.void
setSchema_index
(Integer pSchema_index) Set schema_index Attribute.void
setSchema_name
(String pSchema_name) Set schema_name Attribute.void
Defines whole tables composition.void
Set utype Attribute.void
updates any cloned references that are contained within the hierarchy.void
updateUsing
(Schema other) Update this object with the content of the given object.withDescription
(String pDescription) fluent setter for description Attribute.withSchema_index
(Integer pSchema_index) fluent setter for schema_index Attribute.withSchema_name
(String pSchema_name) fluent setter for schema_name Attribute.fluent setter for utype Attribute.
-
Field Details
-
schema_name
@VoDml(id="tapschema:Schema.schema_name", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String schema_nameThe name of the schema . : Attribute schema_name : multiplicity 1 -
utype
@VoDml(id="tapschema:Schema.utype", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String utypeutype. : Attribute utype : multiplicity 0..1 -
description
@VoDml(id="tapschema:Schema.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String descriptiondescription. : Attribute description : multiplicity 0..1 -
schema_index
@VoDml(id="tapschema:Schema.schema_index", role=attribute, type="ivoa:integer", typeRole=primitiveType) protected Integer schema_indexused to recommend table ordering for clients. Clients may order by index (ascending) so lower index items would appear earlier in a listing. : Attribute schema_index : multiplicity 0..1 -
tables
@VoDml(id="tapschema:Schema.tables", role=composition, type="tapschema:table", typeRole=objectType) protected List<Table> tablesthe tables. composition tables : ( Multiplicity : 1..* )
-
-
Constructor Details
-
Schema
public Schema()Creates a new Schema -
Schema
public Schema(String schema_name, String utype, String description, Integer schema_index, List<Table> tables) full parameter constructor.- Parameters:
schema_name
- The name of the schema .utype
- utype.description
- description.schema_index
- used to recommend table ordering for clients. Clients may order by index (ascending) so lower index items would appear earlier in a listing.tables
- the tables.
-
Schema
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other
- the object to be copied.
-
-
Method Details
-
updateClonedReferences
public void updateClonedReferences()updates any cloned references that are contained within the hierarchy. -
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.
-
getSchema_name
Returns schema_name Attribute.- Returns:
- schema_name Attribute
-
setSchema_name
Set schema_name Attribute.- Parameters:
pSchema_name
- value to set
-
withSchema_name
fluent setter for schema_name Attribute.- Parameters:
pSchema_name
- value to set- Returns:
- Schema
-
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:
- Schema
-
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:
- Schema
-
getSchema_index
Returns schema_index Attribute.- Returns:
- schema_index Attribute
-
setSchema_index
Set schema_index Attribute.- Parameters:
pSchema_index
- value to set
-
withSchema_index
fluent setter for schema_index Attribute.- Parameters:
pSchema_index
- value to set- Returns:
- Schema
-
getTables
Returns tables composition as an immutable list.- Returns:
- tables composition.
-
setTables
Defines whole tables composition.- Parameters:
pTables
- composition to set.
-
addToTables
Add a org.ivoa.dm.tapschema.Table to the composition.- Parameters:
p
- org.ivoa.dm.tapschema.Table to add
-
removeFromTables
Remove a org.ivoa.dm.tapschema.Table from the composition.- Parameters:
p
- org.ivoa.dm.tapschema.Table to remove
-
replaceInTables
update a org.ivoa.dm.tapschema.Table in the composition.- Parameters:
_p
- org.ivoa.dm.tapschema.Table to update the match is done via the database key
-
getId
return the database key id. Note that this is the same as attribute schema_name.- Specified by:
getId
in interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>
- Returns:
- the id
-
createSchema
create a Schema 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<String>
-