[exo-jcr-commits] exo-jcr SVN: r1072 - in jcr/branches/1.12.0-OPT/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/impl/dataflow/serialization and 4 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Dec 15 12:10:28 EST 2009
Author: pnedonosko
Date: 2009-12-15 12:10:28 -0500 (Tue, 15 Dec 2009)
New Revision: 1072
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspaceStorageCacheBaseCase.java
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestPersistedValueData.java
Log:
EXOJCR-274 TransientValueData rework part4: params switched
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ByteArrayPersistedValueData.java 2009-12-15 17:10:28 UTC (rev 1072)
@@ -51,13 +51,12 @@
/**
* ByteArrayPersistedValueData constructor.
- *
- * @param data
- * byte[]
* @param orderNumber
* int
+ * @param data
+ * byte[]
*/
- public ByteArrayPersistedValueData(byte[] data, int orderNumber)
+ public ByteArrayPersistedValueData(int orderNumber, byte[] data)
{
super(orderNumber);
this.data = data;
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2009-12-15 17:08:54 UTC (rev 1071)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2009-12-15 17:10:28 UTC (rev 1072)
@@ -389,7 +389,7 @@
if (vd.isByteArray())
{
- pvd = new ByteArrayPersistedValueData(vd.getAsByteArray(), i);
+ pvd = new ByteArrayPersistedValueData(i, vd.getAsByteArray());
values.add(pvd);
}
else
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java 2009-12-15 17:08:54 UTC (rev 1071)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/serialization/PersistedValueDataReader.java 2009-12-15 17:10:28 UTC (rev 1072)
@@ -102,7 +102,7 @@
{
byte[] data = new byte[in.readInt()];
in.readFully(data);
- return new ByteArrayPersistedValueData(data, orderNumber);
+ return new ByteArrayPersistedValueData(orderNumber, data);
}
else
{
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-12-15 17:08:54 UTC (rev 1071)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-12-15 17:10:28 UTC (rev 1072)
@@ -1831,7 +1831,7 @@
if (buffer == null)
return new CleanableFilePersistedValueData(orderNumber, swapFile, swapCleaner);
- return new ByteArrayPersistedValueData(buffer, orderNumber);
+ return new ByteArrayPersistedValueData(orderNumber, buffer);
}
/**
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java 2009-12-15 17:08:54 UTC (rev 1071)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java 2009-12-15 17:10:28 UTC (rev 1072)
@@ -96,7 +96,7 @@
System.arraycopy(buff, 0, res, rpos, r);
rpos += r;
}
- return new ByteArrayPersistedValueData(res, orderNum);
+ return new ByteArrayPersistedValueData(orderNum, res);
}
finally
{
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspaceStorageCacheBaseCase.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspaceStorageCacheBaseCase.java 2009-12-15 17:08:54 UTC (rev 1071)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspaceStorageCacheBaseCase.java 2009-12-15 17:10:28 UTC (rev 1072)
@@ -193,39 +193,39 @@
private void initDataAsPersisted()
{
List<ValueData> stringData = new ArrayList<ValueData>();
- stringData.add(new ByteArrayPersistedValueData("property data 1".getBytes(), 0));
- stringData.add(new ByteArrayPersistedValueData("property data 2".getBytes(), 1));
- stringData.add(new ByteArrayPersistedValueData("property data 3".getBytes(), 2));
+ stringData.add(new ByteArrayPersistedValueData(0, "property data 1".getBytes()));
+ stringData.add(new ByteArrayPersistedValueData(1, "property data 2".getBytes()));
+ stringData.add(new ByteArrayPersistedValueData(2, "property data 3".getBytes()));
propertyData11 =
new PersistedPropertyData(propertyUuid11, propertyPath11, nodeUuid1, 1, PropertyType.STRING, false, stringData);
List<ValueData> binData = new ArrayList<ValueData>();
- binData.add(new ByteArrayPersistedValueData("property data bin 1".getBytes(), 0));
+ binData.add(new ByteArrayPersistedValueData(0, "property data bin 1".getBytes()));
propertyData12 =
new PersistedPropertyData(propertyUuid12, propertyPath12, nodeUuid1, 1, PropertyType.BINARY, false, binData);
List<ValueData> stringData1 = new ArrayList<ValueData>();
- stringData1.add(new ByteArrayPersistedValueData("property data 1".getBytes(), 0));
- stringData1.add(new ByteArrayPersistedValueData("property data 2".getBytes(), 1));
- stringData1.add(new ByteArrayPersistedValueData("property data 3".getBytes(), 2));
+ stringData1.add(new ByteArrayPersistedValueData(0, "property data 1".getBytes()));
+ stringData1.add(new ByteArrayPersistedValueData(1, "property data 2".getBytes()));
+ stringData1.add(new ByteArrayPersistedValueData(2, "property data 3".getBytes()));
propertyData21 =
new PersistedPropertyData(propertyUuid21, propertyPath21, nodeUuid2, 1, PropertyType.STRING, true, stringData);
List<ValueData> booleanData = new ArrayList<ValueData>();
- booleanData.add(new ByteArrayPersistedValueData("true".getBytes(), 0));
+ booleanData.add(new ByteArrayPersistedValueData(0, "true".getBytes()));
propertyData22 =
new PersistedPropertyData(propertyUuid22, propertyPath22, nodeUuid2, 1, PropertyType.BOOLEAN, false,
booleanData);
List<ValueData> longData = new ArrayList<ValueData>();
- longData.add(new ByteArrayPersistedValueData(new Long(123456).toString().getBytes(), 0));
+ longData.add(new ByteArrayPersistedValueData(0, new Long(123456).toString().getBytes()));
propertyData311 =
new PersistedPropertyData(propertyUuid311, propertyPath311, nodeUuid31, 1, PropertyType.LONG, false, longData);
List<ValueData> refData = new ArrayList<ValueData>();
- refData.add(new ByteArrayPersistedValueData(nodeUuid1.getBytes(), 0));
- refData.add(new ByteArrayPersistedValueData(nodeUuid2.getBytes(), 1));
- refData.add(new ByteArrayPersistedValueData(nodeUuid3.getBytes(), 2));
+ refData.add(new ByteArrayPersistedValueData(0, nodeUuid1.getBytes()));
+ refData.add(new ByteArrayPersistedValueData(1, nodeUuid2.getBytes()));
+ refData.add(new ByteArrayPersistedValueData(2, nodeUuid3.getBytes()));
propertyData312 =
new PersistedPropertyData(propertyUuid312, propertyPath312, nodeUuid31, 1, PropertyType.REFERENCE, true,
refData);
Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestPersistedValueData.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestPersistedValueData.java 2009-12-15 17:08:54 UTC (rev 1071)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/value/TestPersistedValueData.java 2009-12-15 17:10:28 UTC (rev 1072)
@@ -45,7 +45,7 @@
public void testCreateByteArrayValueData() throws Exception
{
byte[] buf = "0123456789".getBytes();
- ByteArrayPersistedValueData vd = new ByteArrayPersistedValueData(buf, 0);
+ ByteArrayPersistedValueData vd = new ByteArrayPersistedValueData(0, buf);
assertTrue(vd.isByteArray());
assertEquals(10, vd.getLength());
assertEquals(0, vd.getOrderNumber());
More information about the exo-jcr-commits
mailing list