Package com.caucho.amber

Examples of com.caucho.amber.AmberRuntimeException


      try {
        initEntityHomes();
      } catch (RuntimeException e) {
        throw e;
      } catch (Exception e) {
        throw new AmberRuntimeException(e);
      }
    }

    return _entityHomeMap.get(name);
  }
View Full Code Here


    try {
      Entity entity = (Entity) getInstanceClass().newInstance();

      return entity;
    } catch (Exception e) {
      throw new AmberRuntimeException(e);
    }
  }
View Full Code Here

   * Sets the target type.
   */
  public void setType(AmberType targetType)
  {
    if (! (targetType instanceof EntityType))
      throw new AmberRuntimeException(L.l("many-to-one requires an entity target at '{0}'",
                                          targetType));

    _targetType = (EntityType) targetType;
  }
View Full Code Here

     
      return null;
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new AmberRuntimeException(e);
    }
  }
View Full Code Here

        type = null;
    }
    while ((type != null) && (field == null));

    if (field == null)
      throw new AmberRuntimeException(L.l("'{0}' is an unknown field of '{1}' which has the following list of fields '{2}'",
                                          fieldName, getTargetType().getName(),
                                          getTargetType().getFields()));

    return field.createExpr(parser, this);
  }
View Full Code Here

     
      return null;
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new AmberRuntimeException(e);
    }
  }
View Full Code Here

      try {
        initEntityHomes();
      } catch (RuntimeException e) {
        throw e;
      } catch (Exception e) {
        throw new AmberRuntimeException(e);
      }
    }

    return _entityHomeMap.get(name);
  }
View Full Code Here

  Thread thread = Thread.currentThread();
  ClassLoader loader = thread.getContextClassLoader();
 
  _javaBeanClass = Class.forName(getClassName(), false, loader);
      } catch (ClassNotFoundException e) {
  throw new AmberRuntimeException(e);
      }
    }
   
    return _javaBeanClass;
  }
View Full Code Here

            loader = getPersistenceUnit().getEnhancedLoader();

          _instanceClass = Class.forName(getInstanceClassName(), false, loader);
        }
      } catch (ClassNotFoundException e) {
        throw new AmberRuntimeException(e);
      }

      if (! validationInterface.isAssignableFrom(_instanceClass)) {
        if (getConfigException() != null)
          throw new AmberRuntimeException(getConfigException());
        else if (_amberPersistenceUnit.getConfigException() != null)
          throw new AmberRuntimeException(_amberPersistenceUnit.getConfigException());

        throw new AmberRuntimeException(L.l("'{0}' with classloader {1} is an illegal instance class.  The class has not been enhanced as implementing {2}.",
                                            _instanceClass.getName(), _instanceClass.getClassLoader(),
                                            validationInterface));
      }
    }
View Full Code Here

    if (_query != null) {
      try {
        _query = _aConn.prepareQuery(query);
      } catch (SQLException e) {
        throw new AmberRuntimeException(e);
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.caucho.amber.AmberRuntimeException

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.