Package org.ivoa.dm.proposal.management
Class ResourceBlock
java.lang.Object
org.ivoa.dm.proposal.management.ResourceBlock
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations
,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
- Direct Known Subclasses:
AllocatedBlock
@Entity
@VoDml(id="proposalManagement:ResourceBlock",
role=objectType)
public class ResourceBlock
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A block of resources that can be allocated.
objectType: ResourceBlock
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder class for ResourceBlock, mainly for use in the functional builder pattern. -
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a new ResourceBlockResourceBlock
(ResourceBlock other) Copy Constructor.ResourceBlock
(ObservingMode mode, Resource resource) full parameter constructor. -
Method Summary
Modifier and TypeMethodDescriptioncopyMe()
static ResourceBlock
create a ResourceBlock in functional builder style.void
getId()
getMode()
Returns mode ReferenceReturns resource Attributevoid
jpaClone
(jakarta.persistence.EntityManager em) void
persistRefs
(jakarta.persistence.EntityManager _em) void
setMode
(ObservingMode pMode) Defines mode Referencevoid
setResource
(Resource pResource) Defines resource Attributevoid
updates any cloned references that are contained within the hierarchy.void
updateUsing
(ResourceBlock other) Update this object with the content of the given object.withResource
(Resource pResource)
-
Field Details
-
_id
inserted database key -
resource
@VoDml(id="proposalManagement:ResourceBlock.resource", role=composition, type="proposalManagement:Resource", typeRole=objectType) protected Resource resourcethe amount of resource. composition resource : ( Multiplicity : 1 ) -
mode
@VoDml(id="proposalManagement:ResourceBlock.mode", role=reference, type="proposal:ObservingMode", typeRole=objectType) protected ObservingMode modeReferenceObject mode : . ( Multiplicity : 1 )
-
-
Constructor Details
-
ResourceBlock
public ResourceBlock()Creates a new ResourceBlock -
ResourceBlock
full parameter constructor.- Parameters:
mode
- .resource
- the amount of resource.
-
ResourceBlock
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
-
copyMe
-
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.
-
getMode
Returns mode Reference- Returns:
- mode Reference
-
setMode
Defines mode Reference- Parameters:
pMode
- reference to set
-
getResource
Returns resource Attribute- Returns:
- resource Attribute
-
setResource
Defines resource Attribute- Parameters:
pResource
- value to set
-
withResource
-
createResourceBlock
create a ResourceBlock 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
-
jpaClone
public void jpaClone(jakarta.persistence.EntityManager em) - Specified by:
jpaClone
in interfaceorg.ivoa.vodml.jpa.JPAManipulations
-
persistRefs
public void persistRefs(jakarta.persistence.EntityManager _em) - Specified by:
persistRefs
in interfaceorg.ivoa.vodml.jpa.JPAManipulations
-