本文整理匯總了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();
}
}