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