Package org.ivoa.dm.execution
Class PhysicalLocation
java.lang.Object
org.ivoa.dm.execution.PhysicalLocation
- All Implemented Interfaces:
org.ivoa.vodml.jaxb.XmlIdManagement,org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="execution:PhysicalLocation",
role=objectType)
public class PhysicalLocation
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>, org.ivoa.vodml.jaxb.XmlIdManagement
The physical location of a resource.
objectType: PhysicalLocation
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for PhysicalLocation, mainly for use in the functional builder pattern. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new PhysicalLocationPhysicalLocation(String name, String country, Double longitude, Double latitude) full parameter constructor.PhysicalLocation(PhysicalLocation other) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic PhysicalLocationcreate a PhysicalLocation in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns country Attribute.getId()Returns latitude Attribute.Returns longitude Attribute.getName()Returns name Attribute.getXmlId()getter for XMLIDbooleanvoidsetCountry(String pCountry) Set country Attribute.voidsetLatitude(Double pLatitude) Set latitude Attribute.voidsetLongitude(Double pLongitude) Set longitude Attribute.voidSet name Attribute.voidvoidupdateUsing(PhysicalLocation other) Update this object with the content of the given object.withCountry(String pCountry) fluent setter for country Attribute.withLatitude(Double pLatitude) fluent setter for latitude Attribute.withLongitude(Double pLongitude) fluent setter for longitude Attribute.fluent setter for name Attribute.
-
Field Details
-
_id
inserted database key -
name
@VoDml(id="execution:PhysicalLocation.name", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String nameA human readable name for the location. : Attribute name type ivoa:string : multiplicity 1 -
country
@VoDml(id="execution:PhysicalLocation.country", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String countryCountry name. : Attribute country type ivoa:string : multiplicity 1 -
longitude
@VoDml(id="execution:PhysicalLocation.longitude", role=attribute, type="ivoa:real", typeRole=primitiveType) protected Double longitudeLongitude in degrees. : Attribute longitude type ivoa:real : multiplicity 1 -
latitude
@VoDml(id="execution:PhysicalLocation.latitude", role=attribute, type="ivoa:real", typeRole=primitiveType) protected Double latitudeLatitude in degrees. : Attribute latitude type ivoa:real : multiplicity 1
-
-
Constructor Details
-
PhysicalLocation
public PhysicalLocation()Creates a new PhysicalLocation -
PhysicalLocation
full parameter constructor.- Parameters:
name- A human readable name for the location.country- Country name.longitude- Longitude in degrees.latitude- Latitude in degrees.
-
PhysicalLocation
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:
getIdin interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>- Returns:
- the id
-
getXmlId
getter for XMLID- Specified by:
getXmlIdin interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
setXmlId
- Specified by:
setXmlIdin interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
hasNaturalKey
public boolean hasNaturalKey()- Specified by:
hasNaturalKeyin interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
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.
-
getName
Returns name Attribute.- Returns:
- name Attribute
-
setName
Set name Attribute.- Parameters:
pName- value to set
-
withName
fluent setter for name Attribute.- Parameters:
pName- value to set- Returns:
- PhysicalLocation
-
getCountry
Returns country Attribute.- Returns:
- country Attribute
-
setCountry
Set country Attribute.- Parameters:
pCountry- value to set
-
withCountry
fluent setter for country Attribute.- Parameters:
pCountry- value to set- Returns:
- PhysicalLocation
-
getLongitude
Returns longitude Attribute.- Returns:
- longitude Attribute
-
setLongitude
Set longitude Attribute.- Parameters:
pLongitude- value to set
-
withLongitude
fluent setter for longitude Attribute.- Parameters:
pLongitude- value to set- Returns:
- PhysicalLocation
-
getLatitude
Returns latitude Attribute.- Returns:
- latitude Attribute
-
setLatitude
Set latitude Attribute.- Parameters:
pLatitude- value to set
-
withLatitude
fluent setter for latitude Attribute.- Parameters:
pLatitude- value to set- Returns:
- PhysicalLocation
-
createPhysicalLocation
public static PhysicalLocation createPhysicalLocation(Consumer<PhysicalLocation.PhysicalLocationBuilder> f) create a PhysicalLocation in functional builder style.- Parameters:
f- the functional builder.- Returns:
- an object initialized from the builder.
-
forceLoad
public void forceLoad()- Specified by:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-