BrightSide Workbench Full Report + Source Code
org.turro.elephant.entities.db.TimeTracker Class Reference
Inheritance diagram for org.turro.elephant.entities.db.TimeTracker:
Collaboration diagram for org.turro.elephant.entities.db.TimeTracker:

Public Member Functions

String getEntityPath ()
 
void setEntityPath (String entityPath)
 
String getTrackedPath ()
 
void setTrackedPath (String trackedPath)
 
Date getTimeTrack ()
 
void setTimeTrack (Date timeTrack)
 
TimeTrackerType getTrackType ()
 
void setTrackType (TimeTrackerType trackType)
 
double getHours ()
 
void setHours (double hours)
 
boolean isValidated ()
 
void setValidated (boolean validated)
 
LocalDateTime getLocalDateTime ()
 
boolean isEmpty ()
 
boolean isPreviousValid (TimeTracker previous)
 
boolean isToday ()
 
IElephantEntity getEntity ()
 
IElephantEntity getTracked ()
 
int compareTo (TimeTracker o)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 43 of file TimeTracker.java.

Member Function Documentation

◆ compareTo()

int org.turro.elephant.entities.db.TimeTracker.compareTo ( TimeTracker  o)

Definition at line 137 of file TimeTracker.java.

137  {
138  int result = CompareUtil.compare(entityPath, o.entityPath);
139  if(result == 0) {
140  result = CompareUtil.compare(trackedPath, o.trackedPath);
141  }
142  if(result == 0) {
143  result = CompareUtil.compare(timeTrack, o.timeTrack);
144  }
145  return result;
146  }

◆ getEntity()

IElephantEntity org.turro.elephant.entities.db.TimeTracker.getEntity ( )

Definition at line 126 of file TimeTracker.java.

126  {
127  return Entities.getController(entityPath);
128  }
Here is the call graph for this function:

◆ getEntityPath()

String org.turro.elephant.entities.db.TimeTracker.getEntityPath ( )

Definition at line 57 of file TimeTracker.java.

57  {
58  return entityPath;
59  }
Here is the caller graph for this function:

◆ getHours()

double org.turro.elephant.entities.db.TimeTracker.getHours ( )

Definition at line 89 of file TimeTracker.java.

89  {
90  return hours;
91  }

◆ getLocalDateTime()

LocalDateTime org.turro.elephant.entities.db.TimeTracker.getLocalDateTime ( )

Definition at line 107 of file TimeTracker.java.

107  {
108  return LocalDateTime.from(timeTrack.toInstant().atZone(ZoneId.systemDefault()));
109  }
Here is the caller graph for this function:

◆ getTimeTrack()

Date org.turro.elephant.entities.db.TimeTracker.getTimeTrack ( )

Definition at line 73 of file TimeTracker.java.

73  {
74  return timeTrack;
75  }
Here is the caller graph for this function:

◆ getTracked()

IElephantEntity org.turro.elephant.entities.db.TimeTracker.getTracked ( )

Definition at line 130 of file TimeTracker.java.

130  {
131  return Entities.getController(trackedPath);
132  }
Here is the call graph for this function:

◆ getTrackedPath()

String org.turro.elephant.entities.db.TimeTracker.getTrackedPath ( )

Definition at line 65 of file TimeTracker.java.

65  {
66  return trackedPath;
67  }
Here is the caller graph for this function:

◆ getTrackType()

TimeTrackerType org.turro.elephant.entities.db.TimeTracker.getTrackType ( )

Definition at line 81 of file TimeTracker.java.

81  {
82  return trackType;
83  }
Here is the caller graph for this function:

◆ isEmpty()

boolean org.turro.elephant.entities.db.TimeTracker.isEmpty ( )

Definition at line 111 of file TimeTracker.java.

111  {
112  return Strings.isBlank(entityPath) || timeTrack == null || trackType == null;
113  }
Here is the caller graph for this function:

◆ isPreviousValid()

boolean org.turro.elephant.entities.db.TimeTracker.isPreviousValid ( TimeTracker  previous)

Definition at line 115 of file TimeTracker.java.

115  {
116  return previous == null || trackType.isPreviousValid(previous.getTrackType());
117  }
boolean isPreviousValid(TimeTrackerType previousType)
Here is the call graph for this function:

◆ isToday()

boolean org.turro.elephant.entities.db.TimeTracker.isToday ( )

Definition at line 119 of file TimeTracker.java.

119  {
120  return timeTrack.toInstant().truncatedTo(ChronoUnit.DAYS)
121  .equals(Instant.now().truncatedTo(ChronoUnit.DAYS));
122  }

◆ isValidated()

boolean org.turro.elephant.entities.db.TimeTracker.isValidated ( )

Definition at line 97 of file TimeTracker.java.

97  {
98  return validated;
99  }

◆ setEntityPath()

void org.turro.elephant.entities.db.TimeTracker.setEntityPath ( String  entityPath)

Definition at line 61 of file TimeTracker.java.

61  {
62  this.entityPath = entityPath;
63  }
Here is the caller graph for this function:

◆ setHours()

void org.turro.elephant.entities.db.TimeTracker.setHours ( double  hours)

Definition at line 93 of file TimeTracker.java.

93  {
94  this.hours = hours;
95  }

◆ setTimeTrack()

void org.turro.elephant.entities.db.TimeTracker.setTimeTrack ( Date  timeTrack)

Definition at line 77 of file TimeTracker.java.

77  {
78  this.timeTrack = timeTrack;
79  }
Here is the caller graph for this function:

◆ setTrackedPath()

void org.turro.elephant.entities.db.TimeTracker.setTrackedPath ( String  trackedPath)

Definition at line 69 of file TimeTracker.java.

69  {
70  this.trackedPath = trackedPath;
71  }
Here is the caller graph for this function:

◆ setTrackType()

void org.turro.elephant.entities.db.TimeTracker.setTrackType ( TimeTrackerType  trackType)

Definition at line 85 of file TimeTracker.java.

85  {
86  this.trackType = trackType;
87  }
Here is the caller graph for this function:

◆ setValidated()

void org.turro.elephant.entities.db.TimeTracker.setValidated ( boolean  validated)

Definition at line 101 of file TimeTracker.java.

101  {
102  this.validated = validated;
103  }

The documentation for this class was generated from the following file: