本文整理匯總了Java中org.ndexbio.model.object.User.setUserName方法的典型用法代碼示例。如果您正苦於以下問題:Java User.setUserName方法的具體用法?Java User.setUserName怎麽用?Java User.setUserName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.ndexbio.model.object.User
的用法示例。
在下文中一共展示了User.setUserName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getNewUser
import org.ndexbio.model.object.User; //導入方法依賴的package包/類
public static User getNewUser(String accountName,
String accountPassword, String description, String email,
String firstName, String lastName, String image, String webSite) {
User user = new User();
user.setUserName(accountName);
user.setPassword(accountPassword);
user.setDescription(description);
user.setEmailAddress(email);
user.setFirstName(firstName);
user.setLastName(lastName);
user.setImage(image);
user.setWebsite(webSite);
return user;
}
示例2: populateUserFromResultSet
import org.ndexbio.model.object.User; //導入方法依賴的package包/類
private static void populateUserFromResultSet(User user, ResultSet rs, boolean fullRecord) throws JsonParseException, JsonMappingException, SQLException, IOException {
Helper.populateAccountFromResultSet (user, rs, fullRecord);
user.setFirstName(rs.getString(NdexClasses.User_firstName));
user.setLastName(rs.getString(NdexClasses.User_lastName));
user.setDisplayName(rs.getString(NdexClasses.User_displayName));
user.setIsIndividual(rs.getBoolean(NdexClasses.User_isIndividual));
user.setEmailAddress(rs.getString(NdexClasses.User_emailAddress));
// user.setPassword(rs.getString(NdexClasses.User_password));
user.setIsVerified(rs.getBoolean(NdexClasses.User_isVerified));
user.setUserName(rs.getString("user_name"));
if ( fullRecord) {
long limit = rs.getLong("disk_limit");
if ( limit == 0)
user.setDiskQuota(Long.valueOf(default_disk_quota));
else
user.setDiskQuota(limit);
long used = rs.getLong("storage_usage");
user.setDiskUsed(Long.valueOf(used));
}
}
示例3: getNewUserSimulator
import org.ndexbio.model.object.User; //導入方法依賴的package包/類
/**
* This function simulates getting info from an AD server and creates a new user object from it.
* @param username
* @param passwork
* @return
*/
private User getNewUserSimulator(String username, String password) {
User newUser = new User();
newUser.setUserName(username);
newUser.setPassword(password);
newUser.setFirstName("F"+NdexUUIDFactory.INSTANCE.createNewNDExUUID().toString().substring(8));
newUser.setFirstName("L"+NdexUUIDFactory.INSTANCE.createNewNDExUUID().toString().substring(8));
newUser.setEmailAddress("e" + NdexUUIDFactory.INSTANCE.createNewNDExUUID().toString()+ "@foo.com");
newUser.setDescription("Fake user created by AD simulator function.");
newUser.setIsIndividual(true);
return newUser;
}