/** * Method to associate a sideB identifier with a sideA ColumnMetaData * @param identifier side B identifier * @param colmd side A ColumnMetaData */ private void putColumn(DatastoreIdentifier identifier, ColumnMetaData colmd) { if (columnMetaDataBySideBIdentifier.put(identifier, colmd) != null) { throw new NucleusUserException(Localiser.msg("020006", identifier, columnsName)).setFatal(); } } }
/** * Utility to update the passed object with the passed StateManager (can be null). * @param pc The object to update * @param sm The new state manager */ protected static void replaceStateManagerForPersistable(final Persistable pc, final StateManager sm) { try { // Calls to pc.dnReplaceStateManager must be run privileged AccessController.doPrivileged(new PrivilegedAction() { public Object run() { pc.dnReplaceStateManager(sm); return null; } }); } catch (SecurityException e) { throw new NucleusUserException(Localiser.msg("026000"), e).setFatal(); } } }
throw new NucleusUserException(Localiser.msg("047006", driverName), e).setFatal();
throw new NucleusUserException(Localiser.msg("047006", driverName), e).setFatal();
if (action.equals("EXCEPTION")) throw new NucleusUserException(Localiser.msg("055007", value, column.getIdentifier().toString(), "" + colLength.intValue())).setFatal();
value, column.getIdentifier().toString(), "" + colLength.intValue())).setFatal();
throw new NucleusUserException(Localiser.msg("039004", idFactoryName), cnfe).setFatal();
throw new NucleusUserException(msg, sqle).setFatal();
throw new NucleusUserException(Localiser.msg("041042", fieldName)).setFatal();
columnsName, "" + noOfUserColumns, "" + mappingSideB.getNumberOfDatastoreMappings())).setFatal(); throw new NucleusUserException(Localiser.msg("020004", tableA, colmds[i].getName(), targetColumnName, mappingSideB.getTable(), mappingSideB)).setFatal(); throw new NucleusUserException(Localiser.msg("020005", columnsName, "" + i)).setFatal();
/** * Constructor. * @param clr ClassLoader resolver * @param ctx Context * @param props Properties for this store manager */ public XMLStoreManager(ClassLoaderResolver clr, PersistenceNucleusContext ctx, Map<String, Object> props) { super("xml", clr, ctx, props); ClassUtils.assertClassForJarExistsInClasspath(clr, "javax.xml.bind.JAXBContext", "jaxb-api.jar"); String jaxbHandlerClassName = getStringProperty(JAXB_HANDLER_CLASS_PROPERTY); try { Class cls = clr.classForName(jaxbHandlerClassName); jaxbHandler = (JAXBHandler) ClassUtils.newInstance(cls, new Class[] {MetaDataManager.class}, new Object[]{ctx.getMetaDataManager()}); } catch (ClassNotResolvedException cnre) { NucleusLogger.DATASTORE.error("Could not find jaxb handler class " + jaxbHandlerClassName, cnre); throw new NucleusUserException("The specified JAXB Handler class \"" + jaxbHandlerClassName + "\" was not found!").setFatal(); } // Handler for metadata metadataListener = new XMLMetaDataListener(); ctx.getMetaDataManager().registerListener(metadataListener); // Handler for persistence process persistenceHandler = new XMLPersistenceHandler(this); logConfiguration(); }
throw new NucleusUserException(msg, e1).setFatal();
cmd.getInheritanceMetaData().getStrategy() != InheritanceStrategy.COMPLETE_TABLE) throw new NucleusUserException(Localiser.msg("057003", cmd.getFullClassName(), cmd.getInheritanceMetaData().getStrategy().toString())).setFatal();
if (colmd == null) throw new NucleusUserException(Localiser.msg("041038", refDatastoreMapping.getColumn().getIdentifier(), toString())).setFatal();
throw new NucleusUserException(Localiser.msg("041014", userMappingClassName)).setFatal();
throw new NucleusUserException(Localiser.msg("041014", userMappingClassName)).setFatal();