Package eja.ejb.entities

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


public class CategoryConverter implements Converter {

    @Override
    public Object getAsObject(FacesContext context, UIComponent component, String value) {
        int id = Integer.parseInt(value);
        Category category = new Category();
        category.setId(id);

        return category;
    }
View Full Code Here

        return category;
    }

    @Override
    public String getAsString(FacesContext context, UIComponent component, Object value) {
        Category category = (Category) value;
        return category.getId().toString();
    }
View Full Code Here

TOP

Related Classes of eja.ejb.entities.Category

Copyright © 2018 www.massapicom. 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.