Package de.iritgo.aktera.persist

Examples of de.iritgo.aktera.persist.PersistenceException


    }
    catch (SQLException se)
    {
      log.error(se.toString());

      throw new PersistenceException("Unable to add field '" + fieldName + "' in table '" + pmd.getTableName()
              + "'");
    }
    finally
    {
      if (stmt != null)
      {
        try
        {
          stmt.close();
        }
        catch (SQLException se)
        {
          throw new PersistenceException(se);
        }
      }

      if (pstmt != null)
      {
        try
        {
          pstmt.close();
        }
        catch (SQLException se)
        {
          throw new PersistenceException(se);
        }
      }

      if (myConnection != null)
      {
        try
        {
          myConnection.close();
        }
        catch (SQLException se)
        {
          throw new PersistenceException(se);
        }
      }
    }
  }
View Full Code Here


    }
    catch (SQLException se)
    {
      log.error(se.toString());

      throw new PersistenceException("Unable to add field '" + fieldName + "' in table '" + pmd.getTableName()
              + "'");
    }
    finally
    {
      if (stmt != null)
      {
        try
        {
          stmt.close();
        }
        catch (SQLException se)
        {
          throw new PersistenceException(se);
        }
      }

      if (pstmt != null)
      {
        try
        {
          pstmt.close();
        }
        catch (SQLException se)
        {
          throw new PersistenceException(se);
        }
      }

      if (myConnection != null)
      {
        try
        {
          myConnection.close();
        }
        catch (SQLException se)
        {
          throw new PersistenceException(se);
        }
      }
    }
  }
View Full Code Here

   * @param fieldName Field name.
   * @return The update statement.
   */
  public String getUpdateTypeFieldStatement(PersistentMetaData pmd, String fieldName) throws PersistenceException
  {
    throw new PersistenceException("[JDBCDatabaseType] No getUpdateTypeFieldStatement() method defined.");
  }
View Full Code Here

    }
    catch (SQLException se)
    {
      log.error(se.toString());

      throw new PersistenceException("Unable to update type of field '" + fieldName + "' in table '"
              + pmd.getTableName() + "'");
    }
    finally
    {
      if (myConnection != null)
      {
        try
        {
          myConnection.close();
        }
        catch (SQLException se)
        {
          throw new PersistenceException(se);
        }
      }
    }
  }
View Full Code Here

      }
      catch (SQLException se)
      {
        log.error(se.toString());

        throw new PersistenceException("Unable to delete field '" + fieldName + "' in table '"
                + pmd.getTableName() + "'");
      }
      finally
      {
        if (stmt != null)
        {
          try
          {
            stmt.close();
          }
          catch (SQLException se)
          {
            throw new PersistenceException(se);
          }
        }

        if (pstmt != null)
        {
          try
          {
            pstmt.close();
          }
          catch (SQLException se)
          {
            throw new PersistenceException(se);
          }
        }

        if (myConnection != null)
        {
          try
          {
            myConnection.close();
          }
          catch (SQLException se)
          {
            throw new PersistenceException(se);
          }
        }
      }
    }
    catch (SQLException se)
    {
    }
    finally
    {
      if (stmt != null)
      {
        try
        {
          stmt.close();
        }
        catch (SQLException se)
        {
        }
      }

      if (myConnection != null)
      {
        try
        {
          myConnection.close();
        }
        catch (SQLException se)
        {
          throw new PersistenceException(se);
        }
      }
    }
  }
View Full Code Here

        returnValue = rs.getString(index);

        break;

      default:
        throw new PersistenceException("Unknown type " + myMetaData.getType(fieldName));
    } // switch

    return returnValue;
  }
View Full Code Here

        myBean = c.newInstance();
      }
      catch (Exception e)
      {
        throw new PersistenceException("Unable to create bean '" + className + "'", e);
      }
    }
    else
    {
      log.warn("No bean class defined for '" + getName() + "'");
View Full Code Here

    String origValue = null;
    String strVal = null;

    if (oneProp.getName() == null)
    {
      throw new PersistenceException("Null property name for field '" + fieldName + "'");
    }

    try
    {
      Object oneValue = fieldValue;
View Full Code Here

  {
    PropertyDescriptor[] props = PropertyUtils.getPropertyDescriptors(myBean);

    if (props.length == 0)
    {
      throw new PersistenceException("Class '" + myBean.getClass().getName() + "' declares no fields");
    }

    PropertyDescriptor oneProp = null;

    for (int i = 0; i < props.length; i++)
View Full Code Here

        rs.close();
        rs = null;
      }
      catch (SQLException se)
      {
        throw new PersistenceException("Unable to close result set", se);
      }
    }

    if (ps != null)
    {
      try
      {
        ps.close();
        ps = null;
      }
      catch (SQLException se)
      {
        throw new PersistenceException("Unable to close prepared statement", se);
      }
    }

    if (s != null)
    {
      try
      {
        s.close();
        s = null;
      }
      catch (SQLException se)
      {
        throw new PersistenceException("Unable to close statement", se);
      }
    }

    if ((c != null) && (currentTransaction == null))
    {
      try
      {
        c.close();
        c = null;
      }
      catch (SQLException se)
      {
        throw new PersistenceException("Unable to close connection", se);
      }
    }
  }
View Full Code Here

TOP

Related Classes of de.iritgo.aktera.persist.PersistenceException

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.