/** * Convenience method to return a user exception appropriate for this API. * @param msg The message * @param e The cause * @return The JDO exception */ public RuntimeException getUserExceptionForException(String msg, Exception e) { return new JDOUserException(msg, e); }
/** * Set whether this datastore schema is read-only. * @param flag the read-only setting. */ public synchronized void setReadOnlySchema(boolean flag) { throw new JDOUserException("org.jpox.readOnlySchema is deprecated, replaced by org.jpox.readOnlyDatastore"); }
/** * Method to return the statement text. * @param mode (0=PROJECTION;1=FILTER) * @return The statement * @throws JDOUserException since this object is inaccessible directly. **/ public StatementText toStatementText(int mode) { throw new JDOUserException("Cannot reference collection object directly: field name = " + fieldName); } }
/** * Method to return the statement text. * @param mode (0=PROJECTION;1=FILTER) * @return The statement * @throws JDOUserException since this object is inaccessible directly. **/ public StatementText toStatementText(int mode) { throw new JDOUserException("Cannot reference Map object directly: field name = " + fieldName); } }
/** * Retrieve the metadata for the results * @return the ResultSetMetaData */ public JDOQLResultSetMetaData getResultSetMetaData() { if( resultMetaData == null ) { throw new JDOUserException("You must compile the query before calling this method."); } return resultMetaData; }
/** * Set whether this datastore schema is fixed * @param flag the fixed setting. */ public synchronized void setFixedSchema(boolean flag) { throw new JDOUserException("org.jpox.fixedSchema is deprecated, replaced by org.jpox.fixedDatastore"); }
/** * Throws a JDOUserException if this factories properties are frozen. * Should be called from every set-method. */ protected void checkFrozen() { if (isFrozen) { //TODO is this the correct exception? throw new JDOUserException("This factory can't be modified."); } }
private void checkOpen() { if (isClosed) { throw new JDOUserException("The Factory is already closed."); } }
private Class<?> locateClass(String className) { try { return Class.forName(className); } catch (ClassNotFoundException e) { throw new JDOUserException("Class not found: " + className, e); } }
/** * Method to set whether to use subclasses. This is not used with JPOXSQL. * @param subclasses Whether to use subclasses */ public void setSubclasses(boolean subclasses) { throw new JDOUserException(LOCALISER_RDBMS.msg("SQL.CandidateExtentsInapplicableError")); }
/** * Declare the unbound variables to be used in the query. * <p>This implementation always throws a JDOUserException since this * concept doesn't apply to SQL queries. * @param variables the variables separated by semicolons. * @exception JDOUserException Always thrown. * @see javax.jdo.Query#declareVariables */ public void declareVariables(String variables) { throw new JDOUserException(LOCALISER_RDBMS.msg("SQL.VariablesInapplicableError")); }
/** * Set the ordering specification for the result Collection. * <p>This implementation always throws a JDOUserException since this * concept doesn't apply to SQL queries. * @param ordering the ordering specification. * @exception JDOUserException Always thrown. * @see javax.jdo.Query#setOrdering */ public void setOrdering(String ordering) { throw new JDOUserException(LOCALISER_RDBMS.msg("SQL.OrderingNotExplicitError")); }
/** * Mutator to rollback the savepoint. * @param pt The savepoint * @throws SQLException Thrown if an error occurs */ public void rollback(Savepoint pt) throws SQLException { throw new JDOUserException(LOCALISER.msg("Connection.InvalidCall", "rollback")); }
/** * Throw a JDOUserException that the connection is no longer available. */ protected void throwExceptionNotAvailable() { throw new JDOUserException(Localiser.msg("046001")); }
/** * Convenience method that throws a JDOUserException that the specified method name is not supported. * @param methodName Name of the method */ protected void throwExceptionUnsupportedOperation(String methodName) { throw new JDOUserException(Localiser.msg("046000", methodName)); } }
/** * Method to throw an exception if the fetch group is currently unmodifiable. * @throw JDOUserException Thrown if the FetchGroup is unmodifiable */ private void assertUnmodifiable() { if (fg.isUnmodifiable()) { throw new JDOUserException("FetchGroup is unmodifiable!"); } }
public Object construct(String s) { try { return getLocale(s); } catch (Exception ex) { throw new JDOUserException(msg.msg( "EXC_LocaleStringConstructorException"), ex); //NOI18N } } });
/** * Method to set the holdability for the connection. * @param holdability The holdability * @throws SQLException thrown if an error occurs. */ public void setHoldability(int holdability) throws SQLException { throw new JDOUserException(LOCALISER.msg("Connection.InvalidCall", "setHoldability")); }
/** * Method to set the autocommit for the connection. * @param autoCommit Whether to autocommit * @throws SQLException thrown if an error occurs. */ public void setAutoCommit(boolean autoCommit) throws SQLException { throw new JDOUserException(LOCALISER.msg("Connection.InvalidCall", "setAutoCommit")); }
/** * Method to set the read-only nature for the connection. * @param readOnly whether it is read-only * @throws SQLException thrown if an error occurs. */ public void setReadOnly(boolean readOnly) throws SQLException { throw new JDOUserException(LOCALISER.msg("Connection.InvalidCall", "setReadOnly")); }