api.basecamp
Class TimeEntry

java.lang.Object
  extended by api.basecamp.TimeEntry

public class TimeEntry
extends java.lang.Object

TimeEntry Object for use with BaseCamp API

Author:
jondavidjohn

Constructor Summary
TimeEntry(BCAuth auth)
          Empty (Unsaved) Time Entry Object NOTE: IS NOT SAVED TO BASECAMP UNTIL CALL TO `.save()`
TimeEntry(BCAuth auth, int timeEntryId)
          Build time entry from ID
 
Method Summary
 java.util.Calendar getDate()
           
 java.lang.String getDescription()
           
 double getHours()
           
 int getId()
           
 int getPersonId()
           
 int getProjectId()
           
 int getToDoItemId()
           
 boolean save()
          Save the time Entry in its current state Will also create new if entry is un-saved ( id is 0 )
 void setDate(java.util.Calendar date)
           
 void setDescription(java.lang.String description)
           
 void setHours(double hours)
           
 void setPersonId(int personId)
           
 void setProjectId(int projectId)
           
 void setToDoItemId(int toDoItemId)
           
 boolean trash()
          Delete this entry from the BaseCamp System
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeEntry

public TimeEntry(BCAuth auth)
Empty (Unsaved) Time Entry Object NOTE: IS NOT SAVED TO BASECAMP UNTIL CALL TO `.save()`

Parameters:
auth - BCAuth Object

TimeEntry

public TimeEntry(BCAuth auth,
                 int timeEntryId)
Build time entry from ID

Parameters:
auth - BCAuth Object
timeEntryId - ID of entry
Method Detail

save

public boolean save()
Save the time Entry in its current state Will also create new if entry is un-saved ( id is 0 )

Returns:
Boolean depending on success of operation

trash

public boolean trash()
Delete this entry from the BaseCamp System

Returns:
Boolean depending on operation success

getId

public int getId()
Returns:
the id

getProjectId

public int getProjectId()
Returns:
the projectId

getPersonId

public int getPersonId()
Returns:
the personId

getToDoItemId

public int getToDoItemId()
Returns:
the toDoItemId

getHours

public double getHours()
Returns:
the hours

getDescription

public java.lang.String getDescription()
Returns:
the description

getDate

public java.util.Calendar getDate()
Returns:
the date

setProjectId

public void setProjectId(int projectId)
Parameters:
projectId - the projectId to set

setPersonId

public void setPersonId(int personId)
Parameters:
personId - the personId to set

setToDoItemId

public void setToDoItemId(int toDoItemId)
Parameters:
toDoItemId - the toDoItemId to set

setHours

public void setHours(double hours)
Parameters:
hours - the hours to set

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - the description to set

setDate

public void setDate(java.util.Calendar date)
Parameters:
date - the date to set