当前位置: 首页>>代码示例>>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;未经允许,请勿转载。