Package org.apache.empire.exceptions

Examples of org.apache.empire.exceptions.MiscellaneousErrorException


                // emulate using java.util.UUID
                sql.append(DATATYPE_UNIQUEID);
                break;
            default:
                // Error: Unable to append column of type UNKNOWN
                throw new MiscellaneousErrorException("Error: Unable to append column of type UNKNOWN");
        }
        // done. Add more attributes (like e.g. NULLABLE or NOT NULL)
        return true;
    }
View Full Code Here


    protected synchronized void notifyParamUsage(DBCmdParam param)
    {
        int index = cmdParams.indexOf(param);
        if (index < paramUsageCount)
        {   // Error: parameter probably used twice in statement!
            throw new MiscellaneousErrorException("A parameter may only be used once in a command.");
        }
        if (index > paramUsageCount)
        {   // Correct parameter order
            cmdParams.remove(index);
            cmdParams.insertElementAt(param, paramUsageCount);
View Full Code Here

        DBDatabaseDriver prevDriver = this.driver;
        try {
            // Set driver
            if (this.driver!=null && this.driver!=driver && driver!=null)
            {   // The database belongs to a different driver
                throw new MiscellaneousErrorException("The database is attached to a different driver.");
            }
            // Temporarily change driver
            if (this.driver== null)
                this.driver = driver;
            // Get DDL Command
View Full Code Here

            }
            else
            { // Bean Property Name
                String propName = cols[i].getBeanPropertyName();
                if (propName == null || propName.length() == 0)
                    throw new MiscellaneousErrorException("Invalid Bean Property Name");
                // Get Property value
                try
                {
                    key[i] = BeanUtils.getSimpleProperty(item, propName);
                }
View Full Code Here

 
    protected PageDefinitions(String pageUriExtension)
    {
        if (instance!=null)
        {
            throw new MiscellaneousErrorException("PageDefintions alreday defined. Only one Instance allowed!");
        }
        // init
        instance = this;
        // set extension
        this.pageUriExtension = pageUriExtension;
View Full Code Here

     */
    protected PageOutcome getParentOutcome(String action, boolean redirect)
    {
        PageDefinition parentPage = getParentPage();
        if (parentPage == null)
            throw new MiscellaneousErrorException("No Parent Page defined for " + getPageName());
        if (redirect)
            return parentPage.getRedirect(action);
        else
            return parentPage.getOutcome(action);
    }
View Full Code Here

        if (base==null && property.equals("page"))
        {
            UIViewRoot vr = FacesContext.getCurrentInstance().getViewRoot();
            if (vr==null)
            {   // Error: No view root    
                RuntimeException e = new MiscellaneousErrorException("ViewRoot not available. Unable to get Page Bean.");
                log.error(e.getMessage());
                throw e;
            }
            Map<String,Object> vmap = vr.getViewMap(false);
            Page page = (vmap!=null ? (Page)vmap.get("page") : null);
            if (page==null)
            {   // Error: No page bean     
                RuntimeException e = new MiscellaneousErrorException("Page bean not available for current view.");
                log.error(e.getMessage());
                throw e;
            }
            context.setPropertyResolved(true);
            return page;
        }
View Full Code Here

                // emulate using java.util.UUID
                sql.append(DATATYPE_UNIQUEID);
                break;
            default:
                // Error: Unable to append column of type UNKNOWN
                throw new MiscellaneousErrorException("Error: Unable to append column of type UNKNOWN");
        }
        // done. Add more attributes (like e.g. NULLABLE or NOT NULL)
        return true;
    }
View Full Code Here

 
    protected PageDefinitions(String pageUriExtension)
    {
        if (instance!=null)
        {
            throw new MiscellaneousErrorException("PageDefintions alreday defined. Only one Instance allowed!");
        }
        // init
        instance = this;
        // set extension
        this.pageUriExtension = pageUriExtension;
View Full Code Here

            }
            else
            { // Bean Property Name
                String propName = cols[i].getBeanPropertyName();
                if (propName == null || propName.length() == 0)
                    throw new MiscellaneousErrorException("Invalid Bean Property Name");
                // Get Property value
                try
                {
                    key[i] = BeanUtils.getSimpleProperty(item, propName);
                }
View Full Code Here

TOP

Related Classes of org.apache.empire.exceptions.MiscellaneousErrorException

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.