diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2013-08-08 02:47:05 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2013-08-08 02:47:05 +0000 |
commit | dccac86c851cc8121f792de0e3443986a3b1855c (patch) | |
tree | 799dcc6705155e0eb57b33c69a15c6bd0f1a03a1 /test/src/java/com/healthmarketscience/jackcess | |
parent | 482ba4844a366f6d606314ad4c9dd22723bc5f8d (diff) | |
download | jackcess-dccac86c851cc8121f792de0e3443986a3b1855c.tar.gz jackcess-dccac86c851cc8121f792de0e3443986a3b1855c.zip |
expand javadocs for core interfaces
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@769 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'test/src/java/com/healthmarketscience/jackcess')
5 files changed, 37 insertions, 37 deletions
diff --git a/test/src/java/com/healthmarketscience/jackcess/BigIndexTest.java b/test/src/java/com/healthmarketscience/jackcess/BigIndexTest.java index 70d63d8..32f228e 100644 --- a/test/src/java/com/healthmarketscience/jackcess/BigIndexTest.java +++ b/test/src/java/com/healthmarketscience/jackcess/BigIndexTest.java @@ -125,7 +125,7 @@ public class BigIndexTest extends TestCase { String prevValue = firstValue; int rowCount = 0; List<String> firstTwo = new ArrayList<String>(); - for(Map<String,Object> row : CursorBuilder.createCursor(t, index)) { + for(Map<String,Object> row : CursorBuilder.createCursor(index)) { String origVal = (String)row.get("col1"); String val = origVal; if(val == null) { @@ -145,7 +145,7 @@ public class BigIndexTest extends TestCase { index.getIndexData().validate(); // delete an entry in the middle - Cursor cursor = CursorBuilder.createCursor(t, index); + Cursor cursor = CursorBuilder.createCursor(index); for(int i = 0; i < (rowCount / 2); ++i) { assertTrue(cursor.moveToNextRow()); } @@ -162,7 +162,7 @@ public class BigIndexTest extends TestCase { index.getIndexData().validate(); List<String> found = new ArrayList<String>(); - for(Map<String,Object> row : CursorBuilder.createCursor(t, index)) { + for(Map<String,Object> row : CursorBuilder.createCursor(index)) { found.add((String)row.get("col1")); } @@ -193,7 +193,7 @@ public class BigIndexTest extends TestCase { index.getIndexData().validate(); - cursor = CursorBuilder.createCursor(t, index); + cursor = CursorBuilder.createCursor(index); while(cursor.moveToNextRow()) { cursor.deleteCurrentRow(); } diff --git a/test/src/java/com/healthmarketscience/jackcess/CursorBuilderTest.java b/test/src/java/com/healthmarketscience/jackcess/CursorBuilderTest.java index 26d22e7..affd28c 100644 --- a/test/src/java/com/healthmarketscience/jackcess/CursorBuilderTest.java +++ b/test/src/java/com/healthmarketscience/jackcess/CursorBuilderTest.java @@ -67,13 +67,13 @@ public class CursorBuilderTest extends TestCase { Cursor found = new CursorBuilder(table).toCursor(); assertCursor(expected, found); - expected = CursorBuilder.createCursor(table, idx); + expected = CursorBuilder.createCursor(idx); found = new CursorBuilder(table) .setIndex(idx) .toCursor(); assertCursor(expected, found); - expected = CursorBuilder.createCursor(table, idx); + expected = CursorBuilder.createCursor(idx); found = new CursorBuilder(table) .setIndexByName("id") .toCursor(); @@ -87,7 +87,7 @@ public class CursorBuilderTest extends TestCase { // success } - expected = CursorBuilder.createCursor(table, idx); + expected = CursorBuilder.createCursor(idx); found = new CursorBuilder(table) .setIndexByColumns(table.getColumn("id")) .toCursor(); @@ -132,7 +132,7 @@ public class CursorBuilderTest extends TestCase { .toCursor(); assertCursor(expected, found); - expected = CursorBuilder.createCursor(table, idx); + expected = CursorBuilder.createCursor(idx); expected.moveNextRows(2); sp = expected.getSavepoint(); found = new CursorBuilder(table) @@ -142,7 +142,7 @@ public class CursorBuilderTest extends TestCase { .toCursor(); assertCursor(expected, found); - expected = CursorBuilder.createCursor(table, idx, + expected = CursorBuilder.createCursor(idx, idx.constructIndexRowFromEntry(3), null); found = new CursorBuilder(table) @@ -151,7 +151,7 @@ public class CursorBuilderTest extends TestCase { .toCursor(); assertCursor(expected, found); - expected = CursorBuilder.createCursor(table, idx, + expected = CursorBuilder.createCursor(idx, idx.constructIndexRowFromEntry(3), false, idx.constructIndexRowFromEntry(7), diff --git a/test/src/java/com/healthmarketscience/jackcess/CursorTest.java b/test/src/java/com/healthmarketscience/jackcess/CursorTest.java index 59de129..d10d18b 100644 --- a/test/src/java/com/healthmarketscience/jackcess/CursorTest.java +++ b/test/src/java/com/healthmarketscience/jackcess/CursorTest.java @@ -397,19 +397,19 @@ public class CursorTest extends TestCase { createExpectedRow("id", 5))); if(index != null) { assertEquals("data" + 5, - CursorBuilder.findValue(table, index, + CursorBuilder.findValue(index, table.getColumn("value"), table.getColumn("id"), 5)); assertEquals(createExpectedRow("id", 5, "value", "data" + 5), - CursorBuilder.findRow(table, index, + CursorBuilder.findRow(index, createExpectedRow("id", 5))); - assertNull(CursorBuilder.findValue(table, index, + assertNull(CursorBuilder.findValue(index, table.getColumn("value"), table.getColumn("id"), -17)); - assertNull(CursorBuilder.findRow(table, index, + assertNull(CursorBuilder.findRow(index, createExpectedRow("id", 13))); } } @@ -586,7 +586,7 @@ public class CursorTest extends TestCase { assertTable(createUnorderedTestTableData(), table); - Cursor cursor = CursorBuilder.createCursor(table, idx); + Cursor cursor = CursorBuilder.createCursor(idx); doTestSimple(cursor, null); db.close(); @@ -599,7 +599,7 @@ public class CursorTest extends TestCase { Table table = db.getTable("test"); Index idx = table.getIndexes().get(0); - Cursor cursor = CursorBuilder.createCursor(table, idx); + Cursor cursor = CursorBuilder.createCursor(idx); doTestMove(cursor, null); db.close(); @@ -612,7 +612,7 @@ public class CursorTest extends TestCase { Table table = db.getTable("test"); Index idx = table.getIndexes().get(0); - Cursor cursor = CursorBuilder.createCursor(table, idx); + Cursor cursor = CursorBuilder.createCursor(idx); doTestReverse(cursor, null); db.close(); @@ -625,7 +625,7 @@ public class CursorTest extends TestCase { Table table = db.getTable("test"); Index idx = table.getIndexes().get(0); - Cursor cursor = CursorBuilder.createCursor(table, idx); + Cursor cursor = CursorBuilder.createCursor(idx); doTestSearch(table, cursor, idx, 42, -13); db.close(); @@ -639,8 +639,8 @@ public class CursorTest extends TestCase { Table table = db.getTable("test"); Index idx = table.getIndexes().get(0); - Cursor cursor1 = CursorBuilder.createCursor(table, idx); - Cursor cursor2 = CursorBuilder.createCursor(table, idx); + Cursor cursor1 = CursorBuilder.createCursor(idx); + Cursor cursor2 = CursorBuilder.createCursor(idx); doTestLiveAddition(table, cursor1, cursor2, 11); db.close(); @@ -654,10 +654,10 @@ public class CursorTest extends TestCase { Table table = db.getTable("test"); Index idx = table.getIndexes().get(0); - Cursor cursor1 = CursorBuilder.createCursor(table, idx); - Cursor cursor2 = CursorBuilder.createCursor(table, idx); - Cursor cursor3 = CursorBuilder.createCursor(table, idx); - Cursor cursor4 = CursorBuilder.createCursor(table, idx); + Cursor cursor1 = CursorBuilder.createCursor(idx); + Cursor cursor2 = CursorBuilder.createCursor(idx); + Cursor cursor3 = CursorBuilder.createCursor(idx); + Cursor cursor4 = CursorBuilder.createCursor(idx); doTestLiveDeletion(cursor1, cursor2, cursor3, cursor4, 1); db.close(); @@ -798,7 +798,7 @@ public class CursorTest extends TestCase { Table table = db.getTable("test"); Index idx = table.getIndexes().get(0); - Cursor cursor = CursorBuilder.createCursor(table, idx); + Cursor cursor = CursorBuilder.createCursor(idx); doTestFindAll(table, cursor, idx); @@ -912,7 +912,7 @@ public class CursorTest extends TestCase { Index idx = table.getIndexes().get(0); Cursor tCursor = CursorBuilder.createCursor(table); - Cursor iCursor = CursorBuilder.createCursor(table, idx); + Cursor iCursor = CursorBuilder.createCursor(idx); Cursor.Savepoint tSave = tCursor.getSavepoint(); Cursor.Savepoint iSave = iCursor.getSavepoint(); @@ -935,7 +935,7 @@ public class CursorTest extends TestCase { } Cursor tCursor2 = CursorBuilder.createCursor(table); - Cursor iCursor2 = CursorBuilder.createCursor(table, idx); + Cursor iCursor2 = CursorBuilder.createCursor(idx); tCursor2.restoreSavepoint(tSave); iCursor2.restoreSavepoint(iSave); @@ -1072,7 +1072,7 @@ public class CursorTest extends TestCase { Database db = open(testDB); Table t1 = db.getTable("Table1"); Index idx = t1.getIndex(IndexBuilder.PRIMARY_KEY_NAME); - IndexCursor cursor = CursorBuilder.createCursor(t1, idx); + IndexCursor cursor = CursorBuilder.createCursor(idx); assertFalse(cursor.findFirstRowByEntry(-1)); cursor.findClosestRowByEntry(-1); @@ -1099,7 +1099,7 @@ public class CursorTest extends TestCase { Database db = openCopy(testDB); Table t1 = db.getTable("Table1"); Index idx = t1.getIndex("Table2Table1"); - IndexCursor cursor = CursorBuilder.createCursor(t1, idx); + IndexCursor cursor = CursorBuilder.createCursor(idx); List<String> expectedData = new ArrayList<String>(); for(Map<String,Object> row : cursor.newEntryIterable(1) diff --git a/test/src/java/com/healthmarketscience/jackcess/IndexTest.java b/test/src/java/com/healthmarketscience/jackcess/IndexTest.java index 8c6284a..5d1548c 100644 --- a/test/src/java/com/healthmarketscience/jackcess/IndexTest.java +++ b/test/src/java/com/healthmarketscience/jackcess/IndexTest.java @@ -260,8 +260,8 @@ public class IndexTest extends TestCase { assertEquals(origI.getIndexData().getEntryCount(), tempI.getIndexData().getEntryCount()); - Cursor origC = CursorBuilder.createCursor(orig, origI); - Cursor tempC = CursorBuilder.createCursor(temp, tempI); + Cursor origC = origI.newCursor().toCursor(); + Cursor tempC = tempI.newCursor().toCursor(); while(true) { boolean origHasNext = origC.moveToNextRow(); diff --git a/test/src/java/com/healthmarketscience/jackcess/impl/IndexCodesTest.java b/test/src/java/com/healthmarketscience/jackcess/impl/IndexCodesTest.java index 56f9096..62565ac 100644 --- a/test/src/java/com/healthmarketscience/jackcess/impl/IndexCodesTest.java +++ b/test/src/java/com/healthmarketscience/jackcess/impl/IndexCodesTest.java @@ -92,7 +92,7 @@ public class IndexCodesTest extends TestCase { // index.initialize(); // System.out.println("Ind " + index); - Cursor cursor = CursorBuilder.createCursor(t, index); + Cursor cursor = CursorBuilder.createCursor(index); while(cursor.moveToNextRow()) { Map<String,Object> row = cursor.getCurrentRow(); @@ -118,7 +118,7 @@ public class IndexCodesTest extends TestCase { throws Exception { Object[] idxRow = ((IndexImpl)index).constructIndexRow(expectedRow); - Cursor cursor = CursorBuilder.createCursor(t, index, idxRow, idxRow); + Cursor cursor = CursorBuilder.createCursor(index, idxRow, idxRow); Cursor.Position startPos = cursor.getSavepoint().getCurrentPosition(); @@ -268,7 +268,7 @@ public class IndexCodesTest extends TestCase { System.out.println("Ind " + ind); - Cursor cursor = CursorBuilder.createCursor(t, ind); + Cursor cursor = CursorBuilder.createCursor(ind); while(cursor.moveToNextRow()) { System.out.println("======="); String entryStr = @@ -320,7 +320,7 @@ public class IndexCodesTest extends TestCase { ((IndexImpl)index).initialize(); System.out.println("Ind " + index); - Cursor cursor = CursorBuilder.createCursor(t, index); + Cursor cursor = CursorBuilder.createCursor(index); while(cursor.moveToNextRow()) { System.out.println("======="); System.out.println("Savepoint: " + cursor.getSavepoint()); @@ -355,7 +355,7 @@ public class IndexCodesTest extends TestCase { Map<Character,String[]> inat2CrazyCodes = new TreeMap<Character,String[]>(); - Cursor cursor = CursorBuilder.createCursor(t, index); + Cursor cursor = CursorBuilder.createCursor(index); while(cursor.moveToNextRow()) { // System.out.println("======="); // System.out.println("Savepoint: " + cursor.getSavepoint()); @@ -534,7 +534,7 @@ public class IndexCodesTest extends TestCase { Map<Character,String[]> inat2CrazyCodes = new TreeMap<Character,String[]>(); - Cursor cursor = CursorBuilder.createCursor(t, index); + Cursor cursor = CursorBuilder.createCursor(index); while(cursor.moveToNextRow()) { // System.out.println("======="); // System.out.println("Savepoint: " + cursor.getSavepoint()); |