Package de.hirola.sportslibrary.model
Class TrainingType
- java.lang.Object
-
- de.hirola.kintojava.model.KintoObject
-
- de.hirola.sportslibrary.PersistentObject
-
- de.hirola.sportslibrary.model.TrainingType
-
- All Implemented Interfaces:
de.hirola.kintojava.model.KintoModel
public class TrainingType extends PersistentObject
Copyright 2021 by Michael Schmidt, Hirola Consulting This software us licensed under the AGPL-3.0 or later. An object represents the type of training, currently bike and running training.- Since:
- 1.1.1
- Author:
- Michael Schmidt (Hirola)
-
-
Constructor Summary
Constructors Constructor Description TrainingType()Default constructor for reflection.TrainingType(@NotNull String name, @Nullable String remarks, @Nullable String imageName, double speed)Create a type of training.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)List<String>getIdentityAttributeNames()Get a list of all (persistent) attribute names of the objectStringgetImageName()Get the name of the image for the training type.StringgetName()Get the name of the training type.StringgetRemarks()Get remarks of the training type.doublegetSpeed()Get the speed of the training type.inthashCode()voidsetImageName(String imageName)Set name of the image for the training type.voidsetName(String name)Set the last name of the training type.voidsetRemarks(String remarks)Set the remarks of the training type.voidsetSpeed(double speed)Set the speed for the training type.
-
-
-
Method Detail
-
getName
public String getName()
Get the name of the training type.- Returns:
- The name of training type
-
setName
public void setName(String name)
Set the last name of the training type.- Parameters:
name- of the training type.
-
getImageName
public String getImageName()
Get the name of the image for the training type.- Returns:
- The name of image
-
setImageName
public void setImageName(String imageName)
Set name of the image for the training type.- Parameters:
imageName- for the training type
-
getRemarks
public String getRemarks()
Get remarks of the training type.- Returns:
- The remarks of the training type
-
setRemarks
public void setRemarks(String remarks)
Set the remarks of the training type.- Parameters:
remarks- of the training type
-
getSpeed
public double getSpeed()
Get the speed of the training type.- Returns:
- The speed of the training type
-
setSpeed
public void setSpeed(double speed)
Set the speed for the training type. Approximate speed of the training type in km/h. The type can thus be suggested on the basis of recorded training sessions.- Parameters:
speed- of the training
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classde.hirola.kintojava.model.KintoObject
-
hashCode
public int hashCode()
- Overrides:
hashCodein classde.hirola.kintojava.model.KintoObject
-
getIdentityAttributeNames
public List<String> getIdentityAttributeNames()
Description copied from class:PersistentObjectGet a list of all (persistent) attribute names of the object- Specified by:
getIdentityAttributeNamesin classPersistentObject- Returns:
- A list of all (persistent) attribute names of the object
-
-