Package org.openbp.server.persistence

Examples of org.openbp.server.persistence.PersistenceContext.findById()


      {
        String msg = LogUtil.error(PersistenceContextObjectSerializer.class, "Error obtaining persistence context for deserialization of a persistent object of type $0 (id: $1, variable: $2). [{3}]", cls.getName(), id, key, context);
        throw new EngineException("ContextDeserialization", msg);
      }

      Object loaded = pc.findById(id, cls);
      if (loaded == null)
      {
        String msg = LogUtil.error(PersistenceContextObjectSerializer.class, "Persistent object of type $0 not found when deserializing token (id: $1, variable: $2). [{3}]", cls.getName(), id, key, context);
        throw new EngineException("ContextDeserialization", msg);
      }
View Full Code Here


            try
            {
              // Retrieve the bean according to the given id value
              PersistenceContext pc = persistenceContextProvider.obtainPersistenceContext();
              value = pc.findById(value, targetType.getJavaClass());
            }
            catch (Exception e)
            {
              throw newError("AutoRetrieval", "Auto-retrieval of bean of expression '" + ExpressionConstants.REFERENCE_KEY_OPERATOR + "" + ident + "' by id value '" + value + "' failed.", e, sp);
            }
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.