Package org.apache.empire.exceptions

Examples of org.apache.empire.exceptions.ItemNotFoundException


          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

        {   // 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

                bean = loadBean(beanSupport.getActionParamKey());
            }
            if (bean==null)
            {   // Must have an action error set!
                if (!hasActionError())
                    setActionError(new ItemNotFoundException(beanSupport.getRecordKeyString()));
                return doCancel();
            }
            beanSupport.setData(bean);
        }
        else if (beanSupport.getRecord().isNew()==false)
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

     */
    public boolean wasModified(Column column)
    {
        int index = getFieldIndex(column);
        if (index<0)
            throw new ItemNotFoundException(column.getName());
        // check modified
        return (modified!=null && modified[index]);
    }
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

                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

            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

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.