Skip to content

Commit

Permalink
Removed ".generated" suffix in generated sources packages (issue #46).
Browse files Browse the repository at this point in the history
  • Loading branch information
nmihajlovski committed Sep 3, 2012
1 parent 09e2fed commit 27e2385
Show file tree
Hide file tree
Showing 32 changed files with 98 additions and 118 deletions.
5 changes: 0 additions & 5 deletions src/main/java/com/tightdb/example/Example.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
import java.util.Date;

import com.tightdb.Group;
import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeQuery;
import com.tightdb.example.generated.EmployeeTable;
import com.tightdb.example.generated.Phone;
import com.tightdb.example.generated.PhoneTable;
import com.tightdb.lib.AbstractColumn;
import com.tightdb.lib.Table;
import com.tightdb.lib.TightDB;
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/tightdb/example/NestedTablesExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

import java.util.Date;

import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeTable;
import com.tightdb.example.generated.PhoneTable;
import com.tightdb.lib.TightDB;

public class NestedTablesExample {
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/com/tightdb/example/SearchExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
import java.util.Arrays;
import java.util.Date;

import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeQuery;
import com.tightdb.example.generated.EmployeeTable;
import com.tightdb.example.generated.EmployeeView;
import com.tightdb.lib.TightDB;

public class SearchExample {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/tightdb/example/SmallExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import java.util.Date;

import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeTable;
import com.tightdb.lib.Table;
import com.tightdb.lib.TightDB;

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/tightdb/example/TutorialExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
import java.io.IOException;

import com.tightdb.Group;
import com.tightdb.example.generated.PeopleQuery;
import com.tightdb.example.generated.PeopleRow;
import com.tightdb.example.generated.PeopleTable;
import com.tightdb.lib.Table;

// @@Example: create_table @@
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/tightdb/generator/CodeGenProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ private String calculatePackageName(TypeElement model) {
if (parent instanceof PackageElement) {
PackageElement pkg = (PackageElement) parent;
String pkgName = pkg.getQualifiedName().toString();
return pkgName.isEmpty() ? "" : pkgName + ".generated";
return pkgName.isEmpty() ? "" : pkgName;
} else {
logger.error("Couldn't calculate the target package! Using default: "
+ DEFAULT_PACKAGE);
Expand Down
58 changes: 29 additions & 29 deletions src/test/java/com/tightdb/experiment/FailureExample.java
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
package com.tightdb.experiment;

import java.io.IOException;
import java.util.Date;

import com.tightdb.Group;
import com.tightdb.example.generated.EmployeeTable;

public class FailureExample {

public static void main(String[] args) {
Group group = new Group();
EmployeeTable employees = new EmployeeTable(group);

employees.add("John", "Doe", 10000, true, new byte[] { 1, 2, 3 }, new Date(), "extra");

employees.at(0).phones.get();

try {
group.writeToFile("employees.tdb");
} catch (IOException e) {
throw new RuntimeException("Couldn't save the data!", e);
}

employees.clear();
System.out.println("DONE");
}

}
package com.tightdb.experiment;

import java.io.IOException;
import java.util.Date;

import com.tightdb.Group;
import com.tightdb.example.EmployeeTable;

public class FailureExample {

public static void main(String[] args) {
Group group = new Group();
EmployeeTable employees = new EmployeeTable(group);

employees.add("John", "Doe", 10000, true, new byte[] { 1, 2, 3 }, new Date(), "extra");

employees.at(0).phones.get();

try {
group.writeToFile("employees.tdb");
} catch (IOException e) {
throw new RuntimeException("Couldn't save the data!", e);
}

employees.clear();
System.out.println("DONE");
}

}
9 changes: 5 additions & 4 deletions src/test/java/com/tightdb/lib/AbstractDataOperationsTest.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package com.tightdb.lib;

import static org.testng.AssertJUnit.*;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNotNull;

import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;

import com.tightdb.Mixed;
import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeQuery;
import com.tightdb.example.generated.EmployeeView;
import com.tightdb.example.Employee;
import com.tightdb.example.EmployeeQuery;
import com.tightdb.example.EmployeeView;

public abstract class AbstractDataOperationsTest {

Expand Down
9 changes: 5 additions & 4 deletions src/test/java/com/tightdb/lib/AbstractNavigationTest.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.tightdb.lib;

import static org.testng.AssertJUnit.*;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNull;

import org.testng.annotations.Test;

import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeQuery;
import com.tightdb.example.generated.EmployeeView;
import com.tightdb.example.Employee;
import com.tightdb.example.EmployeeQuery;
import com.tightdb.example.EmployeeView;

public abstract class AbstractNavigationTest {

Expand Down
8 changes: 4 additions & 4 deletions src/test/java/com/tightdb/lib/AbstractTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

import com.tightdb.ColumnType;
import com.tightdb.Mixed;
import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeTable;
import com.tightdb.example.generated.EmployeeView;
import com.tightdb.example.generated.Phone;
import com.tightdb.example.Employee;
import com.tightdb.example.EmployeeTable;
import com.tightdb.example.EmployeeView;
import com.tightdb.example.Phone;
import com.tightdb.test.EmployeeData;
import com.tightdb.test.PhoneData;

Expand Down
6 changes: 3 additions & 3 deletions src/test/java/com/tightdb/lib/CursorColumnsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import org.testng.annotations.Test;

import com.tightdb.Mixed;
import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeQuery;
import com.tightdb.example.generated.EmployeeView;
import com.tightdb.example.Employee;
import com.tightdb.example.EmployeeQuery;
import com.tightdb.example.EmployeeView;
import com.tightdb.test.EmployeesFixture;

public class CursorColumnsTest extends AbstractTest {
Expand Down
6 changes: 4 additions & 2 deletions src/test/java/com/tightdb/lib/GroupTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.tightdb.lib;

import static org.testng.AssertJUnit.*;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertFalse;
import static org.testng.AssertJUnit.assertTrue;

import java.io.IOException;
import java.nio.ByteBuffer;
Expand All @@ -9,7 +11,7 @@
import org.testng.annotations.Test;

import com.tightdb.Group;
import com.tightdb.example.generated.EmployeeTable;
import com.tightdb.example.EmployeeTable;

public class GroupTest {

Expand Down
8 changes: 4 additions & 4 deletions src/test/java/com/tightdb/lib/MixedSubtableTest.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.tightdb.lib;

import static org.testng.AssertJUnit.*;
import static org.testng.AssertJUnit.assertEquals;

import org.testng.annotations.Test;

import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeTable;
import com.tightdb.example.generated.PhoneTable;
import com.tightdb.example.Employee;
import com.tightdb.example.EmployeeTable;
import com.tightdb.example.PhoneTable;

public class MixedSubtableTest extends AbstractTest {

Expand Down
14 changes: 8 additions & 6 deletions src/test/java/com/tightdb/lib/SubtableTest.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package com.tightdb.lib;

import static org.testng.AssertJUnit.*;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertFalse;
import static org.testng.AssertJUnit.assertTrue;

import org.testng.annotations.Test;

import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.Phone;
import com.tightdb.example.generated.PhoneQuery;
import com.tightdb.example.generated.PhoneTable;
import com.tightdb.example.generated.PhoneView;
import com.tightdb.example.Employee;
import com.tightdb.example.Phone;
import com.tightdb.example.PhoneQuery;
import com.tightdb.example.PhoneTable;
import com.tightdb.example.PhoneView;
import com.tightdb.test.EmployeesFixture;

public class SubtableTest extends AbstractTest {
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/com/tightdb/lib/TableColumnsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import org.testng.annotations.Test;

import com.tightdb.Mixed;
import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeView;
import com.tightdb.example.generated.PhoneTable;
import com.tightdb.example.Employee;
import com.tightdb.example.EmployeeView;
import com.tightdb.example.PhoneTable;
import com.tightdb.test.EmployeesFixture;
import com.tightdb.test.PhoneData;

Expand Down
8 changes: 5 additions & 3 deletions src/test/java/com/tightdb/lib/TableCursorColumnTest.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.tightdb.lib;

import static org.testng.AssertJUnit.*;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertFalse;
import static org.testng.AssertJUnit.assertTrue;

import java.util.Iterator;

import org.testng.annotations.Test;

import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.Phone;
import com.tightdb.example.Employee;
import com.tightdb.example.Phone;
import com.tightdb.test.EmployeesFixture;

public class TableCursorColumnTest extends AbstractTest {
Expand Down
11 changes: 6 additions & 5 deletions src/test/java/com/tightdb/lib/TableDataOperationsTest.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package com.tightdb.lib;

import static org.testng.AssertJUnit.assertEquals;

import java.util.Date;

import static org.testng.AssertJUnit.*;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeQuery;
import com.tightdb.example.generated.EmployeeTable;
import com.tightdb.example.generated.EmployeeView;
import com.tightdb.example.Employee;
import com.tightdb.example.EmployeeQuery;
import com.tightdb.example.EmployeeTable;
import com.tightdb.example.EmployeeView;

@Test
public class TableDataOperationsTest extends AbstractDataOperationsTest {
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/com/tightdb/lib/TableNavigationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

import org.testng.annotations.Test;

import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeQuery;
import com.tightdb.example.generated.EmployeeTable;
import com.tightdb.example.generated.EmployeeView;
import com.tightdb.example.Employee;
import com.tightdb.example.EmployeeQuery;
import com.tightdb.example.EmployeeTable;
import com.tightdb.example.EmployeeView;

@Test
public class TableNavigationTest extends AbstractNavigationTest {
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/com/tightdb/lib/TableQueryTest.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.tightdb.lib;

import static org.testng.AssertJUnit.*;
import static org.testng.AssertJUnit.assertEquals;

import org.testng.annotations.Test;

import com.tightdb.example.generated.EmployeeQuery;
import com.tightdb.example.generated.EmployeeView;
import com.tightdb.example.EmployeeQuery;
import com.tightdb.example.EmployeeView;

public class TableQueryTest extends AbstractTest {

Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/tightdb/lib/TableTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.tightdb.lib;

import static org.testng.AssertJUnit.*;
import static org.testng.AssertJUnit.assertEquals;

import java.util.Date;

Expand All @@ -9,7 +9,7 @@
import org.testng.annotations.Test;

import com.tightdb.Mixed;
import com.tightdb.example.generated.EmployeeTable;
import com.tightdb.example.EmployeeTable;

public class TableTest {

Expand Down
7 changes: 4 additions & 3 deletions src/test/java/com/tightdb/lib/ViewColumnsTest.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package com.tightdb.lib;

import static org.testng.AssertJUnit.*;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNull;

import java.util.Date;

import org.testng.annotations.Test;

import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeView;
import com.tightdb.example.Employee;
import com.tightdb.example.EmployeeView;
import com.tightdb.test.EmployeesFixture;

public class ViewColumnsTest extends AbstractTest {
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/com/tightdb/lib/ViewDataOperationsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeQuery;
import com.tightdb.example.generated.EmployeeTable;
import com.tightdb.example.generated.EmployeeView;
import com.tightdb.example.Employee;
import com.tightdb.example.EmployeeQuery;
import com.tightdb.example.EmployeeTable;
import com.tightdb.example.EmployeeView;

@Test
public class ViewDataOperationsTest extends AbstractDataOperationsTest {
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/com/tightdb/lib/ViewNavigationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

import org.testng.annotations.Test;

import com.tightdb.example.generated.Employee;
import com.tightdb.example.generated.EmployeeQuery;
import com.tightdb.example.generated.EmployeeTable;
import com.tightdb.example.generated.EmployeeView;
import com.tightdb.example.Employee;
import com.tightdb.example.EmployeeQuery;
import com.tightdb.example.EmployeeTable;
import com.tightdb.example.EmployeeView;

@Test
public class ViewNavigationTest extends AbstractNavigationTest {
Expand Down
Binary file modified tightdb-android/libs/tightdb.jar
Binary file not shown.
Binary file modified tightdb-android/libs/tightdb/tightdb-devkit.jar
Binary file not shown.
Loading

0 comments on commit 27e2385

Please sign in to comment.