Package org.ofbiz.entity.model

Examples of org.ofbiz.entity.model.ModelReader


            }
            if (outdir.isDirectory() && outdir.canWrite()) {
               
                Iterator passedEntityNames = null;
                try {
                    ModelReader reader = delegator.getModelReader();
                    Collection ec = reader.getEntityNames();
                    TreeSet entityNames = new TreeSet(ec);
                    passedEntityNames = entityNames.iterator();
                } catch(Exception exc) {
                    return ServiceUtil.returnError("Error retrieving entity names.");
                }
View Full Code Here


            request.setAttribute("_ERROR_MESSAGE_", errMsg);
            Debug.logWarning("[updateGeneric] The delegator object was not found in the request, please check the control servlet init.", module);
            return "error";
        }

        ModelReader reader = delegator.getModelReader();
        ModelEntity entity = null;

        try {
            entity = reader.getModelEntity(entityName);
        } catch (GenericEntityException e) {
            Debug.logError(e, module);
        }

        String updateMode = request.getParameter("UPDATE_MODE");
View Full Code Here

        return rowsChanged;
    }

    public static int generateData(GenericDelegator delegator, List errorMessages) throws GenericEntityException {
        int rowsChanged = 0;
        ModelReader reader = delegator.getModelReader();
        Collection entityCol = reader.getEntityNames();
        Iterator classNamesIterator = entityCol.iterator();
        while (classNamesIterator != null && classNamesIterator.hasNext()) {
            ModelEntity entity = reader.getModelEntity((String) classNamesIterator.next());
            String baseName = entity.getPlainTableName();
            if (entity instanceof ModelViewEntity) {
                baseName = ModelUtil.javaNameToDbName(entity.getEntityName());
            }
View Full Code Here

TOP

Related Classes of org.ofbiz.entity.model.ModelReader

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.