HDWeightGoal

User's goal for losing weight.

There can be a lot of weight goals but only one active at a time.

See also

Properties

Link copied to clipboard
abstract val addTime: Long?

Time when goal was uploaded to the server as timestamp in milliseconds.

Link copied to clipboard
abstract val changeStatusDate: Timestamp?

Time when goal's status was changed as UNIX Timestamp.

Link copied to clipboard
abstract val goalDate: Timestamp

The time until which user should reach the goal weight as UNIT Timestamp.

Link copied to clipboard
abstract val goalWeight: Double

Weight that user wants to reach in kilograms.

Link copied to clipboard
open val isActive: Boolean

It is true if goal is active (i.e. has status in progress) and false otherwise.

Link copied to clipboard
abstract val plan: GoalPlan

Goal's plan. Plan defines how quickly user want to reach goal.

Link copied to clipboard
abstract val startDate: Timestamp

The time when goal was created as UNIX Timestamp.

Link copied to clipboard
abstract val startWeight: Double

User's weight when goal was created in kilograms.

Link copied to clipboard
abstract val status: GoalStatus

Status of goal.

Link copied to clipboard
abstract val userComment: String?

User's comment.

Inherited properties

Link copied to clipboard
abstract val id: Long?

Unique identifier of entity. It is null until synchronization with the server.

Link copied to clipboard
abstract val isDeleted: Boolean

true if this entity has been deleted and false otherwise.

Link copied to clipboard
abstract val lastUpdate: Long?

Timestamp in milliseconds of last changes of this entity on the server.

Functions

Link copied to clipboard
open fun isEmpty(): Boolean

Check if object is an empty weight goal.

Link copied to clipboard
open fun isSame(another: HDWeightGoal): Boolean

Returns true if goals are the same (i.e. have the same starting date, goal date, plan, start weight and goal weight) and false otherwise.