當前位置: 首頁>>代碼示例>>Java>>正文


Java User.setDescription方法代碼示例

本文整理匯總了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;
}
 
開發者ID:ndexbio,項目名稱:ndex-java-client,代碼行數:18,代碼來源:UserUtils.java

示例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;
	}
 
開發者ID:ndexbio,項目名稱:ndex-common,代碼行數:23,代碼來源:UserDocDAO.java

示例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;
}
 
開發者ID:ndexbio,項目名稱:ndex-rest,代碼行數:18,代碼來源:BasicAuthenticationFilter.java

示例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();
        
    } 
    
}
 
開發者ID:ndexbio,項目名稱:ndex-common,代碼行數:23,代碼來源:TestUserDAO.java


注:本文中的org.ndexbio.model.object.User.setDescription方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。