/** * Provide a warning message to the user about inability to read a DDL file. */ private void fileIOError(String regName, Throwable ex) { logI18NWarnMessage("Java2DBProcessorHelper.ioexception", regName, null, ex); }
/** * * Formats message by adding an Object as an argument */ final public static String getMessage(ResourceBundle messages, String messageKey, Object arg) { Object []args = {arg}; return getMessage(messages, messageKey, args); } /**
/** * Get the localized message for the error code. * @param errorCode * @return i18ned message */ public String getI18NMessage(String errorCode) { return getI18NMessage(errorCode, null, null, null); }
/** * Drop files on undeploy */ public void clean() { helper = new Java2DBProcessorHelper(ctx); helper.init(); helper.createOrDropTablesInDB(false, "CMP"); // NOI18N }
/** * This method is called after the jdbc files have been created. * Iterate over all created jdbc ddl files and * execute it against the database to have the required objects created. */ @Override public void executeCreateDDL() { helper.createOrDropTablesInDB(true, "JPA"); // NOI18N }
/** * Returns the I18N message. */ static protected final String getI18N(String key, Object[] args) { return I18NHelper.getMessage(MESSAGES, key, args); } }
/** * Provide a warning message to the user about inability to connect to the * database. The message is created from the cmpResource's JNDI name and * the exception. * @param connName the JNDI name for obtaining a connection * @param ex Exception which is cause for inability to connect. */ private void cannotConnect(String connName, Throwable ex) { logI18NWarnMessage( "Java2DBProcessorHelper.cannotConnect", connName, null, ex); }
/** * Returns the I18N message. */ static protected final String getI18N(String key, String arg) { return I18NHelper.getMessage(MESSAGES, key, arg); }
/** * Returns the I18N message. */ static protected final String getI18N(String key, String arg1, String arg2) { return I18NHelper.getMessage(MESSAGES, key, arg1, arg2); }
/** * Returns the I18N message. */ static protected final String getI18N(String key, String arg1, String arg2, String arg3) { return I18NHelper.getMessage(MESSAGES, key, arg1, arg2, arg3); }
/** * Formats message by adding two String arguments */ final public static String getMessage(ResourceBundle messages, String messageKey, String arg1, String arg2) { Object []args = {arg1, arg2}; return getMessage(messages, messageKey, args); } /**
/** * Formats message by adding three String arguments */ final public static String getMessage(ResourceBundle messages, String messageKey, String arg1, String arg2, String arg3) { Object []args = {arg1, arg2, arg3}; return getMessage(messages, messageKey, args); } /**
/** * Formats message by adding an int as an argument */ final public static String getMessage(ResourceBundle messages, String messageKey, int arg) { Object []args = {arg}; return getMessage(messages, messageKey, args); } /**
/** * Formats message by adding a String argument */ final public static String getMessage(ResourceBundle messages, String messageKey, String arg) { Object []args = {arg}; return getMessage(messages, messageKey, args); } /**
/** * Returns the I18N message. */ static protected final String getI18N(String key) { return I18NHelper.getMessage(MESSAGES, key); }
/** * Formats message by adding a boolean as an argument */ final public static String getMessage(ResourceBundle messages, String messageKey, boolean arg) { Object []args = {String.valueOf(arg)}; return getMessage(messages, messageKey, args); }
/** * Validates that the primary key instance is not null. * Throws IllegalArgumentException otherwise. * @param pk the primary key instance to validate. * @throws IllegalArgumentException if validation fails. */ protected void assertPrimaryKeyNotNull(Object pk) { if (pk == null) { throw new IllegalArgumentException(I18NHelper.getMessage( messages, "EXC_pknull_exception")); // NOI18N } }
/** * This method is called in the case of an fatal internal error. * @param text error message * @exception EJBQLException describes the fatal internal error. */ public static void fatal(String text) throws EJBQLException { throw new EJBQLException(I18NHelper.getMessage( msgs, "ERR_FatalInternalError", text)); //NOI18N }
/** */ public void reportError(String s) { ErrorMsg.fatal(I18NHelper.getMessage(msgs, "ERR_JDOQLCodeGenerationError") + s); //NOI18N }
/** * Validates that the object id instance is not null. * Throws JDOFatalInternalException otherwise. * @param oid the object id instance to validate. * @throws JDOFatalInternalException if validation fails. */ protected void assertObjectIdNotNull(Object oid) { if (oid == null) { throw new JDOFatalInternalException(I18NHelper.getMessage( messages, "EXC_oidnull_exception")); // NOI18N } }