Tabnine Logo
ResourceGroupPersistenceService
Code IndexAdd Tabnine to your IDE (free)

How to use
ResourceGroupPersistenceService
in
ch.puzzle.itc.mobiliar.business.resourcegroup.control

Best Java code snippets using ch.puzzle.itc.mobiliar.business.resourcegroup.control.ResourceGroupPersistenceService (Showing top 3 results out of 315)

origin: liimaorg/liima

/**
 * Load all resourceGroups for the given type
 * 
 * @param typeName
 * @param resourceId
 *             - the resourceGroup for this resource will be excluded
 * @return a list with resourceGroup entities
 */
public List<? extends NamedIdentifiable> loadResourceGroupsForType(String typeName, Integer resourceId) {
  ResourceEntity resource = resourceRepository
      .loadWithResourceGroupAndRelatedResourcesForId(resourceId);
  return resourceGroupService.loadGroupsForTypeNameExcludeSelected(typeName,
      Collections.singletonList(resource.getResourceGroup().getId()));
}
origin: liimaorg/liima

@Test
public void test_loadGroupsForTypeName_myAmw() {
  // given
  init();
  List<Integer> myAmw = new ArrayList<Integer>();
  myAmw.add(resource1.getId());
  myAmw.add(resource4.getId());
  // when
  List<ResourceGroupEntity> result = service.loadGroupsForTypeName(DefaultResourceTypeDefinition.APPLICATIONSERVER.name(), myAmw);
  // then
  assertNotNull(result);
  assertEquals(1, result.size());
  assertEquals(resource1.getId(), result.iterator().next().getId());
  myAmw.add(resource3.getId());
  // when
  result = service.loadGroupsForTypeName(DefaultResourceTypeDefinition.APPLICATIONSERVER.name(), myAmw);
  // then
  assertNotNull(result);
  assertEquals(2, result.size());
  assertTrue(result.contains(resource1.getResourceGroup()));
  assertTrue(result.contains(resource4.getResourceGroup()));
}
origin: liimaorg/liima

@Test
public void test_loadGroupsForTypeName() {
  // given
  init();
  // when
  List<ResourceGroupEntity> result = service.loadGroupsForTypeName(
      DefaultResourceTypeDefinition.APPLICATIONSERVER.name(), null);
  // then
  assertNotNull(result);
  assertEquals(2, result.size());
  for (ResourceGroupEntity g : result) {
    for (ResourceEntity r : g.getResources()) {
      assertEquals(type1.getName(), r.getResourceType().getName());
    }
  }
}

ch.puzzle.itc.mobiliar.business.resourcegroup.controlResourceGroupPersistenceService

Javadoc

Use ResourceGroupRepository - move all functionality to the control to fulfill the cec pattern

Most used methods

  • loadGroupsForTypeName
  • loadGroupsForTypeNameExcludeSelected

Popular in Java

  • Reactive rest calls using spring rest template
  • getResourceAsStream (ClassLoader)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now