Package com.caucho.amber

Examples of com.caucho.amber.AmberRuntimeException


      return null;

    Throwable e = _listenerExceptionMap.get(className);

    if (e != null)
      throw new AmberRuntimeException(e);
    else if (_exception != null) {
      throw new AmberRuntimeException(_exception);
    }

    ArrayList<ListenerType> listenerList;

    for (Map.Entry<String, ArrayList<ListenerType>> entry : _entityListenerMap
View Full Code Here


  }

  public AmberPersistenceUnit getPersistenceUnit(String name)
  {
    if (_exception != null)
      throw new AmberRuntimeException(_exception);

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

  }

  public EntityManagerFactory getEntityManagerFactory(String name)
  {
    if (_exception != null)
      throw new AmberRuntimeException(_exception);

    EntityManagerFactory factory = _factoryMap.get(name);
    if (factory != null)
      return factory;
View Full Code Here

  }

  public EntityManager getPersistenceContext(String name)
  {
    if (_exception != null)
      throw new AmberRuntimeException(_exception);

    if ("".equals(name) && _unitConfigList.size() > 0)
      name = _unitConfigList.get(0).getName();

    EntityManager context = _persistenceContextMap.get(name);
View Full Code Here

  }

  public EntityManager getExtendedPersistenceContext(String name)
  {
    if (_exception != null)
      throw new AmberRuntimeException(_exception);

    if ("".equals(name) && _unitConfigList.size() > 0)
      name = _unitConfigList.get(0).getName();

    /*
 
View Full Code Here

      aConn.addCompletion(getDeleteCompletion());
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new AmberRuntimeException(e);
    }
  }
View Full Code Here

   */
  public Entity newDiscriminatorEntity(Object key,
                                       String discriminator)
  {
    if (discriminator == null || key == null)
      throw new AmberRuntimeException(L.l("{0} is not a valid inheritance key.",
                                          key));

    EntityType subType = (EntityType) _entityType.getSubClass(discriminator);

    return subType.getHome().newEntity(key);
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

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.