Examples of findByKey()


Examples of fi.foyt.hibernate.gae.search.persistence.dao.DirectoryDAO.findByKey()

    WorkListDAO workListDAO = new WorkListDAO();
    DirectoryDAO directoryDAO = new DirectoryDAO();

    SearchFactory searchFactory = fullTextEntityManager.getSearchFactory();
   
    Directory directory = directoryDAO.findByKey(workListEntity.getKey().getParent());
   
    IndexManager indexManager = getIndexManager(searchFactory, directory.getName());
    LuceneWorkSerializer serializer = indexManager.getSerializer();
    BackendQueueProcessor queueProcessor = createInstanceBackendQueueProcessor(searchFactory, indexManager);
   
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.KeyValueDAO.findByKey()

    ClusterDAO clusterDAO = injector.getInstance(ClusterDAO.class);
    Gson gson = injector.getInstance(Gson.class);
    HostComponentDesiredStateDAO desiredStateDAO = injector.getInstance
      (HostComponentDesiredStateDAO.class);

    KeyValueEntity keyValueEntity = keyValueDAO.findByKey("decommissionDataNodesTag");
    String value = null;
    if (keyValueEntity != null) {
      value = keyValueEntity.getValue();
      if (value != null && !value.isEmpty()) {
        List<ClusterEntity> clusterEntities = clusterDAO.findAll();
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.KeyValueDAO.findByKey()

    entity = hostComponentDesiredStateDAO.findAll().get(0);

    Assert.assertEquals(HostComponentAdminState.DECOMMISSIONED.name(), entity.getAdminState().name());

    keyValueEntity = keyValueDAO.findByKey("decommissionDataNodesTag");
    Assert.assertNull(keyValueEntity);
    keyValueEntity = keyValueDAO.findByKey("decommissionDataNodesTag-Moved");
    Assert.assertNotNull(keyValueEntity);
    Assert.assertEquals("1394147791230", keyValueEntity.getValue());
  }
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.KeyValueDAO.findByKey()

    Assert.assertEquals(HostComponentAdminState.DECOMMISSIONED.name(), entity.getAdminState().name());

    keyValueEntity = keyValueDAO.findByKey("decommissionDataNodesTag");
    Assert.assertNull(keyValueEntity);
    keyValueEntity = keyValueDAO.findByKey("decommissionDataNodesTag-Moved");
    Assert.assertNotNull(keyValueEntity);
    Assert.assertEquals("1394147791230", keyValueEntity.getValue());
  }

  @Test
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.KeyValueDAO.findByKey()

    ClusterDAO clusterDAO = injector.getInstance(ClusterDAO.class);
    Gson gson = injector.getInstance(Gson.class);
    HostComponentDesiredStateDAO desiredStateDAO = injector.getInstance
      (HostComponentDesiredStateDAO.class);

    KeyValueEntity keyValueEntity = keyValueDAO.findByKey("decommissionDataNodesTag");
    String value = null;
    if (keyValueEntity != null) {
      value = keyValueEntity.getValue();
      if (value != null && !value.isEmpty()) {
        List<ClusterEntity> clusterEntities = clusterDAO.findAll();
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.KeyValueDAO.findByKey()

    entity = hostComponentDesiredStateDAO.findAll().get(0);

    Assert.assertEquals(HostComponentAdminState.DECOMMISSIONED.name(), entity.getAdminState().name());

    keyValueEntity = keyValueDAO.findByKey("decommissionDataNodesTag");
    Assert.assertNull(keyValueEntity);
    keyValueEntity = keyValueDAO.findByKey("decommissionDataNodesTag-Moved");
    Assert.assertNotNull(keyValueEntity);
    Assert.assertEquals("1394147791230", keyValueEntity.getValue());
  }
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.KeyValueDAO.findByKey()

    Assert.assertEquals(HostComponentAdminState.DECOMMISSIONED.name(), entity.getAdminState().name());

    keyValueEntity = keyValueDAO.findByKey("decommissionDataNodesTag");
    Assert.assertNull(keyValueEntity);
    keyValueEntity = keyValueDAO.findByKey("decommissionDataNodesTag-Moved");
    Assert.assertNotNull(keyValueEntity);
    Assert.assertEquals("1394147791230", keyValueEntity.getValue());
  }

  @Test
View Full Code Here

Examples of org.apache.ambari.server.orm.dao.KeyValueDAO.findByKey()

    ClusterDAO clusterDAO = injector.getInstance(ClusterDAO.class);
    Gson gson = injector.getInstance(Gson.class);
    HostComponentDesiredStateDAO desiredStateDAO = injector.getInstance
      (HostComponentDesiredStateDAO.class);

    KeyValueEntity keyValueEntity = keyValueDAO.findByKey("decommissionDataNodesTag");
    String value = null;
    if (keyValueEntity != null) {
      value = keyValueEntity.getValue();
      if (value != null && !value.isEmpty()) {
        List<ClusterEntity> clusterEntities = clusterDAO.findAll();
View Full Code Here

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

  public int updateMetaInfoVersion(String version) {
    int rows = 0;
    if (version != null) {
      MetainfoDAO metainfoDAO = injector.getInstance(MetainfoDAO.class);

      MetainfoEntity versionEntity = metainfoDAO.findByKey("version");

      if (versionEntity != null) {
        versionEntity.setMetainfoValue(version);
        metainfoDAO.merge(versionEntity);
      } else {
View Full Code Here

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

    MetainfoDAO metainfoDAO =  createMock(MetainfoDAO.class);
    MetainfoEntity metainfoEntity = new MetainfoEntity();
    String serverVersion = ambariMetaInfo.getServerVersion();
    metainfoEntity.setMetainfoName(Configuration.SERVER_VERSION_KEY);
    metainfoEntity.setMetainfoValue(serverVersion);
    expect(metainfoDAO.findByKey(Configuration.SERVER_VERSION_KEY)).
            andReturn(metainfoEntity);
    replay(metainfoDAO);
    AmbariServer ambariServer = new AmbariServer();
    ambariServer.metainfoDAO = metainfoDAO;
    ambariServer.ambariMetaInfo = ambariMetaInfo;
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.