Package org.ivoa.dm.proposal.management
Class AllocatedBlock
java.lang.Object
org.ivoa.dm.proposal.management.ResourceBlock
org.ivoa.dm.proposal.management.AllocatedBlock
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations
,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="proposalManagement:AllocatedBlock",
role=objectType)
public class AllocatedBlock
extends ResourceBlock
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A block of resources that have been allocated.
objectType: AllocatedBlock
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder class for AllocatedBlock, mainly for use in the functional builder pattern.Nested classes/interfaces inherited from class org.ivoa.dm.proposal.management.ResourceBlock
ResourceBlock.ResourceBlockBuilder
-
Field Summary
Fields inherited from class org.ivoa.dm.proposal.management.ResourceBlock
_id, mode, resource
-
Constructor Summary
ConstructorDescriptionCreates a new AllocatedBlockAllocatedBlock
(AllocatedBlock other) Copy Constructor.AllocatedBlock
(AllocationGrade grade, ObservingMode mode, Resource resource) full parameter constructor.AllocatedBlock
(ResourceBlock superinstance, AllocationGrade grade) Constructor from supertype instance. -
Method Summary
Modifier and TypeMethodDescriptioncopyMe()
make a clone of the object taking into account current polymorhic type.static AllocatedBlock
create a AllocatedBlock in functional builder style.void
getGrade()
Returns grade Referencevoid
persistRefs
(jakarta.persistence.EntityManager _em) Deprecated.generally better to use the model level reference persistence as only this can deal with "contained" references properly.void
setGrade
(AllocationGrade pGrade) Defines grade Referencevoid
updates any cloned references that are contained within the hierarchy.void
updateUsing
(AllocatedBlock other) Update this object with the content of the given object.Methods inherited from class org.ivoa.dm.proposal.management.ResourceBlock
createResourceBlock, getId, getMode, getResource, setMode, setResource, updateUsing, withResource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType
getId
-
Field Details
-
grade
@VoDml(id="proposalManagement:AllocatedBlock.grade", role=reference, type="proposalManagement:AllocationGrade", typeRole=objectType) protected AllocationGrade gradeReferenceObject grade : . ( Multiplicity : 1 )
-
-
Constructor Details
-
AllocatedBlock
public AllocatedBlock()Creates a new AllocatedBlock -
AllocatedBlock
full parameter constructor.- Parameters:
grade
- .mode
- .resource
- the amount of resource.
-
AllocatedBlock
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other
- the object to be copied.
-
AllocatedBlock
Constructor from supertype instance.- Parameters:
superinstance
- The supertype.grade
- .
-
-
Method Details
-
copyMe
make a clone of the object taking into account current polymorhic type.- Overrides:
copyMe
in classResourceBlock
- Returns:
- the cloned object.
-
updateClonedReferences
public void updateClonedReferences()updates any cloned references that are contained within the hierarchy.- Overrides:
updateClonedReferences
in classResourceBlock
-
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.
-
getGrade
Returns grade Reference- Returns:
- grade Reference
-
setGrade
Defines grade Reference- Parameters:
pGrade
- reference to set
-
createAllocatedBlock
create a AllocatedBlock 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
- Overrides:
forceLoad
in classResourceBlock
-
persistRefs
Deprecated.generally better to use the model level reference persistence as only this can deal with "contained" references properly.- Specified by:
persistRefs
in interfaceorg.ivoa.vodml.jpa.JPAManipulations
- Overrides:
persistRefs
in classResourceBlock
-