Package de.hirola.sportslibrary.model
Class RunningUnit
- java.lang.Object
-
- de.hirola.kintojava.model.KintoObject
-
- de.hirola.sportslibrary.PersistentObject
-
- de.hirola.sportslibrary.model.RunningUnit
-
- All Implemented Interfaces:
de.hirola.kintojava.model.KintoModel
public class RunningUnit extends PersistentObject
Copyright 2021 by Michael Schmidt, Hirola Consulting This software us licensed under the AGPL-3.0 or later. A single training unit as part of a training section within a running plan. The movement types can be adjusted and saved. Example: 20 min run- Since:
- 1.1.1
- Author:
- Michael Schmidt (Hirola)
- See Also:
RunningPlanEntry
-
-
Constructor Summary
Constructors Constructor Description RunningUnit()Default constructor for reflection.RunningUnit(int duration, MovementType movementType)Create a running unit of a plan entry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetDuration()Get the duration of the unit.List<String>getIdentityAttributeNames()Get a list of all (persistent) attribute names of the objectMovementTypegetMovementType()Get the type of movement for the unit.booleanisCompleted()Get a flag to determine if unit is completed.voidsetCompleted(boolean completed)Set a flag to determine if unit is completed.voidsetMovementType(MovementType movementType)Set the type of movement for the unit.
-
-
-
Constructor Detail
-
RunningUnit
public RunningUnit()
Default constructor for reflection.
-
RunningUnit
public RunningUnit(int duration, MovementType movementType)Create a running unit of a plan entry.- Parameters:
duration- of the unitmovementType- of the unit
-
-
Method Detail
-
getMovementType
public MovementType getMovementType()
Get the type of movement for the unit.- Returns:
- Type of movement for the unit
-
setMovementType
public void setMovementType(MovementType movementType)
Set the type of movement for the unit.- Parameters:
movementType- type of movement for the unit
-
isCompleted
public boolean isCompleted()
Get a flag to determine if unit is completed.- Returns:
- A flag to determine if unit is completed
-
setCompleted
public void setCompleted(boolean completed)
Set a flag to determine if unit is completed.- Parameters:
completed- A flag to determine if unit is completed
-
getDuration
public long getDuration()
Get the duration of the unit.- Returns:
- The duration of the unit
-
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
-
-