本文整理汇总了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;
}