Examples of EOGeneralAdaptorException


Examples of com.webobjects.eoaccess.EOGeneralAdaptorException

  }

  @Override
  public void insertRow(NSDictionary row, EOEntity entity) {
    try {
      throw new EOGeneralAdaptorException("ERRESTAdaptorChannel.insertRow not supported.");
    }
    catch (EOGeneralAdaptorException e) {
      throw e;
    }
    catch (Throwable e) {
      e.printStackTrace();
      throw new EOGeneralAdaptorException("Failed to insert '" + entity.name() + "' with row " + row + ": " + e.getMessage());
    }
  }
View Full Code Here

Examples of com.webobjects.eoaccess.EOGeneralAdaptorException

  }

  @Override
  public int deleteRowsDescribedByQualifier(EOQualifier qualifier, EOEntity entity) {
    try {
      throw new EOGeneralAdaptorException("ERRESTAdaptorChannel.deleteRowsDescribedByQualifier not supported.");
    }
    catch (EOGeneralAdaptorException e) {
      throw e;
    }
    catch (Throwable e) {
      e.printStackTrace();
      throw new EOGeneralAdaptorException("Failed to delete '" + entity.name() + "' with qualifier " + qualifier + ": " + e.getMessage());
    }
  }
View Full Code Here

Examples of com.webobjects.eoaccess.EOGeneralAdaptorException

        try {
            s.append(" **** Caught: "+exception + "\n");
            s.append(extraInfoString(extraInfo, 3));
           
            if (exception instanceof EOGeneralAdaptorException) {
                EOGeneralAdaptorException  e= (EOGeneralAdaptorException)exception;
                if (e.userInfo()!=null) {
                    Object userInfo=e.userInfo();
                    if (userInfo instanceof NSDictionary) {
                        NSDictionary uid=(NSDictionary)userInfo;
                        for (Enumeration e2=uid.keyEnumerator(); e2.hasMoreElements();) {
                            String key=(String)e2.nextElement();
                            Object value=uid.objectForKey(key);
                            s.append(key + " = " + value + ";\n");
                        }
                    } else {
                        s.append(e.userInfo().toString());
                    }
                }
            } else {
                s.append(ERXUtilities.stackTrace(exception));
            }
View Full Code Here

Examples of com.webobjects.eoaccess.EOGeneralAdaptorException

    }
   
    @Override
    public boolean handleDatabaseException(EODatabaseContext databaseContext, Throwable throwable) {
      if (throwable instanceof EOGeneralAdaptorException) {
        EOGeneralAdaptorException gae = (EOGeneralAdaptorException) throwable;
        if (gae.userInfo() != null) {
          EOAdaptorOperation failedOperation = (EOAdaptorOperation) gae.userInfo().objectForKey(EOAdaptorChannel.FailedAdaptorOperationKey);
          if (failedOperation != null) {
            Throwable t = failedOperation.exception();
            if (t instanceof JDBCAdaptorException) {
              JDBCAdaptorException jdbcEx = (JDBCAdaptorException) t;
              SQLException sqlEx = jdbcEx.sqlException();
View Full Code Here

Examples of com.webobjects.eoaccess.EOGeneralAdaptorException

          if (connection != null) {
            old = connection.isReadOnly();
            connection.setReadOnly(mode);
          }
          else {
            throw new EOGeneralAdaptorException("Can't switch connection mode to " + mode + ", the connection is null");
          }
        }
        catch (java.sql.SQLException e) {
          throw new EOGeneralAdaptorException("Can't switch connection mode to " + mode, new NSDictionary(e, "originalException"));
        }
      }
      return old;
    }
View Full Code Here

Examples of com.webobjects.eoaccess.EOGeneralAdaptorException

        if (eoattribute.valueFactoryMethod() != null && eoattribute.valueFactoryMethod().implementedByObject(obj) && eoattribute.adaptorValueConversionMethod().implementedByObject(obj)) {
          obj = eoattribute.adaptorValueByConvertingAttributeValue(obj);
        }

        if (eoattribute.externalType() == null) {
          throw new EOGeneralAdaptorException("Attribute " + eoattribute.name() + " on entity " + eoattribute.entity().name() + " with prototype named " + eoattribute.prototypeName() + " has no external type defined");
        }

        switch (FrontBaseTypes.internalTypeForExternal(eoattribute.externalType())) {
        case FrontBaseTypes.FB_Character:
        case FrontBaseTypes.FB_VCharacter: {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.