vle.domain.user
Class UserInfo
java.lang.Object
vle.domain.PersistableDomain
vle.domain.user.UserInfo
public class UserInfo
- extends PersistableDomain
- Author:
- hirokiterashima
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fromQuery
protected static String fromQuery
journal
public Journal journal
UserInfo
public UserInfo()
getId
public Long getId()
getWorkgroupId
public Long getWorkgroupId()
setWorkgroupId
public void setWorkgroupId(Long workgroupId)
getJournal
public Journal getJournal()
- Returns:
- the journal
setJournal
public void setJournal(Journal journal)
- Parameters:
journal - the journal to set
getObjectClass
protected Class<?> getObjectClass()
- Specified by:
getObjectClass in class PersistableDomain
- See Also:
PersistableDomain.getObjectClass()
getByWorkgroupId
public static UserInfo getByWorkgroupId(Long id)
- Returns an Environment with the specified id or null
if no such Environment exists.
- Parameters:
id - clazz -
- Returns:
getOrCreateByWorkgroupId
public static UserInfo getOrCreateByWorkgroupId(Long workgroupId)
- Similar to getByWorkgroupId, but if the user is
not found, create one. This method will always return
a non-null UserInfo.
- Parameters:
id -
- Returns:
getByWorkgroupIds
public static List<UserInfo> getByWorkgroupIds(List<String> workgroupIds)
- Obtain a list of UserInfo objects from a list of workgroup ids
- Parameters:
workgroupIds - a list of workgroup ids in String format
- Returns:
- a list of UserInfo objects
getUserInfosThatHaveWorkedToday
public static List<UserInfo> getUserInfosThatHaveWorkedToday(List<UserInfo> userInfos)
- Out of the list of UserInfo objects that are passed in, find the ones that have
submitted any work today and return them in a list.
note: this function is currently inefficient as it queries each UserInfo individually.
This should be changed so that it obtains the latest StepWork for each UserInfo
all at the same time.
- Parameters:
userInfos - a list of UserInfo objects that we will filter
- Returns:
- a list of UserInfo objects that have been filtered and only
contain the UserInfos that have performed any work today
main
public static void main(String[] args)
- Parameters:
args -
Copyright © 2012. All Rights Reserved.