Examples of findAll()


Examples of org.apache.ambari.server.orm.dao.ClusterServiceDAO.findAll()

        gson.<Map<String, String>>fromJson(desiredStackVersion, Map.class);

      String stackName = clusterInfo.get("stackName");
      String stackVersion = clusterInfo.get("stackVersion");

      List<ClusterServiceEntity> clusterServiceEntities = clusterServiceDAO.findAll();
      for (final ClusterServiceEntity clusterServiceEntity : clusterServiceEntities) {
        String serviceName = clusterServiceEntity.getServiceName();
        ServiceInfo serviceInfo = null;
        try {
          serviceInfo = ambariMetaInfo.getService(stackName, stackVersion, serviceName);
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.HostComponentDesiredStateDAO.findAll()

    }

    HostComponentDesiredStateDAO hostComponentDesiredStateDAO =
      injector.getInstance(HostComponentDesiredStateDAO.class);

    List<HostComponentDesiredStateEntity> hcdEntities = hostComponentDesiredStateDAO.findAll();

    if (hcdEntities != null) {
      for (HostComponentDesiredStateEntity hcd : hcdEntities) {
        String desiredStackVersion = hcd.getDesiredStackVersion();
        hcd.setDesiredStackVersion(getStackIdString(desiredStackVersion,
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.HostComponentStateDAO.findAll()

      clusterStateDAO.merge(clusterStateEntity);
    }

    HostComponentStateDAO hostComponentStateDAO = injector.getInstance
      (HostComponentStateDAO.class);
    List<HostComponentStateEntity> hcEntities = hostComponentStateDAO.findAll();

    if (hcEntities != null) {
      for (HostComponentStateEntity hc : hcEntities) {
        String currentStackVersion = hc.getCurrentStackVersion();
        hc.setCurrentStackVersion(getStackIdString(currentStackVersion,
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.MetainfoDAO.findAll()

    // check updating all
    stackUpgradeUtil.updateLocalRepo(stackName, stackVersion, localRepoUrl, null);
   
    MetainfoDAO dao = injector.getInstance(MetainfoDAO.class);
   
    Collection<MetainfoEntity> entities = dao.findAll();
    Assert.assertTrue(entities.size() > 0);
   
    for (MetainfoEntity entity : entities) {
      Assert.assertTrue(entity.getMetainfoName().startsWith("repo:/HDP/1.3.0/"));
      Assert.assertEquals(localRepoUrl, entity.getMetainfoValue());
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.ServiceComponentDesiredStateDAO.findAll()

    ServiceComponentDesiredStateDAO serviceComponentDesiredStateDAO =
      injector.getInstance(ServiceComponentDesiredStateDAO.class);

    List<ServiceComponentDesiredStateEntity> scdEntities =
      serviceComponentDesiredStateDAO.findAll();

    if (scdEntities != null) {
      for (ServiceComponentDesiredStateEntity scd : scdEntities) {
        String desiredStackVersion = scd.getDesiredStackVersion();
        scd.setDesiredStackVersion(getStackIdString(desiredStackVersion,
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.ServiceDesiredStateDAO.findAll()

      }
    }

    ServiceDesiredStateDAO serviceDesiredStateDAO = injector.getInstance(ServiceDesiredStateDAO.class);

    List<ServiceDesiredStateEntity> sdEntities = serviceDesiredStateDAO.findAll();

    if (sdEntities != null) {
      for (ServiceDesiredStateEntity sd : sdEntities) {
        String desiredStackVersion = sd.getDesiredStackVersion();
        sd.setDesiredStackVersion(getStackIdString(desiredStackVersion,
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.ViewDAO.findAll()

    expect(vDAO.findByName("MY_VIEW{1.0.0}")).andReturn(null);
    expect(vDAO.merge(capture(captureViewEntity))).andReturn(null);
    expect(vDAO.findByName("MY_VIEW{1.0.0}")).andReturn(viewDefinition);

    expect(vDAO.findAll()).andReturn(Collections.<ViewEntity>emptyList());

    // replay mocks
    replay(configuration, viewDir, extractedArchiveDir, viewArchive, archiveDir, entryFile, classesDir,
        libDir, fileEntry, viewJarFile, enumeration, jarEntry, is, fos, vDAO);
View Full Code Here

Examples of org.apache.isis.core.specsupport.scenarios.InMemoryDB.findAll()

    }

    // helper
    private List<SimpleObject> allSimpleObjects() {
        final InMemoryDB inMemoryDB = getVar("isis", "in-memory-db", InMemoryDB.class);
        return inMemoryDB.findAll(SimpleObject.class);
    }
}
View Full Code Here

Examples of org.apache.openejb.finder.ResourceFinder.findAll()

            List<URL> persistenceUrls = (List<URL>) appModule.getAltDDs().get("persistence.xml");
            if (persistenceUrls == null) {
                persistenceUrls = new ArrayList<URL>();
                appModule.getAltDDs().put("persistence.xml", persistenceUrls);
            }
            persistenceUrls.addAll(finder.findAll("META-INF/persistence.xml"));
        } catch (IOException e) {
            logger.warning("Cannot load persistence-units from 'META-INF/persistence.xml' : " + e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAEntityManager.findAll()

    }

    public void testGetObjectsByIdInvocation() {
        OpenJPAEntityManager pm = getPM();
        try {
            Object[] pcs = pm.findAll(Object.class, oids);
            assertEquals(oids.length, pcs.length);
            for (int i = 0; i < oids.length; i++)
                assertEquals(oids[i], pm.getObjectId(pcs[i]));
        } catch (Exception e) {
            bug(1017, e, "getObjectsById() bug");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.