Class DatedAccomplishment
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.stats.Accomplishment
org.deltava.beans.stats.DatedAccomplishment
- All Implemented Interfaces:
Serializable, Cloneable, Comparable<Object>, Auditable, ComboAlias, IDBean, RGBColor, ViewEntry, Cacheable
A bean to combine an Accomplishment with an Achievement date.
- Since:
- 3.2
- Version:
- 11.0
- Author:
- Luke
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDatedAccomplishment(int pilotID, Instant dt, Accomplishment a) Creates the bean. -
Method Summary
Methods inherited from class Accomplishment
cacheKey, equals, getActive, getAlwaysDisplay, getAuditID, getChoices, getColor, getComboAlias, getComboName, getName, getOwner, getPilots, getRowClassName, getUnit, getValue, hashCode, isCrossApp, renameChoice, setActive, setAlwaysDisplay, setChoices, setColor, setName, setOwner, setPilots, setUnit, setValueModifier and TypeMethodDescriptioncacheKey()Returns the cache key for this object.booleanbooleanReturns whether this Accomplishment is active.booleanReturns whether the Accomplishment should always display, even if the Pilot has achieved an accomplishment with the same Unit and a higher count.Returns the object ID for this auditable object.Returns the choices for this Accomplishment.intgetColor()Returns the RGB color.Returns the alias to use in the HTML <OPTION> element.Returns the visible name to use in the HTML <OPTION> element.getName()Returns the Accomplishment name.getOwner()Returns the owning Airline of this Accomplishment.intReturns the number of Pilots who have achieved this Accomplishment.Returns the CSS class for this object if rendered in a view table.getUnit()Returns the Accomplishment unit.intgetValue()Returns the Accomplishment value.inthashCode()booleanReturns whether this object is within multiple web applications.booleanrenameChoice(String oc, String nc) Renames one of the Accomplishment choices.voidsetActive(boolean isActive) Updates whether this Accomplishment is active.voidsetAlwaysDisplay(boolean show) Sets the Accomplishment to always display, even if the Pilot has achieved an accomplishment with the same Unit and a higher count.voidsetChoices(Collection<String> choices) Updates the choices for this Accomplishment.voidsetColor(int c) Updates the color used to display this Accomplishment.voidUpdates the accomplishment name.voidsetOwner(AirlineInformation info) Updates the Owner of this Accomplishment.voidsetPilots(int cnt) Updates the number of Pilots that have achieved this Accomplishment.voidUpdates the unit of measurement.voidsetValue(int value) Updates the number of units required for this Accomplishment.Methods inherited from class DatabaseBean
getHexID, getID, setID, validateID, validateIDModifier and TypeMethodDescriptiongetHexID()Returns the hexadecimal database ID of this object.intgetID()Returns the database ID of this object.voidsetID(int id) Update the database row ID of this bean.static voidvalidateID(int oldID, int newID) Validates a database ID.static voidvalidateID(int oldID, int newID, boolean allowZero) Validates a database ID.Methods inherited from interface Auditable
getAuditTypeModifier and TypeMethodDescriptiondefault StringReturns the audit type for this auditable object.Methods inherited from interface RGBColor
getHexColorModifier and TypeMethodDescriptiondefault StringReturns the RGB color as a 24-bit hexadecimal string.
-
Constructor Details
-
DatedAccomplishment
Creates the bean.- Parameters:
pilotID- the Pilot's database IDdt- the date/time the Accomplishment was achieved.a- the Accomplishment
-
-
Method Details
-
getPilotID
public int getPilotID()Returns the Pilot's database ID.- Returns:
- the ID or zero if none
-
getDate
Returns the date the Accomplishment was achieved.- Returns:
- the date/time of the Accomplishment
-
toString
- Overrides:
toStringin classAccomplishment
-
compareTo
Compares two DatedAccomplishments by comparing their accomplishment date/times. If they are equal, it sorts using Accomplishment's native comparator.- Specified by:
compareToin interfaceComparable<Object>- Overrides:
compareToin classAccomplishment
-