Class AstroObject

java.lang.Object
org.ivoa.dm.demodm.catalog.AstroObject
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Direct Known Subclasses:
AbstractSource

@Entity @VoDml(id="DemoDM:catalog.AstroObject", role=objectType) public abstract class AstroObject extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Generic base class for all astronomical objects. objectType: AstroObject
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • objectType

      @VoDml(id="DemoDM:catalog.AstroObject.objectType", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String objectType
      . : Attribute objectType : multiplicity 0..1
  • Constructor Details

    • AstroObject

      public AstroObject()
      Creates a new AstroObject
    • AstroObject

      public AstroObject(String objectType)
      full parameter constructor.
      Parameters:
      objectType - .
    • AstroObject

      public AstroObject(AstroObject 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
    • copyMe

      public abstract AstroObject copyMe()
      make a clone of the object taking into account current polymorhic type.
      Returns:
      the cloned object.
    • updateClonedReferences

      public void updateClonedReferences()
      updates any cloned references that are contained within the hierarchy.
    • updateUsing

      public void updateUsing(AstroObject 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.
    • getObjectType

      public String getObjectType()
      Returns objectType Attribute.
      Returns:
      objectType Attribute
    • setObjectType

      public void setObjectType(String pObjectType)
      Set objectType Attribute.
      Parameters:
      pObjectType - value to set
    • withObjectType

      public AstroObject withObjectType(String pObjectType)
      fluent setter for objectType Attribute.
      Parameters:
      pObjectType - value to set
      Returns:
      AstroObject
    • forceLoad

      public void forceLoad()
      Specified by:
      forceLoad in interface org.ivoa.vodml.jpa.JPAManipulations