edu.nrao.sss.model
Interface UserAccountable

All Known Subinterfaces:
SourceCatalogEntry
All Known Implementing Classes:
DelayScan, FocusScan, PointingScan, ProgramBlock, Project, Proposal, ResourceCatalog, Scan, ScanLoop, ScanLoopElement, SchedulingBlock, SimpleScan, Source, SourceCatalog, SourceLookupTable, SwitchingScan, TippingScan

public interface UserAccountable

Interface used to record user accountability with respect to object creation and modification. User ids should be unique.


Field Summary
static Long NULL_USER_ID
          Represents an unknown, undefined, or uninitialized user ID.
 
Method Summary
 Long getCreatedBy()
          Returns the ID of the user who created this object.
 Date getCreatedOn()
          Returns the date on which this object was created.
 Long getLastUpdatedBy()
          Returns the ID of the user who most recently updated this object.
 Date getLastUpdatedOn()
          Returns the most recent date on which this object was updated.
 void setCreatedBy(Long userId)
          Sets the ID of the user who created this object.
 void setCreatedOn(Date d)
          Sets the date on which this object was created.
 void setLastUpdatedBy(Long userId)
          Sets the ID of the user who most recently updated this object.
 void setLastUpdatedOn(Date d)
          Sets the date on which this object was most recently updated.
 

Field Detail

NULL_USER_ID

static final Long NULL_USER_ID
Represents an unknown, undefined, or uninitialized user ID. TODO: This might not belong in this class, but belong instead to a yet-to-be-defined class in pkg model.user.

Method Detail

getLastUpdatedBy

Long getLastUpdatedBy()
Returns the ID of the user who most recently updated this object.

If this object does not know the identity of the user who lasted updated it, the returned ID will be NULL_USER_ID.

Returns:
the ID of the user who most recently updated this object.

setLastUpdatedBy

void setLastUpdatedBy(Long userId)
Sets the ID of the user who most recently updated this object.

If userId is null, this object will be updated not with null but with NULL_USER_ID instead.

Parameters:
userId - the ID of the user who most recently updated this object.

getCreatedBy

Long getCreatedBy()
Returns the ID of the user who created this object.

If this object does not know the identity of the user who created it, the returned ID will be NULL_USER_ID.

Returns:
the ID of the user who created this object.

setCreatedBy

void setCreatedBy(Long userId)
Sets the ID of the user who created this object.

If userId is null, this object will be updated not with null but with NULL_USER_ID instead.

Parameters:
userId - the ID of the user who most recently updated this object.

getLastUpdatedOn

Date getLastUpdatedOn()
Returns the most recent date on which this object was updated.

Returns:
the most recent date on which this object was updated.

setLastUpdatedOn

void setLastUpdatedOn(Date d)
Sets the date on which this object was most recently updated.

If d is null it will be ignored and this method will do nothing.

Parameters:
d - the date on which this object was most recently updated.

getCreatedOn

Date getCreatedOn()
Returns the date on which this object was created.

Returns:
the date on which this object was created.

setCreatedOn

void setCreatedOn(Date d)
Sets the date on which this object was created.

If d is null it will be ignored and this method will do nothing.

Parameters:
d - the date on which this object was created.


Copyright © 2009. All Rights Reserved.