Package org.ofbiz.entity

Examples of org.ofbiz.entity.GenericModelException


                                if (("one".equals(modelRelation.getType()) || "one-nofk".equals(modelRelation.getType())) && !modelRelation.isAutoRelation()) {
                                    ModelEntity relatedEnt = null;
                                    try {
                                        relatedEnt = this.getModelEntity(modelRelation.getRelEntityName());
                                    } catch (GenericModelException e) {
                                        throw new GenericModelException("Error getting related entity [" + modelRelation.getRelEntityName() + "] definition from entity [" + curEntityName + "]", e);
                                    }
                                    if (relatedEnt != null) {
                                        // don't do relationship to the same entity, unless title is "Parent", then do a "Child" automatically
                                        String targetTitle = modelRelation.getTitle();
                                        if (curModelEntity.getEntityName().equals(relatedEnt.getEntityName()) && "Parent".equals(targetTitle)) {
View Full Code Here


        if (ec == null) {
            throw new GenericEntityConfException("ERROR: Unable to load Entity Cache");
        }
        ModelEntity modelEntity = (ModelEntity) ec.get(entityName);
        if (modelEntity == null) {
            throw new GenericModelException("Could not find definition for entity name " + entityName);
        }
        return modelEntity;
    }
View Full Code Here

    }

    public void validateSql(ModelEntity modelEntity) throws GenericModelException {
        ModelField field = getModelField(modelEntity);
        if (field == null) {
            throw new GenericModelException("Field with name " + fieldName + " not found in the " + modelEntity.getEntityName() + " Entity");
        }
    }
View Full Code Here

        rhs.checkCondition(modelEntity);
    }

    public void validateSql(ModelEntity modelEntity, List conditionList) throws GenericModelException {
        if (conditionList == null) {
            throw new GenericModelException("Condition list is null");
        }
        for (int i = 0; i < conditionList.size(); i++) {
            Object condObj = conditionList.get(i);
            if (!(condObj instanceof EntityCondition)) {
                throw new GenericModelException("Object is not a valid EntityCondition [" + condObj.getClass().getName() + "]");
            }
            EntityCondition condition = (EntityCondition) condObj;
            condition.checkCondition(modelEntity);
        }
    }
View Full Code Here

TOP

Related Classes of org.ofbiz.entity.GenericModelException

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.