Package org.ofbiz.entity

Examples of org.ofbiz.entity.GenericDelegator.findAll()


        LocalDispatcher dispatcher = dctx.getDispatcher();
        Map result = FastMap.newInstance();
       
        List glAccounts = FastList.newInstance();
        try {
      glAccounts = delegator.findAll("GlAccount");
    } catch (GenericEntityException e) {
            Debug.logError(e.getMessage(), module);
    }
    result.put("glAccounts", glAccounts);
    result.put("glAccountCount", glAccounts.size());
View Full Code Here


        Map result = new HashMap();
        GenericDelegator delegator = dctx.getDelegator();
        LocalDispatcher dispatcher = dctx.getDispatcher();

        try {
            List products = delegator.findAll("Product", UtilMisc.toList("isVirtual DESC"));
            Iterator productsIt = products.iterator();
            Long zero = new Long(0);
            List allProducts = new ArrayList();
            while (productsIt.hasNext()) {
                GenericValue product = (GenericValue)productsIt.next();
View Full Code Here

        Map results = ServiceUtil.returnSuccess();

        // get a list of all available facilities for looping
        List facilities = null;
        try {
            facilities = delegator.findAll("Facility");
        } catch (GenericEntityException e) {
            Debug.logError(e, "Couldn't get list of facilities.", module);
            return ServiceUtil.returnError("Unable to locate facilities.");
        }
View Full Code Here

    public static List getAllCatalogIds(ServletRequest request) {       
        List catalogIds = new ArrayList();
        List catalogs = null;
        GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
        try {
            catalogs = delegator.findAll("ProdCatalog", UtilMisc.toList("catalogName"));
        } catch (GenericEntityException e) {
            Debug.logError(e, "Error looking up all catalogs", module);
        }
        if (catalogs != null) {
            Iterator i = catalogs.iterator();
View Full Code Here

    public static void getCategoriesWithNoParent(ServletRequest request, String attributeName) {
        GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
        Collection results = new LinkedList();

        try {
            Collection allCategories = delegator.findAll("ProductCategory");

            if (allCategories == null)
                return;
            Iterator aciter = allCategories.iterator();
View Full Code Here

        //Does not modify the old one now.
        Debug.logInfo("initInventoryEventPlanned called", module);
       
        List listResult = null;
        try{
            listResult = delegator.findAll("InventoryEventPlanned");
            //int numOfRecordsRemoved = delegator.removeByCondition("InventoryEventPlanned", null);
        } catch(GenericEntityException e) {
            Debug.logError(e,"Error : delegator.findAll(\"InventoryEventPlanned\")", module);
            return ServiceUtil.returnError("Problem, we can not find all the items of InventoryEventPlanned, for more detail look at the log");
        }
View Full Code Here

    public List createShoppingLists() {
        List shoppingLists = null;
        GenericDelegator delegator = this.session.getDelegator();
        try {
            shoppingLists = delegator.findAll("ShoppingList");
        } catch (GenericEntityException e) {
            Debug.logError(e, module);
            ServiceUtil.returnError("Error running initLowLevelCode: " + e.getMessage());
        }
View Full Code Here

       
        try {
            // find the largest keepRemoveInfoHours value on an EntitySyncRemove and kill everything before that, if none found default to 10 days (240 hours)
            double keepRemoveInfoHours = 24;
           
            List entitySyncRemoveList = delegator.findAll("EntitySync");
            Iterator entitySyncRemoveIter = entitySyncRemoveList.iterator();
            while (entitySyncRemoveIter.hasNext()) {
                GenericValue entitySyncRemove = (GenericValue) entitySyncRemoveIter.next();
                Double curKrih = entitySyncRemove.getDouble("keepRemoveInfoHours");
                if (curKrih != null) {
View Full Code Here

    public List getAllParticipantMappings(ParticipantMappingTransaction mappingTransaction) throws RootException {
        GenericDelegator delegator = SharkContainer.getDelegator();
        List lookupList = null;
        try {
            lookupList = delegator.findAll(org.ofbiz.shark.SharkConstants.WfParticipantMap);
        } catch (GenericEntityException e) {
            throw new RootException(e);
        }
        if (lookupList != null) {
            List compiledList = new ArrayList();
View Full Code Here

    public List getAllGroupnames(UserTransaction trans) throws RootException {
        GenericDelegator delegator = SharkContainer.getDelegator();
        List groupNames = new ArrayList();
        List groups = null;
        try {
            groups = delegator.findAll(org.ofbiz.shark.SharkConstants.SharkGroup);
        } catch (GenericEntityException e) {
            Debug.logError(e, module);
            throw new RootException(e);
        }
        if (groups != null && groups.size() > 0) {
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.