/** * Method to assert if this Query is open. * @throws JDOFatalUserException if the Query is closed. */ protected void assertIsOpen() { if (closed) { throw new JDOFatalUserException(Localiser.msg("011100")); } } }
private void checkOpenIgnoreTx() { if (isClosed()) { throw new JDOFatalUserException("PersistenceManager is closed."); } }
/** Look up the metadata for a <code>PersistenceCapable</code> class. * @param pcClass the <code>Class</code>. * @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; }
public Object run() { try { myPC.jdoReplaceStateManager(thisSM); return null; } catch (SecurityException e) { throw new JDOFatalUserException("EXC_CannotSetStateManager", e); } } });
/** Look up the metadata for a <code>PersistenceCapable</code> class. * @param pcClass the <code>Class</code>. * @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; }
/** * 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 JDOFatalUserException(LOCALISER.msg("RDBMS.CorrespondentColumnsMapping.ColumnMappedTwice", identifier, columnsName)); } } }
/** * Access a field in an array * @param subfieldName the field to be accessed in this object * @param innerJoin whether to inner join * @return The field expression representing the required field of this object */ public ScalarExpression accessField(String subfieldName, boolean innerJoin) { if( !subfieldName.endsWith("length") ) { throw new JDOFatalUserException("The field "+subfieldName+" is not accessible in an array"); } return sizeMethod(); }
public Object run() { try { return JDOImplHelper.getInstance(); } catch (SecurityException e) { throw new JDOFatalUserException(LOCALISER.msg("026000"), e); } } });
/** * Method to assert if this Persistence Manager is open. * @throws JDOFatalUserException if the PM is closed. */ protected void assertIsOpen() { if (isClosed()) { throw new JDOFatalUserException(Localiser.msg("011000")); } }
/** * Method to assert if this Persistence Manager is open. Throws a * JDOFatalUserException if it has been closed. */ private void assertIsOpen() { if (isClosed()) { throw new JDOFatalUserException(LOCALISER.msg("PM.IsClosed")); } }
/** * Method to assert if this Query is open. * @throws JDOFatalUserException if the Query is closed. */ protected void assertIsOpen() { if (isClosed()) { throw new JDOFatalUserException(Localiser.msg("011100")); } } }
/** * Method to assert if this Persistence Manager is open. Throws a * JDOFatalUserException if it has been closed. */ private void assertIsOpen() { if (isClosed()) { throw new JDOFatalUserException(LOCALISER.msg("PM.IsClosed")); } }
public Object run() { try { return JDOImplHelper.getInstance(); } catch (SecurityException e) { throw new JDOFatalUserException(LOCALISER.msg("StateManager.SecurityProblem"), e); } } });
public Object run() { try { return JDOImplHelper.getInstance(); } catch (SecurityException e) { throw new JDOFatalUserException(LOCALISER.msg("026000"), e); } } });
/** * Utility to update our object to use a different state manager. * @param sm The new state manager. **/ private void replaceStateManager(StateManager sm) { try { myPC.jdoReplaceStateManager(sm); } catch (SecurityException e) { throw new JDOFatalUserException(LOCALISER.msg("StateManager.SecurityProblem"), e); } }
/** * Constructor for the PMF. */ public AbstractPersistenceManagerFactory() { super(); pmfContext = new PMFContext(this); if (!ClassUtils.hasJDO2JarInClasspath()) { throw new JDOFatalUserException(LOCALISER.msg("PMF.JDO2Inaccessible")); } }
public ScalarExpression cubeMethod(ScalarExpression[] expr) { if (((RDBMSAdapter)qs.getStoreManager().getDatastoreAdapter()).supportsAnalysisMethods()) { return new AnalysisExpression(expr[0].getMapping(), "CUBE", Arrays.asList(expr)); } else { throw new JDOFatalUserException("Analysis methods are not supported by this datastore"); } } }
public ScalarExpression rollupMethod(ScalarExpression[] expr) { if (((RDBMSAdapter)qs.getStoreManager().getDatastoreAdapter()).supportsAnalysisMethods()) { return new AnalysisExpression(expr[0].getMapping(), "ROLLUP", Arrays.asList(expr)); } else { throw new JDOFatalUserException("Analysis methods are not supported by this datastore"); } }
/** * Accessor for a literal representing this type. * @param qs The Query * @param value the value of this object in the literal * @return The literal */ public ScalarExpression newLiteral(QueryExpression qs, Object value) { if (containerIsStoredInSingleColumn()) { throw new JDOFatalUserException(LOCALISER.msg("ContainerMapping.QueryInvalidIfSerialised", fmd.getFullFieldName())); } return new MapLiteral(qs, this, (java.util.Map)value); }
/** * Method to return a scalar expression for the Map. * @param qs The QueryStatement * @param te The TableExpression * @return The ScalarExpression **/ public ScalarExpression newScalarExpression(QueryExpression qs, LogicSetExpression te) { if (containerIsStoredInSingleColumn()) { throw new JDOFatalUserException(LOCALISER.msg("ContainerMapping.QueryInvalidIfSerialised", fmd.getFullFieldName())); } return new MapExpression(qs, datastoreContainer.getIDMapping(), te, getBackingStore(qs.getClassLoaderResolver()), fieldName); } }