Class AvailableResources

java.lang.Object
org.ivoa.dm.proposal.management.AvailableResources
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>

@Entity @VoDml(id="proposalManagement:AvailableResources", role=objectType) public class AvailableResources extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
The list of resources that are available. objectType: AvailableResources
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • resources

      @VoDml(id="proposalManagement:AvailableResources.resources", role=composition, type="proposalManagement:Resource", typeRole=objectType) protected List<Resource> resources
      . composition resources : ( Multiplicity : 0..* )
  • Constructor Details

    • AvailableResources

      public AvailableResources()
      Creates a new AvailableResources
    • AvailableResources

      public AvailableResources(List<Resource> resources)
      full parameter constructor.
      Parameters:
      resources - .
    • AvailableResources

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

    • getId

      public Long getId()
      Specified by:
      getId in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
      Returns:
      the id
    • updateUsing

      public void updateUsing(AvailableResources 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.
    • getResources

      public List<Resource> getResources()
      Returns resources composition as an immutable list.
      Returns:
      resources composition.
    • setResources

      public void setResources(List<Resource> pResources)
      Defines whole resources composition.
      Parameters:
      pResources - composition to set.
    • addToResources

      public void addToResources(Resource p)
      Add a org.ivoa.dm.proposal.management.Resource to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.Resource to add
    • removeFromResources

      public void removeFromResources(Resource p)
      Remove a org.ivoa.dm.proposal.management.Resource from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.Resource to remove
    • replaceInResources

      public void replaceInResources(Resource _p)
      update a org.ivoa.dm.proposal.management.Resource in the composition.
      Parameters:
      _p - org.ivoa.dm.proposal.management.Resource to update the match is done via the database key
    • createAvailableResources

      public static AvailableResources createAvailableResources(Consumer<AvailableResources.AvailableResourcesBuilder> f)
      create a AvailableResources 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
    • persistRefs

      @Deprecated public void persistRefs(jakarta.persistence.EntityManager _em)
      Deprecated.
      generally better to use the model level reference persistence as only this can deal with "contained" references properly.
      Specified by:
      persistRefs in interface org.ivoa.vodml.jpa.JPAManipulations