Package com.scooterframework.common.exception

Examples of com.scooterframework.common.exception.GenericException


     * Retrieves the underlying Servlet Request.
     *
     * @return HttpServletRequest
     */
    public HttpServletRequest getHttpServletRequest(){
        if (servletRequest == null) throw new GenericException("HttpServletRequest must be set by framework.");
        return servletRequest;
    }
View Full Code Here


     *
     * @param fieldName    a field name
     */
    public void verifyExistenceOfField(String fieldName) {
        if (!isLegalField(fieldName)) {
            throw new GenericException("Field [" + fieldName + "] is not an attribute of class " + getClass().getName() + ".");
        }
    }
View Full Code Here

        Map<String, Object> inputs = new HashMap<String, Object>();
        int size = lhsFlds.length;
    for (int i = 0; i < size; i++) {
            String fkFld = rhsFlds[i];
            if (childHome.isRequiredColumn(fkFld)) {
                throw new GenericException("Column " + fkFld + " in table " + childTable + " cannot be nullified.");
            }
            String pkFld = lhsFlds[i];
            Object fkData = getField(pkFld);
            setSB.append(fkFld).append(" = NULL, ");
            whereSB.append(fkFld).append(" = ").append("? AND ");
View Full Code Here

        try {
            vendor = dbmd.getDatabaseProductName();
            if (vendor != null) vendor = vendor.toUpperCase();
        }
        catch(Exception ex) {
            throw new GenericException("Error in pulling database meta data: " + ex.getMessage());
        }
       
        return vendor;
    }
View Full Code Here

                tableInfos.add(ti);
              }
            }
        }
        catch(Exception ex) {
            throw new GenericException(ex);
        }
        finally {
            DAOUtil.closeConnection(conn);
        }
        return tableInfos;
View Full Code Here

     * @param fieldName     a field name
     */
    public static void verifyExistenceOfColumn(Class<? extends ActiveRecord> clazz, String fieldName) {
        ActiveRecord record = getHomeInstance(clazz);
        if (!record.isColumnField(fieldName)) {
            throw new GenericException("Field [" + fieldName + "] is not a column of table " + record.getTableName() + ".");
        }
    }
View Full Code Here

TOP

Related Classes of com.scooterframework.common.exception.GenericException

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.