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
  • Field Details

    • grade

      @VoDml(id="proposalManagement:AllocatedBlock.grade", role=reference, type="proposalManagement:AllocationGrade", typeRole=objectType) protected AllocationGrade grade
      ReferenceObject grade : . ( Multiplicity : 1 )
  • Constructor Details

    • AllocatedBlock

      public AllocatedBlock()
      Creates a new AllocatedBlock
    • AllocatedBlock

      public AllocatedBlock(AllocationGrade grade, ObservingMode mode, Resource resource)
      full parameter constructor.
      Parameters:
      grade - .
      mode - .
      resource - the amount of resource.
    • AllocatedBlock

      public AllocatedBlock(AllocatedBlock other)
      Copy Constructor. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
    • AllocatedBlock

      public AllocatedBlock(ResourceBlock superinstance, AllocationGrade grade)
      Constructor from supertype instance.
      Parameters:
      superinstance - The supertype.
      grade - .
  • Method Details

    • copyMe

      public ResourceBlock copyMe()
      Overrides:
      copyMe in class ResourceBlock
    • updateClonedReferences

      public void updateClonedReferences()
      updates any cloned references that are contained within the hierarchy.
      Overrides:
      updateClonedReferences in class ResourceBlock
    • updateUsing

      public void updateUsing(AllocatedBlock other)
      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

      public AllocationGrade getGrade()
      Returns grade Reference
      Returns:
      grade Reference
    • setGrade

      public void setGrade(AllocationGrade pGrade)
      Defines grade Reference
      Parameters:
      pGrade - reference to set
    • createAllocatedBlock

      public static AllocatedBlock createAllocatedBlock(Consumer<AllocatedBlock.AllocatedBlockBuilder> f)
      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 interface org.ivoa.vodml.jpa.JPAManipulations
      Overrides:
      forceLoad in class ResourceBlock
    • jpaClone

      public void jpaClone(jakarta.persistence.EntityManager em)
      Specified by:
      jpaClone in interface org.ivoa.vodml.jpa.JPAManipulations
      Overrides:
      jpaClone in class ResourceBlock
    • persistRefs

      public void persistRefs(jakarta.persistence.EntityManager _em)
      Specified by:
      persistRefs in interface org.ivoa.vodml.jpa.JPAManipulations
      Overrides:
      persistRefs in class ResourceBlock