Examples of find()


Examples of com.cloud.hypervisor.vmware.VmwareServerDiscoverer.find()

                uri = new URI(url);
                String userName = clusterDetailsDao.findDetail(cluster.getId(), "username").getValue();
                String password = clusterDetailsDao.findDetail(cluster.getId(), "password").getValue();
                VmwareServerDiscoverer discover = new VmwareServerDiscoverer();

                Map<? extends ServerResource, Map<String, String>> resources = discover.find(host.getDataCenterId(),
                        host.getPodId(), host.getClusterId(), uri, userName, password, null);
                for (Map.Entry<? extends ServerResource, Map<String, String>> entry : resources.entrySet()) {
                    resource = entry.getKey();
                }
                if (resource == null) {
View Full Code Here

Examples of com.cloudera.cdk.morphline.shaded.com.google.code.regexp.Matcher.find()

  public void testGrokSeparatedValues() throws Exception {
    String msg = "hello\tworld\tfoo";
    Pattern pattern = Pattern.compile("(?<word>.+?)(\\t|\\z)");
    Matcher matcher = pattern.matcher(msg);
    List<String> results = new ArrayList();
    while (matcher.find()) {
      //System.out.println("match:'" + matcher.group(1) + "'");
      results.add(matcher.group(1));
    }
    assertEquals(Arrays.asList("hello", "world", "foo"), results);
  }
View Full Code Here

Examples of com.ctc.wstx.util.WordResolver.find()

        // Let's first check if words that should be there, are:
        while (it.hasNext()) {
            String str = it.next();

            assertEquals(str, wr.find(str));
            // And then, let's make sure intern()ing isn't needed:
            assertEquals(str, wr.find(""+str));

            char[] strArr = str.toCharArray();
            char[] strArr2 = new char[strArr.length + 4];
View Full Code Here

Examples of com.cxy.redisclient.service.NodeService.find()

 
  public void testFindKeys() {
    NodeService service = new NodeService();
    List<NodeType> types = new ArrayList<NodeType>();
    types.add(NodeType.SORTEDSET);
    Set<Node> nodes = service.find(NodeType.ROOT, 5, 0, "", types, "*", true);
   
    for(Node node:nodes) {
      System.out.println("server:" + node.getId()+"db:" + node.getDb()+node.getKey());
     
    }
View Full Code Here

Examples of com.darkhonor.rage.libs.dataaccess.CategoryDAO.find()

                        CategoryDAO catDAO = new CategoryDAO(emf.createEntityManager());
                        Category queryCat;
                        try
                        {
                            //queryCat = categoryQuery.getSingleResult();
                            queryCat = catDAO.find(txtCategory.getText().trim());
                            LOGGER.info("Category already exists in database: "
                                    + queryCat.getName());
                        } catch (NoResultException ex)
                        {
                            queryCat = new Category(txtCategory.getText().trim());
View Full Code Here

Examples of com.darkhonor.rage.libs.dataaccess.CourseDAO.find()

            GradedEvent gradedEvent = null;
            EntityManager em = emf.createEntityManager();
            LOGGER.debug("Getting selected Course");
            CourseDAO courseDAO = new CourseDAO(emf.createEntityManager());
            Course selectedCourse = (Course) cboCourse.getSelectedItem();
            Course course = courseDAO.find(selectedCourse.getId());
            //Course course = em.find(Course.class, selectedCourse.getId());
            LOGGER.debug("Course Name: " + course.getName());

            LOGGER.debug("Querying the data source to see if a GradedEvent "
                    + "already exists");
View Full Code Here

Examples of com.darkhonor.rage.libs.dataaccess.GradedEventDAO.find()

                }
            }

            // Get the list of questions for this event
            //GradedEvent gevent = em.find(GradedEvent.class, event.getId());
            GradedEvent gevent = gradedEventDAO.find(event.getId());
           
            modGradedEventQuestions.removeAll();
            for (int i = 0; i < gevent.getQuestions().size(); i++)
            {
                modGradedEventQuestions.add(gevent.getQuestions().get(i));
View Full Code Here

Examples of com.darkhonor.rage.libs.dataaccess.InstructorDAO.find()

                        + selectedInstructor.getLastName() + ", "
                        + selectedInstructor.getFirstName());

                // Pull the Instructor from the Data Source to be able to grab Sections
                InstructorDAO instructorDAO = new InstructorDAO(emf.createEntityManager());
                Instructor instructor = instructorDAO.find(selectedInstructor.getId());
                for (Section sectionIter : instructor.getSections())
                {
                    sectionReport = new SectionReport(course.getName(),
                            instructor, sectionIter.getName(),
                            selectedAssignment.getAssignment());
View Full Code Here

Examples of com.darkhonor.rage.libs.dataaccess.SectionDAO.find()

             * and Ordered list to the user.  If the structure of Section is ever
             * changed to support an ordered collection, this query can be dropped.
             */
            LOGGER.debug("Finding list of students (ordered) in section "
                    + selectedSection.getName());
            Section section = sectionDAO.find(selectedSection.getId());
            LOGGER.debug("Found " + section.getStudents().size() + " Students");
            LOGGER.debug("Adding list of Students in Section "
                    + section.getName() + " to ComboBox");
            studentComboBoxModel.add(new Student(" ", "000 - All Students", "All.Students",
                    new Integer(2010)));
View Full Code Here

Examples of com.darkhonor.rage.libs.dataaccess.TestCaseDAO.find()

                            {
                                if (tc.getId() != null)
                                {
                                    try
                                    {
                                        TestCase dbTestCase = testCaseDAO.find(tc.getId());
                                        // TestCase exists in the database, update
                                        tc = testCaseDAO.update(tc);
                                    } catch (IllegalArgumentException exTestCase)
                                    {
                                        // TestCase not in data source, just save
View Full Code Here
TOP
Copyright © 2015 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.