Package javax.jdo

Examples of javax.jdo.JDOFatalUserException


     * Returns the FetchGroupManager associated with the given persistence
     * manager.
     */
    public static FetchGroupManager getFetchGroupManager(PersistenceManager mgr) {
        if (!(mgr instanceof InterfaceManager)) {
            throw new JDOFatalUserException(I18N.msg("E_non_xorm_pm"));
        }
        return ((InterfaceManager) mgr).getInterfaceManagerFactory().getFetchGroupManager();
    }
View Full Code Here


                fieldToColumn.put(fd.name, c);
            }
        } else {
            pk = table.getPrimaryKey();
            if (pk == null) {
                throw new JDOFatalUserException(I18N.msg("E_mapping_no_pk", table.getName()));
            }
        }
        defaultFetchGroup.addColumn(pk);
        this.table = table;
    }
View Full Code Here

                  propMap.put(key, descriptor);
                }
              }
            }
        } catch (IntrospectionException ex){
            throw new JDOFatalUserException("Error while introspecting class "+clazz.getName(), ex);
        }
   
        //iterate over configured properties
        Collection descriptorsColl = new Vector();
        Iterator fieldsIter = jdoClass.getFields().iterator();
        while (fieldsIter.hasNext()){
            JDOField jdoField = (JDOField)fieldsIter.next();
            String name = jdoField.getName();
            //find getter abd setter
            PropertyDescriptor descriptor = (PropertyDescriptor)propMap.get(name);
            if(descriptor == null){
                throw new JDOFatalUserException(I18N.msg("E_unknown_property", name, clazz.getName()));
            }
            FieldDescriptor fd = new FieldDescriptor(descriptor);
            descriptorsColl.add(fd);
        }
        return descriptorsColl;
View Full Code Here

      }
        if (parameters != null && size == 0 && parameters.length()>0)
            throw new JDOUserException(
                    "Parameters in not null, and you try to execute without parameters");
        if (pm.isPOMClosed())
            throw new JDOFatalUserException(
                    "Impossible to use the query: the persistent manager is closed.");
        if (parameterValues != null && parameters != null) {
        if (parameterValues instanceof Map) {
              treatSpeedoHints((Map) parameterValues);
        } else if (parameterValues.getClass().isArray()) {
View Full Code Here

     */
    private void assertIsOpen()
    {
        if (isClosed())
        {
            throw new JDOFatalUserException(LOCALISER.msg("011000"));
        }
    }
View Full Code Here

    }

    try {
      createTemplate().execute(new JdoCallback() {
        public Object doInJdo(PersistenceManager pm) {
          throw new JDOFatalUserException();
        }
      });
      fail("Should have thrown JdoUsageException");
    }
    catch (JdoUsageException ex) {
View Full Code Here

      try {
        pmf.close();
      } finally {
        // this exception is more important than any exception that might be
        // raised by close()
        throw new JDOFatalUserException(String.format(DUPLICATE_PMF_ERROR_FORMAT, pmf.getName()));
      }
    }
    return pmf;
  }
View Full Code Here

                    InputStream config = cl.getResourceAsStream(PROPERIES_FILE);
                    logManager.readConfiguration(config);
                    return null;
                }
                catch (IOException ex) {
                    throw new JDOFatalUserException(
                        "A IOException was thrown when trying to read the " +
                        "logging configuration file " + PROPERIES_FILE + ".",
                        ex);
                }
                catch (SecurityException ex) {
                    throw new JDOFatalUserException(
                        "A SecurityException was thrown when trying to read " +
                        "the logging configuration file " + PROPERIES_FILE +
                        ". In order to configure JDK 1.4 logging, you must " +
                        "grant java.util.logging.LoggingPermission(control) " +
                        "to the codeBase containing the JDO TCK.", ex);
View Full Code Here

                    InputStream config = cl.getResourceAsStream(PROPERIES_FILE);
                    logManager.readConfiguration(config);
                    return null;
                }
                catch (IOException ex) {
                    throw new JDOFatalUserException(
                        "A IOException was thrown when trying to read the " +
                        "logging configuration file " + PROPERIES_FILE + ".",
                        ex);
                }
                catch (SecurityException ex) {
                    throw new JDOFatalUserException(
                        "A SecurityException was thrown when trying to read " +
                        "the logging configuration file " + PROPERIES_FILE +
                        ". In order to configure JDK 1.4 logging, you must " +
                        "grant java.util.logging.LoggingPermission(control) " +
                        "to the codeBase containing the JDO TCK.", ex);
View Full Code Here

     * @return the <code>Meta</code> for the <code>Class</code>.
     */   
    private static Meta getMeta (Class pcClass) {
        Meta ret = (Meta) registeredClasses.get (pcClass);
        if (ret == null) {
            throw new JDOFatalUserException(
                msg.msg ("ERR_NoMetadata", pcClass.getName())); //NOI18N
        }
        return ret;
    }
View Full Code Here

TOP

Related Classes of javax.jdo.JDOFatalUserException

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.