Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Roldan Betancort2009-05-20 18:12:47 +0000
committerVictor Roldan Betancort2009-05-20 18:12:47 +0000
commite87578beb3393762ec4175a6ec8eb1a1aab9ee17 (patch)
tree4f55f0df32833b47483bd835b8e82958418a884b /plugins/org.eclipse.net4j.db
parent0a979565f2cce67cf15709444f0a93e189a5194b (diff)
downloadcdo-e87578beb3393762ec4175a6ec8eb1a1aab9ee17.tar.gz
cdo-e87578beb3393762ec4175a6ec8eb1a1aab9ee17.tar.xz
cdo-e87578beb3393762ec4175a6ec8eb1a1aab9ee17.zip
[272193] [UI] Externalize Strings (Net4j)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=272193
Diffstat (limited to 'plugins/org.eclipse.net4j.db')
-rw-r--r--plugins/org.eclipse.net4j.db/plugin.properties2
-rw-r--r--plugins/org.eclipse.net4j.db/plugin.xml2
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java16
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java40
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/bundle/OM.java8
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBField.java12
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java2
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBTable.java12
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/dml/DBStatement.java2
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java112
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBSchema.java8
11 files changed, 109 insertions, 107 deletions
diff --git a/plugins/org.eclipse.net4j.db/plugin.properties b/plugins/org.eclipse.net4j.db/plugin.properties
index 664fb2f6f9..05bb739ee9 100644
--- a/plugins/org.eclipse.net4j.db/plugin.properties
+++ b/plugins/org.eclipse.net4j.db/plugin.properties
@@ -23,3 +23,5 @@ providerName = Eclipse Modeling Project
# %%% END OF TRANSLATED PROPERTIES %%%
# The above properties have been shipped for translation.
# ==============================================================================
+
+extension-point.name = Net4j DB Adapters \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.db/plugin.xml b/plugins/org.eclipse.net4j.db/plugin.xml
index d115eb3fd6..389fca03fc 100644
--- a/plugins/org.eclipse.net4j.db/plugin.xml
+++ b/plugins/org.eclipse.net4j.db/plugin.xml
@@ -13,6 +13,6 @@
<plugin>
- <extension-point id="dbAdapters" name="Net4j DB Adapters" schema="schema/dbAdapters.exsd"/>
+ <extension-point id="dbAdapters" name="%extension-point.name" schema="schema/dbAdapters.exsd"/>
</plugin>
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java
index d82f4a3007..9d37e16a4c 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBType.java
@@ -30,7 +30,7 @@ public enum DBType
DECIMAL(3), //
CHAR(1), //
VARCHAR(12), //
- LONGVARCHAR(-1, "LONG VARCHAR"), //
+ LONGVARCHAR(-1, "LONG VARCHAR"), // //$NON-NLS-1$
DATE(91)
{
@Override
@@ -57,13 +57,13 @@ public enum DBType
if (value instanceof Date)
{
Date date = (Date)value;
- builder.append("'");
+ builder.append("'"); //$NON-NLS-1$
builder.append(new java.sql.Timestamp(date.getTime()));
- builder.append("'");
+ builder.append("'"); //$NON-NLS-1$
}
else
{
- throw new IllegalArgumentException("Not a java.util.Date: " + value);
+ throw new IllegalArgumentException("Not a java.util.Date: " + value); //$NON-NLS-1$
}
}
}, //
@@ -86,7 +86,7 @@ public enum DBType
}
}, //
- LONGVARBINARY(-4, "LONG VARBINARY")
+ LONGVARBINARY(-4, "LONG VARBINARY") //$NON-NLS-1$
{
@Override
public void appendValue(StringBuilder builder, Object value)
@@ -148,15 +148,15 @@ public enum DBType
{
if (value == null)
{
- builder.append("NULL");
+ builder.append("NULL"); //$NON-NLS-1$
}
else
{
if (value instanceof String || value instanceof Character)
{
- builder.append("'");
+ builder.append("'"); //$NON-NLS-1$
builder.append(value);
- builder.append("'");
+ builder.append("'"); //$NON-NLS-1$
}
else
{
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
index 7fe635e44d..f533da1587 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
@@ -56,7 +56,7 @@ public final class DBUtil
public static DataSource createDataSource(Map<Object, Object> properties, String namespace)
{
- return createDataSource(properties, namespace, "class");
+ return createDataSource(properties, namespace, "class"); //$NON-NLS-1$
}
public static DataSource createDataSource(Map<Object, Object> properties, String namespace, String driverClassKey)
@@ -159,7 +159,7 @@ public final class DBUtil
{
List<String> names = new ArrayList<String>();
DatabaseMetaData metaData = connection.getMetaData();
- tables = metaData.getTables(dbName, null, null, new String[] { "TABLE" });
+ tables = metaData.getTables(dbName, null, null, new String[] { "TABLE" }); //$NON-NLS-1$
while (tables.next())
{
String name = tables.getString(3);
@@ -187,7 +187,7 @@ public final class DBUtil
statement = connection.createStatement();
for (String tableName : DBUtil.getAllTableNames(connection, dbName))
{
- String sql = "DROP TABLE " + tableName;
+ String sql = "DROP TABLE " + tableName; //$NON-NLS-1$
DBUtil.trace(sql);
statement.execute(sql);
}
@@ -214,7 +214,7 @@ public final class DBUtil
return 0;
}
- throw new DBException("Not an integer number: " + number);
+ throw new DBException("Not an integer number: " + number); //$NON-NLS-1$
}
public static long selectMaximumLong(Connection connection, IDBField field) throws DBException
@@ -229,15 +229,15 @@ public final class DBUtil
return 0L;
}
- throw new DBException("Not a long number: " + number);
+ throw new DBException("Not a long number: " + number); //$NON-NLS-1$
}
private static Number getMaximumNumber(Connection connection, IDBField field) throws DBException
{
StringBuilder builder = new StringBuilder();
- builder.append("SELECT MAX(");
+ builder.append("SELECT MAX("); //$NON-NLS-1$
builder.append(field);
- builder.append(") FROM ");
+ builder.append(") FROM "); //$NON-NLS-1$
builder.append(field.getTable());
String sql = builder.toString();
@@ -304,32 +304,32 @@ public final class DBUtil
IDBField[] fields = table.getFields();
if (fields.length != args.length)
{
- throw new IllegalArgumentException("Wrong number of args for " + table + ": " + Arrays.asList(args) + " --> "
+ throw new IllegalArgumentException("Wrong number of args for " + table + ": " + Arrays.asList(args) + " --> " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ Arrays.asList(table.getFields()));
}
StringBuilder builder = new StringBuilder();
- builder.append("INSERT INTO ");
+ builder.append("INSERT INTO "); //$NON-NLS-1$
builder.append(table);
- builder.append(" VALUES (");
+ builder.append(" VALUES ("); //$NON-NLS-1$
for (int i = 0; i < fields.length; i++)
{
if (i > 0)
{
- builder.append(", ");
+ builder.append(", "); //$NON-NLS-1$
}
dbAdapter.appendValue(builder, fields[i], args[i]);
}
- builder.append(")");
+ builder.append(")"); //$NON-NLS-1$
String sql = builder.toString();
int count = update(connection, sql);
if (count == 0)
{
- throw new DBException("No row inserted into table " + table);
+ throw new DBException("No row inserted into table " + table); //$NON-NLS-1$
}
}
@@ -341,27 +341,27 @@ public final class DBUtil
{
if (fields[i].getTable() != table)
{
- throw new IllegalArgumentException("Multiple tables not allowed: " + Arrays.asList(fields));
+ throw new IllegalArgumentException("Multiple tables not allowed: " + Arrays.asList(fields)); //$NON-NLS-1$
}
}
StringBuilder builder = new StringBuilder();
- builder.append("SELECT ");
+ builder.append("SELECT "); //$NON-NLS-1$
for (int i = 0; i < fields.length; i++)
{
if (i > 0)
{
- builder.append(", ");
+ builder.append(", "); //$NON-NLS-1$
}
builder.append(fields[i]);
}
- builder.append(" FROM ");
+ builder.append(" FROM "); //$NON-NLS-1$
builder.append(table);
if (where != null)
{
- builder.append(" WHERE ");
+ builder.append(" WHERE "); //$NON-NLS-1$
builder.append(where);
}
@@ -391,7 +391,7 @@ public final class DBUtil
long length = blob.length();
if (length > Integer.MAX_VALUE)
{
- throw new IllegalStateException("byte[] too long: " + length);
+ throw new IllegalStateException("byte[] too long: " + length); //$NON-NLS-1$
}
values[i] = blob.getBytes(1, (int)length);
@@ -402,7 +402,7 @@ public final class DBUtil
long length = clob.length();
if (length > Integer.MAX_VALUE)
{
- throw new IllegalStateException("String too long: " + length);
+ throw new IllegalStateException("String too long: " + length); //$NON-NLS-1$
}
values[i] = clob.getSubString(1, (int)length);
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/bundle/OM.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/bundle/OM.java
index de4b60dbd7..8fe64610fe 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/bundle/OM.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/bundle/OM.java
@@ -41,7 +41,7 @@ public abstract class OM
public static final OMLogger LOG = BUNDLE.logger();
- public static final String EXT_POINT = "dbAdapters";
+ public static final String EXT_POINT = "dbAdapters"; //$NON-NLS-1$
/**
* @author Eike Stepper
@@ -65,16 +65,16 @@ public abstract class OM
IConfigurationElement[] elements = registry.getConfigurationElementsFor(BUNDLE_ID, EXT_POINT);
for (final IConfigurationElement element : elements)
{
- if ("dbAdapter".equals(element.getName()))
+ if ("dbAdapter".equals(element.getName())) //$NON-NLS-1$
{
- DBAdapterDescriptor descriptor = new DBAdapterDescriptor(element.getAttribute("name"))
+ DBAdapterDescriptor descriptor = new DBAdapterDescriptor(element.getAttribute("name")) //$NON-NLS-1$
{
@Override
public IDBAdapter createDBAdapter()
{
try
{
- return (IDBAdapter)element.createExecutableExtension("class");
+ return (IDBAdapter)element.createExecutableExtension("class"); //$NON-NLS-1$
}
catch (CoreException ex)
{
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBField.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBField.java
index d58105bc2f..51b7debdc3 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBField.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBField.java
@@ -142,7 +142,7 @@ public class DBField extends DBSchemaElement implements IDBField
public String getFullName()
{
- return table.getName() + "." + name;
+ return table.getName() + "." + name; //$NON-NLS-1$
}
public String formatPrecision()
@@ -150,27 +150,27 @@ public class DBField extends DBSchemaElement implements IDBField
int precision = getPrecision();
if (precision > 0)
{
- return "(" + precision + ")";
+ return "(" + precision + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
- return "";
+ return ""; //$NON-NLS-1$
}
public String formatPrecisionAndScale()
{
if (scale == DEFAULT)
{
- return "(" + getPrecision() + ")";
+ return "(" + getPrecision() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
- return "(" + getPrecision() + ", " + scale + ")";
+ return "(" + getPrecision() + ", " + scale + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
public void appendValue(StringBuilder builder, Object value)
{
if (value == null)
{
- builder.append("NULL");
+ builder.append("NULL"); //$NON-NLS-1$
}
else
{
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java
index baa5f32cfb..7d85b005b8 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBIndex.java
@@ -73,7 +73,7 @@ public class DBIndex extends DBSchemaElement implements IDBIndex
public String getName()
{
- return "idx_" + table.getName() + "_" + position;
+ return "idx_" + table.getName() + "_" + position; //$NON-NLS-1$ //$NON-NLS-2$
}
public String getFullName()
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBTable.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBTable.java
index d35471d622..66d06d67dd 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBTable.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/ddl/DBTable.java
@@ -81,7 +81,7 @@ public class DBTable extends DBSchemaElement implements IDBTable
schema.assertUnlocked();
if (getField(name) != null)
{
- throw new DBException("DBField exists: " + name);
+ throw new DBException("DBField exists: " + name); //$NON-NLS-1$
}
DBField field = new DBField(this, name, type, precision, scale, notNull, fields.size());
@@ -156,21 +156,21 @@ public class DBTable extends DBSchemaElement implements IDBTable
public String sqlInsert()
{
StringBuilder builder = new StringBuilder();
- builder.append("INSERT INTO ");
+ builder.append("INSERT INTO "); //$NON-NLS-1$
builder.append(getName());
- builder.append(" VALUES (");
+ builder.append(" VALUES ("); //$NON-NLS-1$
for (int i = 0; i < fields.size(); i++)
{
if (i > 0)
{
- builder.append(", ");
+ builder.append(", "); //$NON-NLS-1$
}
- builder.append("?");
+ builder.append("?"); //$NON-NLS-1$
}
- builder.append(")");
+ builder.append(")"); //$NON-NLS-1$
return builder.toString();
}
}
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/dml/DBStatement.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/dml/DBStatement.java
index 2ab0f130b0..057fc59a6f 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/dml/DBStatement.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/dml/DBStatement.java
@@ -93,7 +93,7 @@ public class DBStatement implements IDBStatement
{
if (element instanceof IDBParameter)
{
- builder.append("?");
+ builder.append("?"); //$NON-NLS-1$
}
else
{
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
index 5a46b34f03..a18d0f5819 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBAdapter.java
@@ -40,39 +40,39 @@ public abstract class DBAdapter implements IDBAdapter
{
private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_SQL, DBAdapter.class);
- private static final String[] SQL92_RESERVED_WORDS = { "ABSOLUTE", "ACTION", "ADD", "AFTER", "ALL", "ALLOCATE",
- "ALTER", "AND", "ANY", "ARE", "ARRAY", "AS", "ASC", "ASENSITIVE", "ASSERTION", "ASYMMETRIC", "AT", "ATOMIC",
- "AUTHORIZATION", "AVG", "BEFORE", "BEGIN", "BETWEEN", "BIGINT", "BINARY", "BIT", "BIT_LENGTH", "BLOB", "BOOLEAN",
- "BOTH", "BREADTH", "BY", "CALL", "CALLED", "CASCADE", "CASCADED", "CASE", "CAST", "CATALOG", "CHAR", "CHARACTER",
- "CHARACTER_LENGTH", "CHAR_LENGTH", "CHECK", "CLOB", "CLOSE", "COALESCE", "COLLATE", "COLLATION", "COLUMN",
- "COMMIT", "CONDITION", "CONNECT", "CONNECTION", "CONSTRAINT", "CONSTRAINTS", "CONSTRUCTOR", "CONTAINS",
- "CONTINUE", "CONVERT", "CORRESPONDING", "COUNT", "CREATE", "CROSS", "CUBE", "CURRENT", "CURRENT_DATE",
- "CURRENT_DEFAULT_TRANSFORM_GROUP", "CURRENT_PATH", "CURRENT_ROLE", "CURRENT_TIME", "CURRENT_TIMESTAMP",
- "CURRENT_TRANSFORM_GROUP_FOR_TYPE", "CURRENT_USER", "CURSOR", "CYCLE", "DATA", "DATE", "DAY", "DEALLOCATE",
- "DEC", "DECIMAL", "DECLARE", "DEFAULT", "DEFERRABLE", "DEFERRED", "DELETE", "DEPTH", "DEREF", "DESC", "DESCRIBE",
- "DESCRIPTOR", "DETERMINISTIC", "DIAGNOSTICS", "DISCONNECT", "DISTINCT", "DO", "DOMAIN", "DOUBLE", "DROP",
- "DYNAMIC", "EACH", "ELEMENT", "ELSE", "ELSEIF", "END", "EQUALS", "ESCAPE", "EXCEPT", "EXCEPTION", "EXEC",
- "EXECUTE", "EXISTS", "EXIT", "EXTERNAL", "EXTRACT", "FALSE", "FETCH", "FILTER", "FIRST", "FLOAT", "FOR",
- "FOREIGN", "FOUND", "FREE", "FROM", "FULL", "FUNCTION", "GENERAL", "GET", "GLOBAL", "GO", "GOTO", "GRANT",
- "GROUP", "GROUPING", "HANDLER", "HAVING", "HOLD", "HOUR", "IDENTITY", "IF", "IMMEDIATE", "IN", "INDICATOR",
- "INITIALLY", "INNER", "INOUT", "INPUT", "INSENSITIVE", "INSERT", "INT", "INTEGER", "INTERSECT", "INTERVAL",
- "INTO", "IS", "ISOLATION", "ITERATE", "JOIN", "KEY", "LANGUAGE", "LARGE", "LAST", "LATERAL", "LEADING", "LEAVE",
- "LEFT", "LEVEL", "LIKE", "LOCAL", "LOCALTIME", "LOCALTIMESTAMP", "LOCATOR", "LOOP", "LOWER", "MAP", "MATCH",
- "MAX", "MEMBER", "MERGE", "METHOD", "MIN", "MINUTE", "MODIFIES", "MODULE", "MONTH", "MULTISET", "NAMES",
- "NATIONAL", "NATURAL", "NCHAR", "NCLOB", "NEW", "NEXT", "NO", "NONE", "NOT", "NULL", "NULLIF", "NUMERIC",
- "OBJECT", "OCTET_LENGTH", "OF", "OLD", "ON", "ONLY", "OPEN", "OPTION", "OR", "ORDER", "ORDINALITY", "OUT",
- "OUTER", "OUTPUT", "OVER", "OVERLAPS", "PAD", "PARAMETER", "PARTIAL", "PARTITION", "PATH", "POSITION",
- "PRECISION", "PREPARE", "PRESERVE", "PRIMARY", "PRIOR", "PRIVILEGES", "PROCEDURE", "PUBLIC", "RANGE", "READ",
- "READS", "REAL", "RECURSIVE", "REF", "REFERENCES", "REFERENCING", "RELATIVE", "RELEASE", "REPEAT", "RESIGNAL",
- "RESTRICT", "RESULT", "RETURN", "RETURNS", "REVOKE", "RIGHT", "ROLE", "ROLLBACK", "ROLLUP", "ROUTINE", "ROW",
- "ROWS", "SAVEPOINT", "SCHEMA", "SCOPE", "SCROLL", "SEARCH", "SECOND", "SECTION", "SELECT", "SENSITIVE",
- "SESSION", "SESSION_USER", "SET", "SETS", "SIGNAL", "SIMILAR", "SIZE", "SMALLINT", "SOME", "SPACE", "SPECIFIC",
- "SPECIFICTYPE", "SQL", "SQLCODE", "SQLERROR", "SQLEXCEPTION", "SQLSTATE", "SQLWARNING", "START", "STATE",
- "STATIC", "SUBMULTISET", "SUBSTRING", "SUM", "SYMMETRIC", "SYSTEM", "SYSTEM_USER", "TABLE", "TABLESAMPLE",
- "TEMPORARY", "THEN", "TIME", "TIMESTAMP", "TIMEZONE_HOUR", "TIMEZONE_MINUTE", "TO", "TRAILING", "TRANSACTION",
- "TRANSLATE", "TRANSLATION", "TREAT", "TRIGGER", "TRIM", "TRUE", "UNDER", "UNDO", "UNION", "UNIQUE", "UNKNOWN",
- "UNNEST", "UNTIL", "UPDATE", "UPPER", "USAGE", "USER", "USING", "VALUE", "VALUES", "VARCHAR", "VARYING", "VIEW",
- "WHEN", "WHENEVER", "WHERE", "WHILE", "WINDOW", "WITH", "WITHIN", "WITHOUT", "WORK", "WRITE", "YEAR", "ZONE" };
+ private static final String[] SQL92_RESERVED_WORDS = { "ABSOLUTE", "ACTION", "ADD", "AFTER", "ALL", "ALLOCATE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ "ALTER", "AND", "ANY", "ARE", "ARRAY", "AS", "ASC", "ASENSITIVE", "ASSERTION", "ASYMMETRIC", "AT", "ATOMIC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "AUTHORIZATION", "AVG", "BEFORE", "BEGIN", "BETWEEN", "BIGINT", "BINARY", "BIT", "BIT_LENGTH", "BLOB", "BOOLEAN", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "BOTH", "BREADTH", "BY", "CALL", "CALLED", "CASCADE", "CASCADED", "CASE", "CAST", "CATALOG", "CHAR", "CHARACTER", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "CHARACTER_LENGTH", "CHAR_LENGTH", "CHECK", "CLOB", "CLOSE", "COALESCE", "COLLATE", "COLLATION", "COLUMN", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "COMMIT", "CONDITION", "CONNECT", "CONNECTION", "CONSTRAINT", "CONSTRAINTS", "CONSTRUCTOR", "CONTAINS", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "CONTINUE", "CONVERT", "CORRESPONDING", "COUNT", "CREATE", "CROSS", "CUBE", "CURRENT", "CURRENT_DATE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "CURRENT_DEFAULT_TRANSFORM_GROUP", "CURRENT_PATH", "CURRENT_ROLE", "CURRENT_TIME", "CURRENT_TIMESTAMP", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ "CURRENT_TRANSFORM_GROUP_FOR_TYPE", "CURRENT_USER", "CURSOR", "CYCLE", "DATA", "DATE", "DAY", "DEALLOCATE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "DEC", "DECIMAL", "DECLARE", "DEFAULT", "DEFERRABLE", "DEFERRED", "DELETE", "DEPTH", "DEREF", "DESC", "DESCRIBE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "DESCRIPTOR", "DETERMINISTIC", "DIAGNOSTICS", "DISCONNECT", "DISTINCT", "DO", "DOMAIN", "DOUBLE", "DROP", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "DYNAMIC", "EACH", "ELEMENT", "ELSE", "ELSEIF", "END", "EQUALS", "ESCAPE", "EXCEPT", "EXCEPTION", "EXEC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "EXECUTE", "EXISTS", "EXIT", "EXTERNAL", "EXTRACT", "FALSE", "FETCH", "FILTER", "FIRST", "FLOAT", "FOR", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "FOREIGN", "FOUND", "FREE", "FROM", "FULL", "FUNCTION", "GENERAL", "GET", "GLOBAL", "GO", "GOTO", "GRANT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "GROUP", "GROUPING", "HANDLER", "HAVING", "HOLD", "HOUR", "IDENTITY", "IF", "IMMEDIATE", "IN", "INDICATOR", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "INITIALLY", "INNER", "INOUT", "INPUT", "INSENSITIVE", "INSERT", "INT", "INTEGER", "INTERSECT", "INTERVAL", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "INTO", "IS", "ISOLATION", "ITERATE", "JOIN", "KEY", "LANGUAGE", "LARGE", "LAST", "LATERAL", "LEADING", "LEAVE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "LEFT", "LEVEL", "LIKE", "LOCAL", "LOCALTIME", "LOCALTIMESTAMP", "LOCATOR", "LOOP", "LOWER", "MAP", "MATCH", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "MAX", "MEMBER", "MERGE", "METHOD", "MIN", "MINUTE", "MODIFIES", "MODULE", "MONTH", "MULTISET", "NAMES", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "NATIONAL", "NATURAL", "NCHAR", "NCLOB", "NEW", "NEXT", "NO", "NONE", "NOT", "NULL", "NULLIF", "NUMERIC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "OBJECT", "OCTET_LENGTH", "OF", "OLD", "ON", "ONLY", "OPEN", "OPTION", "OR", "ORDER", "ORDINALITY", "OUT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "OUTER", "OUTPUT", "OVER", "OVERLAPS", "PAD", "PARAMETER", "PARTIAL", "PARTITION", "PATH", "POSITION", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "PRECISION", "PREPARE", "PRESERVE", "PRIMARY", "PRIOR", "PRIVILEGES", "PROCEDURE", "PUBLIC", "RANGE", "READ", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "READS", "REAL", "RECURSIVE", "REF", "REFERENCES", "REFERENCING", "RELATIVE", "RELEASE", "REPEAT", "RESIGNAL", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "RESTRICT", "RESULT", "RETURN", "RETURNS", "REVOKE", "RIGHT", "ROLE", "ROLLBACK", "ROLLUP", "ROUTINE", "ROW", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "ROWS", "SAVEPOINT", "SCHEMA", "SCOPE", "SCROLL", "SEARCH", "SECOND", "SECTION", "SELECT", "SENSITIVE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "SESSION", "SESSION_USER", "SET", "SETS", "SIGNAL", "SIMILAR", "SIZE", "SMALLINT", "SOME", "SPACE", "SPECIFIC", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "SPECIFICTYPE", "SQL", "SQLCODE", "SQLERROR", "SQLEXCEPTION", "SQLSTATE", "SQLWARNING", "START", "STATE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "STATIC", "SUBMULTISET", "SUBSTRING", "SUM", "SYMMETRIC", "SYSTEM", "SYSTEM_USER", "TABLE", "TABLESAMPLE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "TEMPORARY", "THEN", "TIME", "TIMESTAMP", "TIMEZONE_HOUR", "TIMEZONE_MINUTE", "TO", "TRAILING", "TRANSACTION", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "TRANSLATE", "TRANSLATION", "TREAT", "TRIGGER", "TRIM", "TRUE", "UNDER", "UNDO", "UNION", "UNIQUE", "UNKNOWN", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
+ "UNNEST", "UNTIL", "UPDATE", "UPPER", "USAGE", "USER", "USING", "VALUE", "VALUES", "VARCHAR", "VARYING", "VIEW", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
+ "WHEN", "WHENEVER", "WHERE", "WHILE", "WINDOW", "WITH", "WITHIN", "WITHOUT", "WORK", "WRITE", "YEAR", "ZONE" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
private String name;
@@ -137,7 +137,7 @@ public abstract class DBAdapter implements IDBAdapter
created = false;
if (TRACER.isEnabled())
{
- TRACER.trace("-- " + ex.getMessage());
+ TRACER.trace("-- " + ex.getMessage()); //$NON-NLS-1$
}
}
@@ -199,7 +199,7 @@ public abstract class DBAdapter implements IDBAdapter
protected String getDropTableSQL(IDBTable table)
{
- return "DROP TABLE " + table;
+ return "DROP TABLE " + table; //$NON-NLS-1$
}
/**
@@ -245,7 +245,7 @@ public abstract class DBAdapter implements IDBAdapter
@Override
public String toString()
{
- return getName() + "-" + getVersion();
+ return getName() + "-" + getVersion(); //$NON-NLS-1$
}
/**
@@ -254,18 +254,18 @@ public abstract class DBAdapter implements IDBAdapter
protected void doCreateTable(IDBTable table, Statement statement) throws SQLException
{
StringBuilder builder = new StringBuilder();
- builder.append("CREATE TABLE ");
+ builder.append("CREATE TABLE "); //$NON-NLS-1$
builder.append(table);
- builder.append(" (");
+ builder.append(" ("); //$NON-NLS-1$
appendFieldDefs(builder, table, createFieldDefinitions(table));
String constraints = createConstraints(table);
if (constraints != null)
{
- builder.append(", ");
+ builder.append(", "); //$NON-NLS-1$
builder.append(constraints);
}
- builder.append(")");
+ builder.append(")"); //$NON-NLS-1$
String sql = builder.toString();
if (TRACER.isEnabled())
{
@@ -288,31 +288,31 @@ public abstract class DBAdapter implements IDBAdapter
{
IDBTable table = index.getTable();
StringBuilder builder = new StringBuilder();
- builder.append("CREATE ");
+ builder.append("CREATE "); //$NON-NLS-1$
if (index.getType() == IDBIndex.Type.UNIQUE)
{
- builder.append("UNIQUE ");
+ builder.append("UNIQUE "); //$NON-NLS-1$
}
- builder.append("INDEX ");
+ builder.append("INDEX "); //$NON-NLS-1$
builder.append(table);
- builder.append("_idx");
+ builder.append("_idx"); //$NON-NLS-1$
builder.append(num);
- builder.append(" ON ");
+ builder.append(" ON "); //$NON-NLS-1$
builder.append(table);
- builder.append(" (");
+ builder.append(" ("); //$NON-NLS-1$
IDBField[] fields = index.getFields();
for (int i = 0; i < fields.length; i++)
{
if (i != 0)
{
- builder.append(", ");
+ builder.append(", "); //$NON-NLS-1$
}
addIndexField(builder, fields[i]);
}
- builder.append(")");
+ builder.append(")"); //$NON-NLS-1$
String sql = builder.toString();
if (TRACER.isEnabled())
{
@@ -340,7 +340,7 @@ public abstract class DBAdapter implements IDBAdapter
*/
protected String createFieldDefinition(IDBField field)
{
- return getTypeName(field) + (field.isNotNull() ? " NOT NULL" : "");
+ return getTypeName(field) + (field.isNotNull() ? " NOT NULL" : ""); //$NON-NLS-1$ //$NON-NLS-2$
}
protected String getTypeName(IDBField field)
@@ -377,7 +377,7 @@ public abstract class DBAdapter implements IDBAdapter
return type.toString() + field.formatPrecisionAndScale();
}
- throw new IllegalArgumentException("Unknown type: " + type);
+ throw new IllegalArgumentException("Unknown type: " + type); //$NON-NLS-1$
}
public String[] getSQL92ReservedWords()
@@ -408,9 +408,9 @@ public abstract class DBAdapter implements IDBAdapter
try
{
StringBuilder builder = new StringBuilder();
- builder.append("SELECT ");
+ builder.append("SELECT "); //$NON-NLS-1$
appendFieldNames(builder, table);
- builder.append(" FROM ");
+ builder.append(" FROM "); //$NON-NLS-1$
builder.append(table);
String sql = builder.toString();
@@ -419,7 +419,7 @@ public abstract class DBAdapter implements IDBAdapter
int columnCount = metaData.getColumnCount();
if (columnCount != table.getFieldCount())
{
- throw new DBException("DBTable " + table + " has " + columnCount + " columns instead of "
+ throw new DBException("DBTable " + table + " has " + columnCount + " columns instead of " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ table.getFieldCount());
}
}
@@ -454,7 +454,7 @@ public abstract class DBAdapter implements IDBAdapter
IDBField field = fields[i];
if (i != 0)
{
- appendable.append(", ");
+ appendable.append(", "); //$NON-NLS-1$
}
String fieldName = field.getName();
@@ -476,13 +476,13 @@ public abstract class DBAdapter implements IDBAdapter
IDBField field = fields[i];
if (i != 0)
{
- appendable.append(", ");
+ appendable.append(", "); //$NON-NLS-1$
}
// String fieldName = mangleFieldName(field.getName(), 0);
String fieldName = field.getName();
appendable.append(fieldName);
- appendable.append(" ");
+ appendable.append(" "); //$NON-NLS-1$
appendable.append(defs[i]);
}
}
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBSchema.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBSchema.java
index 6cf520585f..e36b06207a 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBSchema.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/spi/db/DBSchema.java
@@ -67,7 +67,7 @@ public class DBSchema extends DBSchemaElement implements IDBSchema
assertUnlocked();
if (tables.containsKey(name))
{
- throw new DBException("DBTable exists: " + name);
+ throw new DBException("DBTable exists: " + name); //$NON-NLS-1$
}
DBTable table = new DBTable(this, name);
@@ -120,7 +120,7 @@ public class DBSchema extends DBSchemaElement implements IDBSchema
connection = connectionProvider.getConnection();
if (connection == null)
{
- throw new DBException("No connection available from " + connectionProvider);
+ throw new DBException("No connection available from " + connectionProvider); //$NON-NLS-1$
}
return create(dbAdapter, connection);
@@ -176,7 +176,7 @@ public class DBSchema extends DBSchemaElement implements IDBSchema
out.println(tableName);
for (int i = 0; i < tableName.length(); i++)
{
- out.print("=");
+ out.print("="); //$NON-NLS-1$
}
out.println();
@@ -216,7 +216,7 @@ public class DBSchema extends DBSchemaElement implements IDBSchema
{
if (locked)
{
- throw new DBException("DBSchema locked: " + name);
+ throw new DBException("DBSchema locked: " + name); //$NON-NLS-1$
}
}
}

Back to the top