Examples of Category


Examples of eja.ejb.entities.Category

    public Collection<Category> getAllCategories() {
        return this._categoryDao.getAllCategories();
    }

    public String edit() {
        this._category = (this.id != 0) ? this._categoryDao.getCategoryById(this.id) : new Category();
        this._category.setName(this.name);
        this._category.setDescription(this.description);

        this._categoryDao.saveCategory(this._category);
        return "category-details";
View Full Code Here

Examples of entity.Category

        if (userPath.equals("/category")) {
            // get categoryId from request
            String categoryId = request.getQueryString();

            if (categoryId != null) {
                Category selectedCategory = categoryFacade.find(Integer.parseInt(categoryId));
                request.setAttribute("selectedCategory", selectedCategory);

                Collection<Product> categoryProducts = selectedCategory.getProductCollection();
                request.setAttribute("categoryProducts", categoryProducts);
            }

        } else if (userPath.equals("/viewCart")) {
            // TODO: Implement cart page request
View Full Code Here

Examples of evolaris.mgbl.gs.datamodel.Category

  }
 
  public void testFindAndGetCategory(){
    Category[] categories = categoryManager.getSortedCategories();
    assertTrue("at least one category must exist for the test to succeed",categories.length >= 1);
    Category category = categoryManager.findCategory(categories[0].getCategoryname());
    assertEquals("category not found by name",categories[0].getId(),category.getId());
    Category category2 = categoryManager.getCategory(category.getId());
    assertEquals("category found by ID does not match",category.getId(),category2.getId());
  }
View Full Code Here

Examples of gov.nih.nlm.nls.lvg.Lib.Category

        Vector<?> lexItems = lvgLexItem.MutateLexItem(word);
        Iterator<?> lexItemItr = lexItems.iterator();
        while (lexItemItr.hasNext()) {
          LexItem li = (LexItem) lexItemItr.next();

          Category c = li.GetTargetCategory();
          String lemmaStr = li.GetTargetTerm();
          long[] bitValues = Category.ToValuesArray(c.GetValue());
          for (int i = 0; i < bitValues.length; i++) {
            // note that POS is Xerox tagset
            String lemmaPos = Category.ToName(bitValues[i]);
            // convert Xerox tagset to PennTreebank tagset
            String treebankTag = xeroxTreebankMap
View Full Code Here

Examples of it.freedomotic.gwtclient.client.widgets.ContactDatabase.Category

            }
        });
        createButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                int categoryIndex = categoryBox.getSelectedIndex();
                Category category = categories[categoryIndex];
                contactInfo = new ContactInfo(category);
                contactInfo.setFirstName(firstNameBox.getText());
                contactInfo.setLastName(lastNameBox.getText());
                contactInfo.setAddress(addressBox.getText());
                contactInfo.setBirthday(birthdayBox.getValue());
View Full Code Here

Examples of litmus.Category

        return classloader.getAssignableClasses(Assert.class);
    }


    private void addTest(Class<?> testClass) {
        Category annotation = findCategoryAnnotation(testClass);
        if (annotation != null) {
            addToCategory(testClass, new CategoryInstance(annotation));
        } else {
            addToCategory(testClass, NONE);
        }
View Full Code Here

Examples of model.Category

    Date now = new Date();
   
    Order order1 = new Order();
    entityManager.persist(order1);

    Category category1 = new Category();
    category1.setTitle("Informatique");

    entityManager.persist(category1);

    Category category2 = new Category();
    category2.setTitle("Littérature");
    entityManager.persist(category2);

    Author author1 = new Author();
    author1.setFirstName("Michel");
    author1.setLastName("Martin");
View Full Code Here

Examples of models.Category

 
  public static void escapedExpr() {
    renderJapid();
  }
  public static void categories() {
    Category a = new Category();
    a.name = "a";
    Category cate1 = new Category();
    cate1.name = "1";
    Category cate2 = new Category();
    cate2.name = "2";
    Category cate11 = new Category();
    cate11.name = "11";
    Category cate12 = new Category();
    cate12.name = "12";
    a.subCategories = new ArrayList<Category>();
    a.subCategories.add(cate1);
    a.subCategories.add(cate2);
    cate1.subCategories = new ArrayList<Category>();
View Full Code Here

Examples of monashbook.models.Category

                + "finalist The Plague of Doves with The Round House, transporting readers to the Ojibwe reservation in North Dakota. ");
        book15.setImageUrl("/MonashBook-war/resources/img/book15.jpg");
        book15.setAvailability(true);
       
        // Create dummy Categories
        Category category1 = new Category();
        category1.setCategory("Social Sciences");
        Category category2 = new Category();
        category2.setCategory("History");
        Category category3 = new Category();
        category3.setCategory("Fiction");
        Category category4 = new Category();
        category4.setCategory("Love and Romance");
        Category category5 = new Category();
        category5.setCategory("Science");
       
        // Add the categories to the database
        bookService.addCategory(category1);
        bookService.addCategory(category2);
        bookService.addCategory(category3);
        bookService.addCategory(category4);
        bookService.addCategory(category5);
       
        // Get the categories from the database and add them to the category list of each book
        Category category1FromDb = bookService.getAllCategories().get(0);
        Category category2FromDb = bookService.getAllCategories().get(1);
        Category category3FromDb = bookService.getAllCategories().get(2);
        Category category4FromDb = bookService.getAllCategories().get(3);
        Category category5FromDb = bookService.getAllCategories().get(4);
       
        book1.getCategories().add(bookService.getAllCategories().get(1));
        book2.getCategories().add(bookService.getAllCategories().get(0));
        book3.getCategories().add(bookService.getAllCategories().get(2));
        book4.getCategories().add(bookService.getAllCategories().get(3));
        book4.getCategories().add(bookService.getAllCategories().get(4));
        book5.getCategories().add(bookService.getAllCategories().get(2));
        book6.getCategories().add(bookService.getAllCategories().get(3));
        book6.getCategories().add(bookService.getAllCategories().get(4));
        book7.getCategories().add(bookService.getAllCategories().get(4));
        book8.getCategories().add(bookService.getAllCategories().get(2));
        book8.getCategories().add(bookService.getAllCategories().get(3));
        book9.getCategories().add(bookService.getAllCategories().get(1));
        book9.getCategories().add(bookService.getAllCategories().get(2));
        book10.getCategories().add(bookService.getAllCategories().get(2));
        book11.getCategories().add(bookService.getAllCategories().get(3));
        book12.getCategories().add(bookService.getAllCategories().get(0));
        book13.getCategories().add(bookService.getAllCategories().get(2));
        book13.getCategories().add(bookService.getAllCategories().get(3));
        book14.getCategories().add(bookService.getAllCategories().get(1));
        book14.getCategories().add(bookService.getAllCategories().get(2));
        book14.getCategories().add(bookService.getAllCategories().get(3));
        book15.getCategories().add(bookService.getAllCategories().get(2));
       
       
        // Ensure entities are stored in each side of the relationship
       
        // Add books to the database
        bookService.addBook(book1);
        bookService.addBook(book2);
        bookService.addBook(book3);
        bookService.addBook(book4);
        bookService.addBook(book5);
        bookService.addBook(book6);
        bookService.addBook(book7);
        bookService.addBook(book8);
        bookService.addBook(book9);
        bookService.addBook(book10);
        bookService.addBook(book11);
        bookService.addBook(book12);
        bookService.addBook(book13);
        bookService.addBook(book14);
        bookService.addBook(book15);
       
        // Get the books from the database and add them to the book list of each category
        category1FromDb.getBooks().add(bookService.getAllBooks().get(1));
        category1FromDb.getBooks().add(bookService.getAllBooks().get(1));
       
        category2FromDb.getBooks().add(bookService.getAllBooks().get(0));
        category2FromDb.getBooks().add(bookService.getAllBooks().get(8));
        category2FromDb.getBooks().add(bookService.getAllBooks().get(13));
       
        category3FromDb.getBooks().add(bookService.getAllBooks().get(2));
        category3FromDb.getBooks().add(bookService.getAllBooks().get(4));
        category3FromDb.getBooks().add(bookService.getAllBooks().get(7));
        category3FromDb.getBooks().add(bookService.getAllBooks().get(8));
        category3FromDb.getBooks().add(bookService.getAllBooks().get(9));
        category3FromDb.getBooks().add(bookService.getAllBooks().get(12));
        category3FromDb.getBooks().add(bookService.getAllBooks().get(13));
        category3FromDb.getBooks().add(bookService.getAllBooks().get(14));
       
        category4FromDb.getBooks().add(bookService.getAllBooks().get(3));
        category4FromDb.getBooks().add(bookService.getAllBooks().get(5));
        category4FromDb.getBooks().add(bookService.getAllBooks().get(7));
        category4FromDb.getBooks().add(bookService.getAllBooks().get(10));
        category4FromDb.getBooks().add(bookService.getAllBooks().get(12));
        category4FromDb.getBooks().add(bookService.getAllBooks().get(13));

        category5FromDb.getBooks().add(bookService.getAllBooks().get(3));
        category5FromDb.getBooks().add(bookService.getAllBooks().get(5));
        category5FromDb.getBooks().add(bookService.getAllBooks().get(6));
       
        // Update the categories in the database
        bookService.addCategory(category1FromDb);
        bookService.addCategory(category2FromDb);
        bookService.addCategory(category3FromDb);
View Full Code Here

Examples of net.bican.wordpress.Category

    int r = WP.newCategory("deneme", "deneme-slug", 0);
    String rStr = r + "";
    categories = WP.getCategories();
    assertNotNull(categories);
    assertEquals(2, categories.size());
    Category found = null;
    for (Category cat : categories) {
      if (cat.getCategoryId().equals(rStr)) {
        found = cat;
        break;
      }
    }
    assertNotNull(found);
    assertEquals("deneme", found.getCategoryName());
    assertEquals(rStr, found.getCategoryId());
  }
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.