本文整理汇总了Java中org.ndexbio.model.object.User.setDescription方法的典型用法代码示例。如果您正苦于以下问题:Java User.setDescription方法的具体用法?Java User.setDescription怎么用?Java User.setDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.ndexbio.model.object.User
的用法示例。
在下文中一共展示了User.setDescription方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: getUserFromDocument
import org.ndexbio.model.object.User; //导入方法依赖的package包/类
public static User getUserFromDocument(ODocument n) {
User result = new User();
Helper.populateExternalObjectFromDoc (result, n);
result.setFirstName((String) n.field("firstName"));
result.setLastName((String) n.field("lastName"));
result.setWebsite((String) n.field("websiteURL"));
result.setDescription((String) n.field("description"));
result.setImage((String) n.field("imageURL"));
if ( result.getIsDeleted() ) {
result.setAccountName ((String) n.field(NdexClasses.account_P_oldAcctName));
result.setEmailAddress((String) n.field(NdexClasses.User_P_oldEmailAddress));
} else {
result.setAccountName((String) n.field(NdexClasses.account_P_accountName));
result.setEmailAddress((String) n.field("emailAddress"));
}
return result;
}
示例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;
}
示例4: updateUser
import org.ndexbio.model.object.User; //导入方法依赖的package包/类
@Test
public void updateUser() {
try {
//User user = dao.getUserById(testUser.getExternalId());
final User updated = new User();
updated.setDescription("changed");
dao.updateUser(updated, testUser.getExternalId());
//localConnection.commit();
assertEquals(updated.getDescription(), dao.getUserById(testUser.getExternalId()).getDescription());
assertEquals(testUser.getEmailAddress(), dao.getUserById(testUser.getExternalId()).getEmailAddress());
} catch (Exception e) {
fail(e.getMessage());
e.printStackTrace();
}
}