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 classA builder class for Schema, mainly for use in the functional builder pattern. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToTables(Table p) Add a org.ivoa.dm.tapschema.Table to the composition.static Schemacreate a Schema in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns 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.voidRemove a org.ivoa.dm.tapschema.Table from the composition.voidreplaceInTables(Table _p) update a org.ivoa.dm.tapschema.Table in the composition.voidsetDescription(String pDescription) Set description Attribute.voidsetSchema_index(Integer pSchema_index) Set schema_index Attribute.voidsetSchema_name(String pSchema_name) Set schema_name Attribute.voidDefines whole tables composition.voidSet utype Attribute.voidupdates any cloned references that are contained within the hierarchy.voidupdateUsing(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:
getIdin 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:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<String>
-