@Entity @Status(stage=TEST, unitTests=PARTIAL) @Reviews(value=@Review(by="Kees Schotanus",at="2009-09-19",reason="After adding audit trai functionality")) public class Moon extends AbstractEntity implements Auditable, Serializable
Constructor and Description |
---|
Moon()
Default constructor as required by the JPA specs for unenhanced classes.
|
Moon(String position,
String name)
Constructs this Moon from the supplied position and name.
|
Modifier and Type | Method and Description |
---|---|
AuditTrailData |
getAuditTrailData()
Gets the audit trail data.
|
Long |
getId()
Gets the unique ID of this Moon.
|
String |
getName()
Gets the name of this Moon.
|
Planet |
getPlanet()
Gets the Planet that this Moon orbits.
|
String |
getPosition()
Gets the position (natural ordering) of this Moon.
|
Long |
getPrimaryKey()
Gets the primary key of this persistable entity.
|
void |
setAuditTrailData(AuditTrailData auditTrailData)
Sets the audit trail data.
|
void |
setId(Long id)
Sets the unique ID for this Entity.
|
void |
setName(String name)
Sets the name for this Moon.
|
void |
setPlanet(Planet planet)
Sets the Planet that this Moon orbits.
|
void |
setPosition(String position)
Sets the position (natural ordering) for this Moon.
|
String |
toString()
Creates a String representation of this Moon.
|
equals, getVersion, hashCode, setVersion
public Moon()
public Moon(String position, String name)
Planet.addMoon(Moon)
.position
- The position (or natural ordering) of this Moon.name
- The name of this Moon.public Long getId()
public void setId(Long id)
id
- Unique ID.public Long getPrimaryKey()
getPrimaryKey
in interface Persistable
public Planet getPlanet()
public void setPlanet(Planet planet)
planet
- The Planet that this Moon orbits.public String getPosition()
public void setPosition(String position)
position
- The position (natural ordering) for this Moon.public String getName()
public void setName(String name)
name
- The name for this Moon.public AuditTrailData getAuditTrailData()
getAuditTrailData
in interface Auditable
public void setAuditTrailData(AuditTrailData auditTrailData)
setAuditTrailData
in interface Auditable
auditTrailData
- The audit trail data.Copyright © 2008–2018. All rights reserved.