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.tests
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.tests')
-rw-r--r--plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java34
-rw-r--r--plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AllTests.java2
-rw-r--r--plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java6
-rw-r--r--plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java4
-rw-r--r--plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/TestSchema.java104
5 files changed, 75 insertions, 75 deletions
diff --git a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java
index b3924c500b..938da12bd5 100644
--- a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java
+++ b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AbstractDBTest.java
@@ -60,31 +60,31 @@ public abstract class AbstractDBTest<DATA_SOURCE extends DataSource> extends Abs
public void testDBTypes() throws Exception
{
- IDBSchema schema = DBUtil.createSchema("testDBTypes");
+ IDBSchema schema = DBUtil.createSchema("testDBTypes"); //$NON-NLS-1$
DBType[] dbTypes = DBType.values();
int count = 0;
int i = 0;
for (DBType dbType : dbTypes)
{
- IDBTable table = schema.addTable("table_" + i);
- table.addField("field", dbType);
+ IDBTable table = schema.addTable("table_" + i); //$NON-NLS-1$
+ table.addField("field", dbType); //$NON-NLS-1$
++count;
if (dbAdapter.isTypeIndexable(dbType))
{
- IDBTable idx_table = schema.addTable("idx_table" + i);
- IDBField idx_field = idx_table.addField("field", dbType);
+ IDBTable idx_table = schema.addTable("idx_table" + i); //$NON-NLS-1$
+ IDBField idx_field = idx_table.addField("field", dbType); //$NON-NLS-1$
idx_table.addIndex(IDBIndex.Type.NON_UNIQUE, idx_field);
++count;
- IDBTable uni_table = schema.addTable("uni_table" + i);
- IDBField uni_field = uni_table.addField("field", dbType);
+ IDBTable uni_table = schema.addTable("uni_table" + i); //$NON-NLS-1$
+ IDBField uni_field = uni_table.addField("field", dbType); //$NON-NLS-1$
uni_table.addIndex(IDBIndex.Type.UNIQUE, uni_field);
++count;
- IDBTable pk_table = schema.addTable("pk_table" + i);
- IDBField pk_field = pk_table.addField("field", dbType);
+ IDBTable pk_table = schema.addTable("pk_table" + i); //$NON-NLS-1$
+ IDBField pk_field = pk_table.addField("field", dbType); //$NON-NLS-1$
pk_table.addIndex(IDBIndex.Type.PRIMARY_KEY, pk_field);
++count;
}
@@ -98,15 +98,15 @@ public abstract class AbstractDBTest<DATA_SOURCE extends DataSource> extends Abs
public void testEscapeStrings() throws Exception
{
- IDBSchema schema = DBUtil.createSchema("testEscapeStrings");
- IDBTable table = schema.addTable("testtable");
- IDBField field = table.addField("strval", DBType.VARCHAR, 255);
+ IDBSchema schema = DBUtil.createSchema("testEscapeStrings"); //$NON-NLS-1$
+ IDBTable table = schema.addTable("testtable"); //$NON-NLS-1$
+ IDBField field = table.addField("strval", DBType.VARCHAR, 255); //$NON-NLS-1$
schema.create(dbAdapter, dbConnectionProvider);
- insertString(field, "My name is 'nobody', not body");
- insertString(field, "a = 'hello'");
- insertString(field, "'hello' == a");
- insertString(field, "'hello'");
+ insertString(field, "My name is 'nobody', not body"); //$NON-NLS-1$
+ insertString(field, "a = 'hello'"); //$NON-NLS-1$
+ insertString(field, "'hello' == a"); //$NON-NLS-1$
+ insertString(field, "'hello'"); //$NON-NLS-1$
}
private void insertString(IDBField field, String val)
@@ -122,7 +122,7 @@ public abstract class AbstractDBTest<DATA_SOURCE extends DataSource> extends Abs
}
finally
{
- DBUtil.update(connection, "DELETE FROM " + table);
+ DBUtil.update(connection, "DELETE FROM " + table); //$NON-NLS-1$
}
}
}
diff --git a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AllTests.java b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AllTests.java
index 5f1fd5a1ae..0f15a041a3 100644
--- a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AllTests.java
+++ b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/AllTests.java
@@ -20,7 +20,7 @@ public class AllTests
{
public static Test suite()
{
- TestSuite suite = new TestSuite("Tests for Net4j");
+ TestSuite suite = new TestSuite("Tests for Net4j"); //$NON-NLS-1$
// $JUnit-BEGIN$
suite.addTestSuite(DerbyTest.class);
diff --git a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java
index f72da72387..ca3b17af16 100644
--- a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java
+++ b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/DerbyTest.java
@@ -34,12 +34,12 @@ public class DerbyTest extends AbstractDBTest<EmbeddedDataSource>
@Override
protected void configureDataSource(EmbeddedDataSource dataSource)
{
- dbFolder = TMPUtil.createTempFolder("derby_", null, new File("/temp"));
+ dbFolder = TMPUtil.createTempFolder("derby_", null, new File("/temp")); //$NON-NLS-1$ //$NON-NLS-2$
deleteDBFolder();
- msg("Using DB folder: " + dbFolder.getAbsolutePath());
+ msg("Using DB folder: " + dbFolder.getAbsolutePath()); //$NON-NLS-1$
dataSource.setDatabaseName(dbFolder.getAbsolutePath());
- dataSource.setCreateDatabase("create");
+ dataSource.setCreateDatabase("create"); //$NON-NLS-1$
}
@Override
diff --git a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java
index a221f98d5f..ece71ce8d2 100644
--- a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java
+++ b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/HsqldbTest.java
@@ -27,7 +27,7 @@ public class HsqldbTest extends AbstractDBTest<HSQLDBDataSource>
@Override
protected void configureDataSource(HSQLDBDataSource dataSource)
{
- dataSource.setDatabase("jdbc:hsqldb:mem:dbtest");
- dataSource.setUser("sa");
+ dataSource.setDatabase("jdbc:hsqldb:mem:dbtest"); //$NON-NLS-1$
+ dataSource.setUser("sa"); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/TestSchema.java b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/TestSchema.java
index 3065215ce1..9ef0f06666 100644
--- a/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/TestSchema.java
+++ b/plugins/org.eclipse.net4j.db.tests/src/org/eclipse/net4j/db/tests/TestSchema.java
@@ -26,54 +26,54 @@ public class TestSchema extends DBSchema
/**
* DBTable cdo_repository
*/
- public static final IDBTable REPOSITORY = INSTANCE.addTable("cdo_repository");
+ public static final IDBTable REPOSITORY = INSTANCE.addTable("cdo_repository"); //$NON-NLS-1$
public static final IDBField REPOSITORY_NAME = //
- REPOSITORY.addField("name", DBType.VARCHAR, 255);
+ REPOSITORY.addField("name", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField REPOSITORY_UUID = //
- REPOSITORY.addField("uuid", DBType.VARCHAR, 64);
+ REPOSITORY.addField("uuid", DBType.VARCHAR, 64); //$NON-NLS-1$
public static final IDBField REPOSITORY_STARTS = //
- REPOSITORY.addField("starts", DBType.BIGINT);
+ REPOSITORY.addField("starts", DBType.BIGINT); //$NON-NLS-1$
public static final IDBField REPOSITORY_STARTED = //
- REPOSITORY.addField("started", DBType.BIGINT);
+ REPOSITORY.addField("started", DBType.BIGINT); //$NON-NLS-1$
public static final IDBField REPOSITORY_STOPPED = //
- REPOSITORY.addField("stopped", DBType.BIGINT);
+ REPOSITORY.addField("stopped", DBType.BIGINT); //$NON-NLS-1$
public static final IDBField REPOSITORY_NEXT_CDOID = //
- REPOSITORY.addField("next_cdoid", DBType.BIGINT);
+ REPOSITORY.addField("next_cdoid", DBType.BIGINT); //$NON-NLS-1$
public static final IDBField REPOSITORY_NEXT_METAID = //
- REPOSITORY.addField("next_metaid", DBType.BIGINT);
+ REPOSITORY.addField("next_metaid", DBType.BIGINT); //$NON-NLS-1$
/**
* DBTable cdo_packages
*/
- public static final IDBTable PACKAGES = INSTANCE.addTable("cdo_packages");
+ public static final IDBTable PACKAGES = INSTANCE.addTable("cdo_packages"); //$NON-NLS-1$
public static final IDBField PACKAGES_ID = //
- PACKAGES.addField("id", DBType.INTEGER);
+ PACKAGES.addField("id", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField PACKAGES_URI = //
- PACKAGES.addField("uri", DBType.VARCHAR, 255);
+ PACKAGES.addField("uri", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField PACKAGES_NAME = //
- PACKAGES.addField("name", DBType.VARCHAR, 255);
+ PACKAGES.addField("name", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField PACKAGES_ECORE = //
- PACKAGES.addField("ecore", DBType.CLOB);
+ PACKAGES.addField("ecore", DBType.CLOB); //$NON-NLS-1$
public static final IDBField PACKAGES_DYNAMIC = //
- PACKAGES.addField("dynamic", DBType.BOOLEAN);
+ PACKAGES.addField("dynamic", DBType.BOOLEAN); //$NON-NLS-1$
public static final IDBField PACKAGES_RANGE_LB = //
- PACKAGES.addField("range_lb", DBType.BIGINT);
+ PACKAGES.addField("range_lb", DBType.BIGINT); //$NON-NLS-1$
public static final IDBField PACKAGES_RANGE_UB = //
- PACKAGES.addField("range_ub", DBType.BIGINT);
+ PACKAGES.addField("range_ub", DBType.BIGINT); //$NON-NLS-1$
public static final IDBIndex INDEX_PACKAGES_PK = //
PACKAGES.addIndex(IDBIndex.Type.PRIMARY_KEY, PACKAGES_ID);
@@ -84,22 +84,22 @@ public class TestSchema extends DBSchema
/**
* DBTable cdo_classes
*/
- public static final IDBTable CLASSES = INSTANCE.addTable("cdo_classes");
+ public static final IDBTable CLASSES = INSTANCE.addTable("cdo_classes"); //$NON-NLS-1$
public static final IDBField CLASSES_ID = //
- CLASSES.addField("id", DBType.INTEGER);
+ CLASSES.addField("id", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField CLASSES_PACKAGE = //
- CLASSES.addField("package", DBType.INTEGER);
+ CLASSES.addField("package", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField CLASSES_CLASSIFIER = //
- CLASSES.addField("classifier", DBType.INTEGER);
+ CLASSES.addField("classifier", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField CLASSES_NAME = //
- CLASSES.addField("name", DBType.VARCHAR, 255);
+ CLASSES.addField("name", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField CLASSES_ABSTRACT = //
- CLASSES.addField("abstract", DBType.BOOLEAN);
+ CLASSES.addField("abstract", DBType.BOOLEAN); //$NON-NLS-1$
public static final IDBIndex INDEX_CLASSES_PK = //
CLASSES.addIndex(IDBIndex.Type.PRIMARY_KEY, CLASSES_ID);
@@ -107,16 +107,16 @@ public class TestSchema extends DBSchema
/**
* DBTable cdo_supertypes
*/
- public static final IDBTable SUPERTYPES = INSTANCE.addTable("cdo_supertypes");
+ public static final IDBTable SUPERTYPES = INSTANCE.addTable("cdo_supertypes"); //$NON-NLS-1$
public static final IDBField SUPERTYPES_TYPE = //
- SUPERTYPES.addField("type_id", DBType.INTEGER);
+ SUPERTYPES.addField("type_id", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField SUPERTYPES_SUPERTYPE_PACKAGE = //
- SUPERTYPES.addField("supertype_package", DBType.VARCHAR, 255);
+ SUPERTYPES.addField("supertype_package", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField SUPERTYPES_SUPERTYPE_CLASSIFIER = //
- SUPERTYPES.addField("supertype_classifier", DBType.INTEGER);
+ SUPERTYPES.addField("supertype_classifier", DBType.INTEGER); //$NON-NLS-1$
public static final IDBIndex INDEX_SUPERTYPES_PK = //
SUPERTYPES.addIndex(IDBIndex.Type.PRIMARY_KEY, SUPERTYPES_TYPE);
@@ -124,37 +124,37 @@ public class TestSchema extends DBSchema
/**
* DBTable cdo_features
*/
- public static final IDBTable FEATURES = INSTANCE.addTable("cdo_features");
+ public static final IDBTable FEATURES = INSTANCE.addTable("cdo_features"); //$NON-NLS-1$
public static final IDBField FEATURES_ID = //
- FEATURES.addField("id", DBType.INTEGER);
+ FEATURES.addField("id", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField FEATURES_CLASS = //
- FEATURES.addField("class", DBType.INTEGER);
+ FEATURES.addField("class", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField FEATURES_FEATURE = //
- FEATURES.addField("feature", DBType.INTEGER);
+ FEATURES.addField("feature", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField FEATURES_NAME = //
- FEATURES.addField("name", DBType.VARCHAR, 255);
+ FEATURES.addField("name", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField FEATURES_TYPE = //
- FEATURES.addField("type", DBType.INTEGER);
+ FEATURES.addField("type", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField FEATURES_REFERENCE_PACKAGE = //
- FEATURES.addField("reference_package", DBType.VARCHAR, 255);
+ FEATURES.addField("reference_package", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField FEATURES_REFERENCE_CLASSIFIER = //
- FEATURES.addField("reference_classifier", DBType.INTEGER);
+ FEATURES.addField("reference_classifier", DBType.INTEGER); //$NON-NLS-1$
public static final IDBField FEATURES_MANY = //
- FEATURES.addField("many", DBType.BOOLEAN);
+ FEATURES.addField("many", DBType.BOOLEAN); //$NON-NLS-1$
public static final IDBField FEATURES_CONTAINMENT = //
- FEATURES.addField("containment", DBType.BOOLEAN);
+ FEATURES.addField("containment", DBType.BOOLEAN); //$NON-NLS-1$
public static final IDBField FEATURES_INDEX = //
- FEATURES.addField("idx", DBType.INTEGER);
+ FEATURES.addField("idx", DBType.INTEGER); //$NON-NLS-1$
public static final IDBIndex INDEX_FEATURES_PK = //
FEATURES.addIndex(IDBIndex.Type.PRIMARY_KEY, FEATURES_ID);
@@ -162,43 +162,43 @@ public class TestSchema extends DBSchema
/**
* Name of object table
*/
- public static final String CDO_OBJECTS = "cdo_objects";
+ public static final String CDO_OBJECTS = "cdo_objects"; //$NON-NLS-1$
/**
* Field names of attribute tables
*/
- public static final String ATTRIBUTES_ID = "cdo_id";
+ public static final String ATTRIBUTES_ID = "cdo_id"; //$NON-NLS-1$
- public static final String ATTRIBUTES_VERSION = "cdo_version";
+ public static final String ATTRIBUTES_VERSION = "cdo_version"; //$NON-NLS-1$
- public static final String ATTRIBUTES_CLASS = "cdo_class";
+ public static final String ATTRIBUTES_CLASS = "cdo_class"; //$NON-NLS-1$
- public static final String ATTRIBUTES_CREATED = "cdo_created";
+ public static final String ATTRIBUTES_CREATED = "cdo_created"; //$NON-NLS-1$
- public static final String ATTRIBUTES_REVISED = "cdo_revised";
+ public static final String ATTRIBUTES_REVISED = "cdo_revised"; //$NON-NLS-1$
- public static final String ATTRIBUTES_RESOURCE = "cdo_resource";
+ public static final String ATTRIBUTES_RESOURCE = "cdo_resource"; //$NON-NLS-1$
- public static final String ATTRIBUTES_CONTAINER = "cdo_container";
+ public static final String ATTRIBUTES_CONTAINER = "cdo_container"; //$NON-NLS-1$
- public static final String ATTRIBUTES_FEATURE = "cdo_feature";
+ public static final String ATTRIBUTES_FEATURE = "cdo_feature"; //$NON-NLS-1$
/**
* Field names of reference tables
*/
- public static final String REFERENCES_FEATURE = "cdo_feature";
+ public static final String REFERENCES_FEATURE = "cdo_feature"; //$NON-NLS-1$
- public static final String REFERENCES_SOURCE = "cdo_source";
+ public static final String REFERENCES_SOURCE = "cdo_source"; //$NON-NLS-1$
- public static final String REFERENCES_VERSION = "cdo_version";
+ public static final String REFERENCES_VERSION = "cdo_version"; //$NON-NLS-1$
- public static final String REFERENCES_IDX = "cdo_idx";
+ public static final String REFERENCES_IDX = "cdo_idx"; //$NON-NLS-1$
- public static final String REFERENCES_TARGET = "cdo_target";
+ public static final String REFERENCES_TARGET = "cdo_target"; //$NON-NLS-1$
private TestSchema()
{
- super("CDO");
+ super("CDO"); //$NON-NLS-1$
}
static

Back to the top