Package nexj.core.persistence

Examples of nexj.core.persistence.PersistenceException


            return is.readObject();
         }
         catch (Exception e)
         {
            throw new PersistenceException("err.runtime.cacheDeserialize", e);
         }
      }
View Full Code Here


            {
               OID oid = work.computeOID();

               if (oid == null)
               {
                  throw new PersistenceException("err.persistence.requiredOID",
                     new Object[]{instance.getLazyMetaclass()});
               }

               instance.setOID(oid);
            }
View Full Code Here

      {
         return new MySQLAdapter();
      }
      else
      {
         throw new PersistenceException("Unknown database product \"{0}\"",
            new Object[]{sDatabase});
      }
   }
View Full Code Here

         //OID must be a single value, converted to a string.
         Object[] oidValues = oid.getValueArray();

         if (oidValues.length != 1)
         {
            throw new PersistenceException("err.persistence.oidValueCount",
               new Object[]{component.getName(), Primitive.ONE_INTEGER,
                  Primitive.createInteger(oidValues.length)});
         }

         oidValues[0] = Primitive.toString(oidValues[0]);
View Full Code Here

                     value = (primitiveMapping.getAttribute().getType() == Primitive.STRING) ?
                        (Object)directFile.getDataAsString() : directFile.getDataAsBinary();
                  }
                  catch (IOException ex)
                  {
                     throw new PersistenceException("err.persistence.file.io", ex);
                  }
                 
                  instance.setOldValueDirect(attribute.getOrdinal(), value);
                 
                  break;
View Full Code Here

      FileConnection connection = ((FileStorageConnectionFactory)fragment.getConnectionFactory()
         .getInstance(m_context)).getConnection(this);

      if (!connection.attachToFile(sDataFile))
      {
         throw new PersistenceException("err.persistence.file.io");
      }

      return connection;
   }
View Full Code Here

      //Compute filename from instance id
      String sDataFile = m_adapter.mapOIDToFile(m_instance.getOID());
     
      if (sDataFile == null)
      {
         throw new PersistenceException("err.persistence.file.invalidFileName",
            new Object[]{m_instance.getOID().toString(), m_instance.getClassName()});
      }
     
      if (s_logger.isDebugEnabled())
      {
View Full Code Here

         }
         catch (SQLException e)
         {
            if (!m_bSafe)
            {
               throw new PersistenceException(
                  "err.persistence.executeSQL", new Object[]{ObjUtil.getMessage(e), sSQL}, e);
            }
         }
         finally
         {
View Full Code Here

        
         schema.setPortable(bPortable);
      }
      catch (SQLException e)
      {
         throw new PersistenceException("err.persistence.schemaRead", e);
      }
      finally
      {
         if (rs != null)
         {
View Full Code Here

            appender = s_appenderArray[op.getOrdinal()];
         }

         if (appender == null)
         {
            throw new PersistenceException("err.persistence.unsupportedOperator",
               new Object[]{op.getSymbol()});
         }

         Operator parent = op.getParent();
         String sSuffix = null;
View Full Code Here

TOP

Related Classes of nexj.core.persistence.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.