Package javax.ejb

Examples of javax.ejb.ObjectNotFoundException


  Long pk = null;
  try {
      pk = Long.valueOf (key);
  } catch (NumberFormatException nex) {
      throw new ObjectNotFoundException
    ("Invalid key format for key = " + key);
  }
  return ejbFindByPrimaryKey (pk);
    }
View Full Code Here


    public Long ejbFindByWaitingOn(Long processId, String channel)
  throws FinderException {
  try {
      Long res = selectByWaitingOn(processId, channel);
      if (res == null) {
    throw new ObjectNotFoundException
        ("No activity of process " + processId
         + " waiting on " + channel);
      }
      return res;
  } catch (SQLException ex) {
View Full Code Here

      result = selectByPrimaryKey(primaryKey);
  } catch (SQLException ex) {
      throw new EJBException(ex);
  }
  if (!result) {
      throw new ObjectNotFoundException
    ("Row for id " + primaryKey + " not found.");
  }
  return primaryKey;
    }
View Full Code Here

  Long pk = null;
  try {
      pk = Long.valueOf (key);
  } catch (NumberFormatException nex) {
      throw new ObjectNotFoundException
    ("Invalid key format for key = " + key);
  }
  return ejbFindByPrimaryKey (pk);
    }
View Full Code Here

  Long pk = null;
  try {
      pk = selectByActivityKey(Long.valueOf(key));
  } catch (NumberFormatException nex) {
      throw new ObjectNotFoundException
    ("Invalid key format for key = " + key);
  } catch (SQLException ex) {
      throw new EJBException(ex);
  }
  if (pk == null) {
      throw new ObjectNotFoundException
    ("Row for id " + key + " not found.");
  }
  return pk;
    }
View Full Code Here

            try {
               stmt.setInt(1, pk.intValue());
               ResultSet rs = stmt.executeQuery();
               try {
                  if (!rs.next())
                     throw new ObjectNotFoundException
           ("EntityExc id " + pk.intValue() + " not found in database.");
               } finally {
                  rs.close();
               }
            } finally {
View Full Code Here

         ps = getConnection().prepareStatement("SELECT ID FROM CCBMPACCOUNT WHERE ID = ?");
         ps.setInt(1, id.intValue());
         ResultSet rs = ps.executeQuery();
         if (!rs.next())
         {
            throw new ObjectNotFoundException("No such account: " + id);
         } // end of if ()
         rs.close();

      }
      catch (Exception e)
View Full Code Here

           try
           {
              ps.setString(1, pk);
              ResultSet rs = ps.executeQuery();
              if (!rs.next())
                 throw new ObjectNotFoundException("No bean with " +"pk=" +pk+ " found.");
              rs.close();
              return pk;
           }
           finally
           {
View Full Code Here

         ps = getConnection().prepareStatement("SELECT ID FROM CCBMPCUSTOMER WHERE ID = ?");
         ps.setInt(1, id.intValue());
         ResultSet rs = ps.executeQuery();
         if (!rs.next())
         {
            throw new ObjectNotFoundException("No such customer: " + id);
         } // end of if ()
         rs.close();

      }
      catch (Exception e)
View Full Code Here

               ps.setString(1, pk.getKey());

               ResultSet rs = ps.executeQuery();

               if (!rs.next())
                  throw new ObjectNotFoundException("No bean with " +
                     "accountNumber=" +
                     pk.getKey() + " found.");

               return pk;
            }
View Full Code Here

TOP

Related Classes of javax.ejb.ObjectNotFoundException

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.