当前位置: 首页>>代码示例>>Java>>正文


Java ProtectionGroup.setProtectionGroupId方法代码示例

本文整理汇总了Java中gov.nih.nci.security.authorization.domainobjects.ProtectionGroup.setProtectionGroupId方法的典型用法代码示例。如果您正苦于以下问题:Java ProtectionGroup.setProtectionGroupId方法的具体用法?Java ProtectionGroup.setProtectionGroupId怎么用?Java ProtectionGroup.setProtectionGroupId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gov.nih.nci.security.authorization.domainobjects.ProtectionGroup的用法示例。


在下文中一共展示了ProtectionGroup.setProtectionGroupId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
protected void setUp() {
	protectionGroup1 = new ProtectionGroup();
	protectionGroup1.setProtectionGroupId(new Long(1));
	protectionGroup1.setProtectionGroupName("ProtectionGroup1");

	protectionGroup1copy = new ProtectionGroup();
	protectionGroup1copy.setProtectionGroupId(new Long(1));
	protectionGroup1copy.setProtectionGroupName("ProtectionGroup1");

	protectionGroup1copy2 = new ProtectionGroup();
	protectionGroup1copy2.setProtectionGroupId(new Long(1));
	protectionGroup1copy2.setProtectionGroupName("ProtectionGroup1");

	protectionGroup2 = new ProtectionGroup();
	protectionGroup2.setProtectionGroupId(new Long(2));
	protectionGroup2.setProtectionGroupName("ProtectionGroup2");

	protectionGroup3 = new ProtectionGroup();
	protectionGroup3.setProtectionGroupId(new Long(3));
	protectionGroup3.setProtectionGroupName("ProtectionGroup3");
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:22,代码来源:ProtectionGroupTest.java

示例2: testEquality

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
public void testEquality() {

		assertTrue(protectionGroup1.equals(protectionGroup1copy));
		assertFalse(protectionGroup1.equals(protectionGroup2));
		assertFalse(protectionGroup1.equals(protectionGroup3));
		ProtectionGroup protectionGroup1subtype = new ProtectionGroup() {
		};
		protectionGroup1subtype.setProtectionGroupId(new Long(4));
		protectionGroup1subtype.setProtectionGroupName("ProtectionGroup4");

		assertFalse(protectionGroup1.equals(protectionGroup1subtype));

		assertReflexivity();
		assertSymmetry();
		assertTransitivity();
		assertConsistency();
		assertNullComparison();
	}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:19,代码来源:ProtectionGroupTest.java

示例3: testEquality

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
public void testEquality() {
  

assertTrue(protectionGroupRoleContext1.equals(protectionGroupRoleContext1copy));

  assertFalse(protectionGroupRoleContext1.equals(protectionGroupRoleContext2));
  assertFalse(protectionGroupRoleContext1.equals(protectionGroupRoleContext3));
  ProtectionGroupRoleContext protectionGroupRoleContext1subtype = new ProtectionGroupRoleContext() {};
  ProtectionGroup pg4 = new ProtectionGroup();
  pg4.setProtectionGroupId(new Long(4));
  pg4.setProtectionGroupName("PG4");
  protectionGroupRoleContext1subtype.setProtectionGroup(pg4);
  
  
  assertFalse(protectionGroupRoleContext1.equals(protectionGroupRoleContext1subtype));

  assertReflexivity();
  assertSymmetry();
  assertTransitivity();
  assertConsistency();
  assertNullComparison();
  
  
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:25,代码来源:ProtectionGroupRoleContextTest.java

示例4: setUp

import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; //导入方法依赖的package包/类
protected void setUp() {
  protectionGroupRoleContext1 = new ProtectionGroupRoleContext();
  ProtectionGroup pg1= new ProtectionGroup();
  pg1.setProtectionGroupId(new Long(1));
  pg1.setProtectionGroupName("PG1");
  protectionGroupRoleContext1.setProtectionGroup(pg1);
  
  
  protectionGroupRoleContext1copy = new ProtectionGroupRoleContext();
  ProtectionGroup pg2= new ProtectionGroup();
  pg2.setProtectionGroupId(new Long(1));
  pg2.setProtectionGroupName("PG1");
protectionGroupRoleContext1copy.setProtectionGroup(pg2);
 
  
  protectionGroupRoleContext1copy2 = new ProtectionGroupRoleContext();
  ProtectionGroup pg3= new ProtectionGroup();
  pg3.setProtectionGroupId(new Long(1));
  pg3.setProtectionGroupName("PG1");
  protectionGroupRoleContext1copy2.setProtectionGroup(pg3);


  
  protectionGroupRoleContext2 = new ProtectionGroupRoleContext();
  ProtectionGroup pg4= new ProtectionGroup();
  pg4.setProtectionGroupId(new Long(2));
  pg4.setProtectionGroupName("PG2");
  protectionGroupRoleContext2.setProtectionGroup(pg4);

  
  
  
  protectionGroupRoleContext3 = new ProtectionGroupRoleContext();
  ProtectionGroup pg5= new ProtectionGroup();
  pg5.setProtectionGroupId(new Long(3));
  pg5.setProtectionGroupName("PG3");
  protectionGroupRoleContext3.setProtectionGroup(pg5);

  
 }
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:41,代码来源:ProtectionGroupRoleContextTest.java


注:本文中的gov.nih.nci.security.authorization.domainobjects.ProtectionGroup.setProtectionGroupId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。