Package org.apache.empire.exceptions

Examples of org.apache.empire.exceptions.ItemNotFoundException


                        record.setValue(column, value);
                }
                else if (column.isRequired())
                {   // Reference column not provided
                    log.warn("Value for reference column has not been provided!");
                    throw new ItemNotFoundException(name);
                }
            }
        }
    }
View Full Code Here


                        throw new ObjectNotValidException(rec);
                    // Record restored
                    this.record = (DBRecord)rec;
                }
                // Record not found
                throw new ItemNotFoundException(rowset.getName());
            }
            // Other
            default:
                throw new NotSupportedException(this, "reloadRecord[] " + String.valueOf(persistence));
        }
View Full Code Here

            throw new InvalidArgumentException("rowsetId", rowsetId);
        // database suchen
        String dbid = rowsetId.substring(0, i);
        DBDatabase db = DBDatabase.findById(dbid);
        if (db==null)
            throw new ItemNotFoundException(dbid);
        // rowset suchen
        String rsname = rowsetId.substring(i+1);
        DBRowSet rset = db.getRowSet(rsname);
        if (rset==null)
            throw new ItemNotFoundException(rowsetId);
        return rset;
    }
View Full Code Here

          int rdi = recData.getFieldIndex(column);
          if (rdi<0)
          {  // Field not available in Record Data
            if (primaryKey!=null && primaryKey.contains(column))
            {  // Error: Primary Key not supplied
                throw new ItemNotFoundException(column.getName());
            }
                if (timestampColumn == column)
                { // Check the update Time Stamp
                  if (log.isInfoEnabled())
                    log.info(getName() + "No record timestamp value has been provided. Hence concurrent changes will not be detected.");
View Full Code Here

                DBJoinExpr join = cmd.joins.get(i);
                DBColumn left  = join.getLeft() .getUpdateColumn();
                DBColumn right = join.getRight().getUpdateColumn();
                if (left.getRowSet()==table && table.isKeyColumn(left))
                    if (!addJoinRestriction(upd, left, right, keyColumns, rec))
                        throw new ItemNotFoundException(left.getFullName());
                if (right.getRowSet()==table && table.isKeyColumn(right))
                    if (!addJoinRestriction(upd, right, left, keyColumns, rec))
                        throw new ItemNotFoundException(right.getFullName());
            }
            // Evaluate Existing restrictions
            for (i = 0; cmd.where != null && i < cmd.where.size(); i++)
            {
                DBCompareExpr cmp = cmd.where.get(i);
View Full Code Here

     */
    public final Object getValue(ColumnExpr column)
    {
        int index = getFieldIndex(column);
        if (index<0)
            throw new ItemNotFoundException(column.getName());
        return getValue(index);
    }
View Full Code Here

        // Find log configuration node
        Element loggingNode = XMLUtil.findFirstChild(rootNode, loggingNodeName);
        if (loggingNode == null)
        {   // log configuration node not found
            log.error("Log configuration node {} has not been found. Logging has not been configured.", loggingNodeName);
            throw new ItemNotFoundException(loggingNodeName);
        }
        // Init Log4J
        DOMConfigurator.configure(loggingNode);
        // done
        log.info("Logging sucessfully configured from node {}.", loggingNodeName);
View Full Code Here

        DBRowSet rset = DBRowSet.findById(rsid);
        // column suchen
        String colname = columnId.substring(i+1);
        DBColumn col = rset.getColumn(colname);
        if (col==null)
            throw new ItemNotFoundException(columnId);
        return col;
    }
View Full Code Here

            // Get configuration node
            propertiesNode = XMLUtil.findFirstChild(propertiesNode, nodeName);
            if (propertiesNode == null)
            { // Configuration
                log.error("Property-Node {} has not been found.", nodeName);
                throw new ItemNotFoundException(nodeName);
            }
        }
        // read the properties
        readProperties(bean, propertiesNode);
    }
View Full Code Here

        {   // Load the bean
            T bean = loadBean(key);
            if (bean==null)
            {   // Must have an action error set!
                if (!hasActionError())
                    setActionError(new ItemNotFoundException(beanSupport.getRecordKeyString()));
                return doCancel();
            }
            beanSupport.setData(bean);
        }
        // Check if record is valid
View Full Code Here

TOP

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

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.