Package org.ivoa.dm.executionbroker
Class SimpleVolumeMount
java.lang.Object
org.ivoa.dm.executionbroker.AbstractComponent
org.ivoa.dm.executionbroker.AbstractVolumeMount
org.ivoa.dm.executionbroker.SimpleVolumeMount
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="execbroker:SimpleVolumeMount",
role=objectType)
public class SimpleVolumeMount
extends AbstractVolumeMount
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A simple volume mount.
objectType: SimpleVolumeMount
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for SimpleVolumeMount, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringIf cardinality is set to INSTANCE, then this volume-mount will mount a single resource at the location set by path.protected StringThe read-write access mode.protected StringThe filesystem mount point.A list of the data resources in this volume mount.Fields inherited from class org.ivoa.dm.executionbroker.AbstractComponent
_id, kind, meta -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new SimpleVolumeMountSimpleVolumeMount(String path, String mode, String cardinality, List<String> resources, String kind, ComponentMetadata meta) full parameter constructor.SimpleVolumeMount(AbstractVolumeMount superinstance, String path, String mode, String cardinality, List<String> resources) Constructor from supertype instance.Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncopyMe()make a clone of the object taking into account current polymorhic type.static SimpleVolumeMountcreate a SimpleVolumeMount in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns cardinality Attribute.getMode()Returns mode Attribute.getPath()Returns path Attribute.Returns resources Attribute.voidsetCardinality(String pCardinality) Set cardinality Attribute.voidSet mode Attribute.voidSet path Attribute.voidsetResources(List<String> pResources) Set resources Attribute.voidupdateUsing(SimpleVolumeMount other) Update this object with the content of the given object.withCardinality(String pCardinality) fluent setter for cardinality Attribute.fluent setter for mode Attribute.fluent setter for path Attribute.withResources(List<String> pResources) fluent setter for resources Attribute.Methods inherited from class org.ivoa.dm.executionbroker.AbstractVolumeMount
updateUsingMethods inherited from class org.ivoa.dm.executionbroker.AbstractComponent
getId, getKind, getMeta, setKind, setMeta, updateUsing, withKind, withMetaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType
getId
-
Field Details
-
path
@VoDml(id="execbroker:SimpleVolumeMount.path", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String pathThe filesystem mount point. : Attribute path : multiplicity 1 -
mode
@VoDml(id="execbroker:SimpleVolumeMount.mode", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String modeThe read-write access mode. : Attribute mode : multiplicity 1 -
cardinality
@VoDml(id="execbroker:SimpleVolumeMount.cardinality", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String cardinalityIf cardinality is set to INSTANCE, then this volume-mount will mount a single resource at the location set by path. If cardinality is set to CONTAINER, then this volume-mount will create a directory in the target file system, at the location set by path, and mount the resources within that directory. : Attribute cardinality : multiplicity 1 -
resources
@VoDml(id="execbroker:SimpleVolumeMount.resources", role=attribute, type="ivoa:string", typeRole=primitiveType) protected List<String> resourcesA list of the data resources in this volume mount. If cardinality is set to INSTANCE then this list should only contain one resource. If cardinality is set to INSTANCE and this list has more than one resource, it should fail validation. If cardinality is set to CONTAINER then this list may contain more than one resource. : Attribute resources : multiplicity 1..*
-
-
Constructor Details
-
SimpleVolumeMount
public SimpleVolumeMount()Creates a new SimpleVolumeMount -
SimpleVolumeMount
public SimpleVolumeMount(String path, String mode, String cardinality, List<String> resources, String kind, ComponentMetadata meta) full parameter constructor.- Parameters:
path- The filesystem mount point.mode- The read-write access mode.cardinality- If cardinality is set to INSTANCE, then this volume-mount will mount a single resource at the location set by path. If cardinality is set to CONTAINER, then this volume-mount will create a directory in the target file system, at the location set by path, and mount the resources within that directory.resources- A list of the data resources in this volume mount. If cardinality is set to INSTANCE then this list should only contain one resource. If cardinality is set to INSTANCE and this list has more than one resource, it should fail validation. If cardinality is set to CONTAINER then this list may contain more than one resource.kind- The component type identifier.meta- The component metadata.
-
SimpleVolumeMount
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
SimpleVolumeMount
public SimpleVolumeMount(AbstractVolumeMount superinstance, String path, String mode, String cardinality, List<String> resources) Constructor from supertype instance.- Parameters:
superinstance- The supertype.path- The filesystem mount point.mode- The read-write access mode.cardinality- If cardinality is set to INSTANCE, then this volume-mount will mount a single resource at the location set by path. If cardinality is set to CONTAINER, then this volume-mount will create a directory in the target file system, at the location set by path, and mount the resources within that directory.resources- A list of the data resources in this volume mount. If cardinality is set to INSTANCE then this list should only contain one resource. If cardinality is set to INSTANCE and this list has more than one resource, it should fail validation. If cardinality is set to CONTAINER then this list may contain more than one resource.
-
-
Method Details
-
copyMe
make a clone of the object taking into account current polymorhic type.- Specified by:
copyMein classAbstractVolumeMount- Returns:
- the cloned object.
-
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.
-
getPath
Returns path Attribute.- Returns:
- path Attribute
-
setPath
Set path Attribute.- Parameters:
pPath- value to set
-
withPath
fluent setter for path Attribute.- Parameters:
pPath- value to set- Returns:
- SimpleVolumeMount
-
getMode
Returns mode Attribute.- Returns:
- mode Attribute
-
setMode
Set mode Attribute.- Parameters:
pMode- value to set
-
withMode
fluent setter for mode Attribute.- Parameters:
pMode- value to set- Returns:
- SimpleVolumeMount
-
getCardinality
Returns cardinality Attribute.- Returns:
- cardinality Attribute
-
setCardinality
Set cardinality Attribute.- Parameters:
pCardinality- value to set
-
withCardinality
fluent setter for cardinality Attribute.- Parameters:
pCardinality- value to set- Returns:
- SimpleVolumeMount
-
getResources
Returns resources Attribute.- Returns:
- resources Attribute
-
setResources
Set resources Attribute.- Parameters:
pResources- value to set
-
withResources
fluent setter for resources Attribute.- Parameters:
pResources- value to set- Returns:
- SimpleVolumeMount
-
createSimpleVolumeMount
public static SimpleVolumeMount createSimpleVolumeMount(Consumer<SimpleVolumeMount.SimpleVolumeMountBuilder> f) create a SimpleVolumeMount 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- Overrides:
forceLoadin classAbstractVolumeMount
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-