summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid W. Miller2012-05-03 14:05:57 (EDT)
committerRoberto E. Escobar2012-05-03 14:05:57 (EDT)
commit9492527af255130a527aa738e2a5138e07eca0a0 (patch)
tree421818c3c6a0411ac3f874afec9357f59786e605
parentbf8b3c86482dae7bd47ada2fdf14040e6e027b8e (diff)
downloadorg.eclipse.osee-9492527af255130a527aa738e2a5138e07eca0a0.zip
org.eclipse.osee-9492527af255130a527aa738e2a5138e07eca0a0.tar.gz
org.eclipse.osee-9492527af255130a527aa738e2a5138e07eca0a0.tar.bz2
refactor: Rename ClobDataProxy to VarCharDataProxy - represents < 4000 char string
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/ProxyTestSuite.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/VarCharDataProxyTest.java (renamed from plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/ClobDataProxyTest.java)32
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/ResourceDataProxyFactory.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/VarCharDataProxy.java (renamed from plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/ClobDataProxy.java)4
4 files changed, 21 insertions, 21 deletions
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/ProxyTestSuite.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/ProxyTestSuite.java
index 2fba9b9..f884a20 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/ProxyTestSuite.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/ProxyTestSuite.java
@@ -18,7 +18,7 @@ import org.junit.runners.Suite;
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
- ClobDataProxyTest.class,
+ VarCharDataProxyTest.class,
DataResourceTest.class,
ResourceDataProxyFactoryTest.class,
ResourceHandlerTest.class,
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/ClobDataProxyTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/VarCharDataProxyTest.java
index f47dcf1..cf3108c 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/ClobDataProxyTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/VarCharDataProxyTest.java
@@ -22,15 +22,15 @@ import org.junit.Assert;
import org.junit.Test;
/**
- * Test Case for {@link ClobDataProxy}
+ * Test Case for {@link VarCharDataProxy}
*
* @author Roberto E. Escobar
*/
-public class ClobDataProxyTest {
+public class VarCharDataProxyTest {
@Test(expected = UnsupportedOperationException.class)
public void testSetDisplayable() throws Exception {
- ClobDataProxy proxy = new ClobDataProxy();
+ VarCharDataProxy proxy = new VarCharDataProxy();
proxy.setDisplayableString("hello");
}
@@ -45,7 +45,7 @@ public class ClobDataProxyTest {
Storage storage = new Storage(handler);
storage.setLocator("validPath");
- ClobDataProxy proxy = new ClobDataProxy();
+ VarCharDataProxy proxy = new VarCharDataProxy();
proxy.setLogger(new MockLog());
proxy.setStorage(storage);
@@ -58,10 +58,10 @@ public class ClobDataProxyTest {
@Test
public void testSetGetData() throws Exception {
- String longData = Utility.generateData(ClobDataProxy.MAX_VARCHAR_LENGTH + 1);
+ String longData = Utility.generateData(VarCharDataProxy.MAX_VARCHAR_LENGTH + 1);
byte[] zippedData = Utility.asZipped(longData, "myTest.txt");
- String shortStringData = Utility.generateData(ClobDataProxy.MAX_VARCHAR_LENGTH);
+ String shortStringData = Utility.generateData(VarCharDataProxy.MAX_VARCHAR_LENGTH);
MockDataHandler handler = new MockDataHandler();
handler.setContent(zippedData);
@@ -70,7 +70,7 @@ public class ClobDataProxyTest {
Assert.assertFalse(storage.isLocatorValid());
Assert.assertNull(storage.getLocator());
- ClobDataProxy proxy = new ClobDataProxy();
+ VarCharDataProxy proxy = new VarCharDataProxy();
proxy.setLogger(new MockLog());
proxy.setStorage(storage);
@@ -97,7 +97,7 @@ public class ClobDataProxyTest {
@Test
public void testSetValue() throws Exception {
- String longData = Utility.generateData(ClobDataProxy.MAX_VARCHAR_LENGTH + 1);
+ String longData = Utility.generateData(VarCharDataProxy.MAX_VARCHAR_LENGTH + 1);
byte[] zippedData = Utility.asZipped(longData, "myTest.txt");
MockDataHandler handler = new MockDataHandler();
@@ -107,7 +107,7 @@ public class ClobDataProxyTest {
Assert.assertFalse(storage.isLocatorValid());
Assert.assertNull(storage.getLocator());
- ClobDataProxy proxy = new ClobDataProxy();
+ VarCharDataProxy proxy = new VarCharDataProxy();
proxy.setLogger(new MockLog());
proxy.setStorage(storage);
@@ -126,10 +126,10 @@ public class ClobDataProxyTest {
@Test
public void testPersist() throws Exception {
- String longData = Utility.generateData(ClobDataProxy.MAX_VARCHAR_LENGTH + 1);
+ String longData = Utility.generateData(VarCharDataProxy.MAX_VARCHAR_LENGTH + 1);
byte[] zippedData = Utility.asZipped(longData, "myTest.txt");
- String shortData = Utility.generateData(ClobDataProxy.MAX_VARCHAR_LENGTH);
+ String shortData = Utility.generateData(VarCharDataProxy.MAX_VARCHAR_LENGTH);
MockDataHandler handler = new MockDataHandler();
handler.setContent(zippedData);
@@ -139,7 +139,7 @@ public class ClobDataProxyTest {
Assert.assertFalse(storage.isLocatorValid());
Assert.assertNull(storage.getLocator());
- ClobDataProxy proxy = new ClobDataProxy();
+ VarCharDataProxy proxy = new VarCharDataProxy();
proxy.setLogger(new MockLog());
proxy.setStorage(storage);
@@ -179,7 +179,7 @@ public class ClobDataProxyTest {
@Test(expected = OseeCoreException.class)
public void testPersistResolverException() throws Exception {
- String longData = Utility.generateData(ClobDataProxy.MAX_VARCHAR_LENGTH + 1);
+ String longData = Utility.generateData(VarCharDataProxy.MAX_VARCHAR_LENGTH + 1);
byte[] zippedData = Utility.asZipped(longData, "myTest.txt");
MockDataHandler handler = new MockDataHandler();
@@ -190,7 +190,7 @@ public class ClobDataProxyTest {
Assert.assertFalse(storage.isLocatorValid());
Assert.assertNull(storage.getLocator());
- ClobDataProxy proxy = new ClobDataProxy();
+ VarCharDataProxy proxy = new VarCharDataProxy();
proxy.setLogger(new MockLog());
proxy.setStorage(storage);
@@ -203,7 +203,7 @@ public class ClobDataProxyTest {
@Test
public void testPurge() throws Exception {
- String longData = Utility.generateData(ClobDataProxy.MAX_VARCHAR_LENGTH + 1);
+ String longData = Utility.generateData(VarCharDataProxy.MAX_VARCHAR_LENGTH + 1);
byte[] zippedData = Utility.asZipped(longData, "myTest.txt");
MockDataHandler handler = new MockDataHandler();
@@ -214,7 +214,7 @@ public class ClobDataProxyTest {
Assert.assertFalse(storage.isLocatorValid());
Assert.assertNull(storage.getLocator());
- ClobDataProxy proxy = new ClobDataProxy();
+ VarCharDataProxy proxy = new VarCharDataProxy();
proxy.setLogger(new MockLog());
proxy.setStorage(storage);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/ResourceDataProxyFactory.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/ResourceDataProxyFactory.java
index a092b80..f00cf94 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/ResourceDataProxyFactory.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/ResourceDataProxyFactory.java
@@ -63,8 +63,8 @@ public class ResourceDataProxyFactory implements DataProxyFactory {
}
Conditions.checkNotNull(factoryAliases, "PROXY_FACTORY_ALIAS");
- proxyClassMap.put("DefaultAttributeDataProvider", ClobDataProxy.class);
- proxyClassMap.put("ClobAttributeDataProvider", ClobDataProxy.class);
+ proxyClassMap.put("DefaultAttributeDataProvider", VarCharDataProxy.class);
+ proxyClassMap.put("ClobAttributeDataProvider", VarCharDataProxy.class);
proxyClassMap.put("UriAttributeDataProvider", UriDataProxy.class);
proxyClassMap.put("MappedAttributeDataProvider", UriDataProxy.class);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/ClobDataProxy.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/VarCharDataProxy.java
index 4add22d..73ce580 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/ClobDataProxy.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/VarCharDataProxy.java
@@ -22,12 +22,12 @@ import org.eclipse.osee.orcs.core.ds.ResourceNameResolver;
/**
* @author Roberto E. Escobar
*/
-public class ClobDataProxy extends AbstractDataProxy implements CharacterDataProxy {
+public class VarCharDataProxy extends AbstractDataProxy implements CharacterDataProxy {
public static final int MAX_VARCHAR_LENGTH = 4000;
private String rawStringValue;
- public ClobDataProxy() {
+ public VarCharDataProxy() {
super();
this.rawStringValue = "";
}