Package org.ivoa.dm.executionbroker
Class SimpleStorageResource
java.lang.Object
org.ivoa.dm.executionbroker.AbstractComponent
org.ivoa.dm.executionbroker.LifecycleComponent
org.ivoa.dm.executionbroker.AbstractStorageResource
org.ivoa.dm.executionbroker.SimpleStorageResource
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="execbroker:SimpleStorageResource",
role=objectType)
public class SimpleStorageResource
extends AbstractStorageResource
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A simple storage resource.
objectType: SimpleStorageResource
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for SimpleStorageResource, mainly for use in the functional builder pattern. -
Field Summary
FieldsFields inherited from class org.ivoa.dm.executionbroker.LifecycleComponent
phase, scheduleFields inherited from class org.ivoa.dm.executionbroker.AbstractComponent
_id, kind, meta -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new SimpleStorageResourceSimpleStorageResource(AbstractStorageResource superinstance, SimpleStorageSize size) Constructor from supertype instance.Copy Constructor.SimpleStorageResource(SimpleStorageSize size, LifecyclePhase phase, LifecycleSchedule schedule, String kind, ComponentMetadata meta) full parameter constructor. -
Method Summary
Modifier and TypeMethodDescriptioncopyMe()make a clone of the object taking into account current polymorhic type.static SimpleStorageResourcecreate a SimpleStorageResource in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidgetSize()Returns size Attribute.voidsetSize(SimpleStorageSize pSize) Set size Attribute.voidupdateUsing(SimpleStorageResource other) Update this object with the content of the given object.withSize(SimpleStorageSize pSize) fluent setter for size Attribute.Methods inherited from class org.ivoa.dm.executionbroker.AbstractStorageResource
updateUsingMethods inherited from class org.ivoa.dm.executionbroker.LifecycleComponent
getPhase, getSchedule, setPhase, setSchedule, updateUsing, withPhase, withScheduleMethods 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
-
size
@VoDml(id="execbroker:SimpleStorageResource.size", role=attribute, type="execbroker:SimpleStorageSize", typeRole=dataType) protected SimpleStorageSize size. : Attribute size : multiplicity 1
-
-
Constructor Details
-
SimpleStorageResource
public SimpleStorageResource()Creates a new SimpleStorageResource -
SimpleStorageResource
public SimpleStorageResource(SimpleStorageSize size, LifecyclePhase phase, LifecycleSchedule schedule, String kind, ComponentMetadata meta) full parameter constructor.- Parameters:
size- .phase- The lifecycle phase.schedule- The lifecycle schedule.kind- The component type identifier.meta- The component metadata.
-
SimpleStorageResource
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
SimpleStorageResource
Constructor from supertype instance.- Parameters:
superinstance- The supertype.size- .
-
-
Method Details
-
copyMe
make a clone of the object taking into account current polymorhic type.- Specified by:
copyMein classAbstractStorageResource- 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.
-
getSize
Returns size Attribute.- Returns:
- size Attribute
-
setSize
Set size Attribute.- Parameters:
pSize- value to set
-
withSize
fluent setter for size Attribute.- Parameters:
pSize- value to set- Returns:
- SimpleStorageResource
-
createSimpleStorageResource
public static SimpleStorageResource createSimpleStorageResource(Consumer<SimpleStorageResource.SimpleStorageResourceBuilder> f) create a SimpleStorageResource 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 classAbstractStorageResource
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-