本文整理汇总了Java中org.ndexbio.model.object.Group.setAccountName方法的典型用法代码示例。如果您正苦于以下问题:Java Group.setAccountName方法的具体用法?Java Group.setAccountName怎么用?Java Group.setAccountName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.ndexbio.model.object.Group
的用法示例。
在下文中一共展示了Group.setAccountName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getGroupFromDocument
import org.ndexbio.model.object.Group; //导入方法依赖的package包/类
public static Group getGroupFromDocument(ODocument n) {
Group result = new Group();
Helper.populateExternalObjectFromDoc (result, n);
result.setGroupName((String)n.field(NdexClasses.GRP_P_NAME));
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));
} else {
result.setAccountName((String)n.field(NdexClasses.account_P_accountName));
}
return result;
}
示例2: createGroup
import org.ndexbio.model.object.Group; //导入方法依赖的package包/类
@Test
public void createGroup() {
try {
localConnection.begin();
final Group newGroup = new Group();
newGroup.setGroupName("create");
newGroup.setAccountName("create");
newGroup.setDescription("create");
newGroup.setWebsite("create");
assertNotNull(dao.createNewGroup(newGroup, testUser.getExternalId()));
localConnection.rollback();
} catch (Throwable e){
fail(e.getMessage());
}
}
示例3: createTestGroup
import org.ndexbio.model.object.Group; //导入方法依赖的package包/类
private void createTestGroup() {
try {
final Group newGroup = new Group();
newGroup.setGroupName("testGroup");
newGroup.setAccountName("testGroup");
newGroup.setDescription("testGroup");
newGroup.setWebsite("testGroup");
testGroup = dao.createNewGroup(newGroup, testUser.getExternalId());
localConnection.commit();
//return true;
} catch (Exception e) {
//System.out.println(e.getMessage());
fail(e.getMessage());
}
}
示例4: createGroupInvalidAccountName
import org.ndexbio.model.object.Group; //导入方法依赖的package包/类
@Test(expected = IllegalArgumentException.class)
public void createGroupInvalidAccountName() throws NdexException, IllegalArgumentException {
final Group newGroup = new Group();
newGroup.setGroupName("test");
newGroup.setAccountName("");
newGroup.setDescription("test");
newGroup.setWebsite("test");
dao.createNewGroup(newGroup, testUserGroupOwner.getExternalId());
}
示例5: createExistingGroup
import org.ndexbio.model.object.Group; //导入方法依赖的package包/类
@Test(expected = DuplicateObjectException.class)
public void createExistingGroup() throws IllegalArgumentException, NdexException, DuplicateObjectException {
final Group newGroup = new Group();
newGroup.setGroupName("testGroup");
newGroup.setAccountName("testGroup");
newGroup.setDescription("testGroup");
newGroup.setWebsite("testGroup");
dao.createNewGroup(newGroup, testUserGroupOwner.getExternalId());
}