├── .gitignore
├── DaoExample
├── .gitignore
├── libs
│ └── greenDAO.jar
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
├── docs
│ └── greenDAO-javadoc.jar
├── res
│ ├── drawable-hdpi
│ │ └── icon.png
│ ├── drawable-ldpi
│ │ └── icon.png
│ ├── drawable-mdpi
│ │ └── icon.png
│ ├── values
│ │ └── strings.xml
│ └── layout
│ │ └── main.xml
├── project.properties
├── src-gen
│ └── de
│ │ └── greenrobot
│ │ └── daoexample
│ │ ├── Customer.java
│ │ ├── Order.java
│ │ ├── Note.java
│ │ ├── DaoSession.java
│ │ └── DaoMaster.java
├── .classpath
├── AndroidManifest.xml
├── .project
├── src-test
│ └── de
│ │ └── greenrobot
│ │ └── daoexample
│ │ ├── NoteTest.java
│ │ └── CustomerOrderTest.java
└── proguard.cfg
├── DaoExampleGenerator
├── .gitignore
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
├── .project
├── .classpath
└── src
│ └── de
│ └── greenrobot
│ └── daogenerator
│ └── gentest
│ └── ExampleDaoGenerator.java
├── DaoTest
├── .gitignore
├── res
│ └── values
│ │ └── dummy.xml
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
├── src
│ └── de
│ │ └── greenrobot
│ │ ├── daotest
│ │ ├── TestSuperclass.java
│ │ ├── TestInterface.java
│ │ ├── query
│ │ │ ├── QueryBuilderOrderTest.java
│ │ │ └── CountQueryTest.java
│ │ ├── entity
│ │ │ ├── SqliteMasterTest.java
│ │ │ ├── StringKeyValueEntityTest.java
│ │ │ ├── ExtendsImplementsEntityTest.java
│ │ │ ├── AutoincrementEntityTest.java
│ │ │ ├── AbcdefEntityTest.java
│ │ │ ├── SpecialNamesEntityTest.java
│ │ │ ├── ToManyTargetEntityTest.java
│ │ │ ├── SimpleEntityNotNullHelper.java
│ │ │ ├── TestEntityTest.java
│ │ │ ├── DateEntityTest.java
│ │ │ ├── TestEntityTestBase.java
│ │ │ ├── TestEntityIdentityScopeTest.java
│ │ │ ├── StringKeyValueEntityIdentityScopeTest.java
│ │ │ ├── TreeEntityTest.java
│ │ │ └── AnActiveEntityTest.java
│ │ ├── StandardApplicationTest.java
│ │ ├── performance
│ │ │ ├── PerformanceTestNotNullIdentityScope.java
│ │ │ └── PerformanceTestNotNull.java
│ │ ├── DbUtilsTest.java
│ │ ├── IndexTest.java
│ │ ├── DaoSessionTest.java
│ │ └── LongHashMapTest.java
│ │ └── daotest2
│ │ └── entity
│ │ └── KeepEntityTest.java
├── assets
│ └── minimal-entity.sql
├── .classpath
├── project.properties
├── AndroidManifest.xml
├── src-gen
│ └── de
│ │ └── greenrobot
│ │ ├── daotest
│ │ ├── AutoincrementEntity.java
│ │ ├── StringKeyValueEntity.java
│ │ ├── ExtendsImplementsEntity.java
│ │ ├── DateEntity.java
│ │ ├── ToManyTargetEntity.java
│ │ ├── SqliteMaster.java
│ │ ├── AnActiveEntity.java
│ │ ├── SpecialNamesEntity.java
│ │ ├── AbcdefEntity.java
│ │ └── SimpleEntity.java
│ │ └── daotest2
│ │ ├── to1_specialentity
│ │ └── ToOneTarget2.java
│ │ ├── KeepEntity.java
│ │ ├── ToManyTarget2.java
│ │ └── dao
│ │ ├── DaoMaster.java
│ │ ├── KeepEntityDao.java
│ │ └── DaoSession.java
├── .project
└── proguard.cfg
├── PerformanceTestOrmLite
├── .gitignore
├── .settings
│ └── org.eclipse.core.resources.prefs
├── lib
│ ├── ormlite-core-4.34-SNAPSHOT.jar
│ └── ormlite-android-4.34-SNAPSHOT.jar
├── project.properties
├── AndroidManifest.xml
├── src
│ └── de
│ │ └── greenrobot
│ │ └── performance
│ │ └── ormlite
│ │ ├── MinimalEntity.java
│ │ ├── SimpleEntityNotNullHelper.java
│ │ ├── DbHelper.java
│ │ └── SimpleEntityNotNull.java
├── .classpath
├── .project
└── proguard.cfg
├── DaoCore
├── .gitignore
├── res
│ └── values
│ │ └── dummy.xml
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
├── libs
│ └── commons-lang3-3.0.1.jar
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── NOTICE
├── AndroidManifest.xml
├── src
│ └── de
│ │ └── greenrobot
│ │ └── dao
│ │ ├── annotations
│ │ └── SerializedField.java
│ │ ├── IdentityScopeType.java
│ │ ├── CountQuery.java
│ │ ├── CloseableListIterator.java
│ │ ├── Command.java
│ │ ├── IdentityScope.java
│ │ ├── test
│ │ ├── AbstractDaoTestStringPk.java
│ │ ├── AbstractDaoTestLongPk.java
│ │ ├── AbstractDaoSessionTest.java
│ │ ├── DbTest.java
│ │ └── AbstractDaoTest.java
│ │ ├── DaoException.java
│ │ ├── AbstractDaoMaster.java
│ │ ├── UnitTestDaoAccess.java
│ │ ├── DeleteQuery.java
│ │ ├── AbstractQuery.java
│ │ └── DaoLog.java
├── .classpath
├── project.properties
├── proguard-project.txt
├── .project
├── mybuild.xml
├── proguard.cfg
├── build.gradle
└── gradlew.bat
├── DaoGenerator
├── .gitignore
├── lib
│ └── freemarker.jar
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
├── performance
│ ├── galaxy-nexus.xlsx
│ └── performance-data.xlsx
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .project
├── .classpath
├── src-template
│ ├── annotation.ftl
│ ├── serialize-helper.ftl
│ ├── enum-helper.ftl
│ ├── dao-unit-test.ftl
│ └── entity.ftl
├── src
│ └── de
│ │ └── greenrobot
│ │ └── daogenerator
│ │ ├── PropertyType.java
│ │ ├── QueryParam.java
│ │ ├── Index.java
│ │ ├── Query.java
│ │ ├── Annotation.java
│ │ ├── EnumProperty.java
│ │ ├── PropertyOrderList.java
│ │ └── DaoUtil.java
├── .freemarker-ide.xml
├── build.gradle
├── gradlew.bat
└── src-test
│ └── de
│ └── greenrobot
│ └── daogenerator
│ └── test
│ └── SimpleDaoGeneratorTest.java
├── .arcconfig
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | local.properties
3 |
--------------------------------------------------------------------------------
/DaoExample/.gitignore:
--------------------------------------------------------------------------------
1 | /bin
2 | /gen
3 |
--------------------------------------------------------------------------------
/DaoExampleGenerator/.gitignore:
--------------------------------------------------------------------------------
1 | /bin
2 |
--------------------------------------------------------------------------------
/DaoTest/.gitignore:
--------------------------------------------------------------------------------
1 | /gen
2 | /DaoCore_src
3 | /bin
4 |
--------------------------------------------------------------------------------
/PerformanceTestOrmLite/.gitignore:
--------------------------------------------------------------------------------
1 | /gen
2 | /bin
3 |
--------------------------------------------------------------------------------
/DaoCore/.gitignore:
--------------------------------------------------------------------------------
1 | /gen
2 | /bin
3 | /release
4 | .gradle
5 | build
6 |
--------------------------------------------------------------------------------
/DaoGenerator/.gitignore:
--------------------------------------------------------------------------------
1 | /test-out
2 | /release
3 | /bin
4 | build
5 | .gradle
6 |
--------------------------------------------------------------------------------
/DaoExample/libs/greenDAO.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/path/greenDAO/HEAD/DaoExample/libs/greenDAO.jar
--------------------------------------------------------------------------------
/DaoCore/res/values/dummy.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/DaoGenerator/lib/freemarker.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/path/greenDAO/HEAD/DaoGenerator/lib/freemarker.jar
--------------------------------------------------------------------------------
/DaoTest/res/values/dummy.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/DaoCore/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=Cp1252
3 |
--------------------------------------------------------------------------------
/DaoTest/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=Cp1252
3 |
--------------------------------------------------------------------------------
/DaoCore/libs/commons-lang3-3.0.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/path/greenDAO/HEAD/DaoCore/libs/commons-lang3-3.0.1.jar
--------------------------------------------------------------------------------
/DaoExample/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=Cp1252
3 |
--------------------------------------------------------------------------------
/DaoExample/docs/greenDAO-javadoc.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/path/greenDAO/HEAD/DaoExample/docs/greenDAO-javadoc.jar
--------------------------------------------------------------------------------
/DaoExample/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/path/greenDAO/HEAD/DaoExample/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/DaoExample/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/path/greenDAO/HEAD/DaoExample/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/DaoExample/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/path/greenDAO/HEAD/DaoExample/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/DaoGenerator/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=Cp1252
3 |
--------------------------------------------------------------------------------
/DaoExampleGenerator/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=Cp1252
3 |
--------------------------------------------------------------------------------
/DaoCore/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/path/greenDAO/HEAD/DaoCore/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/DaoGenerator/performance/galaxy-nexus.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/path/greenDAO/HEAD/DaoGenerator/performance/galaxy-nexus.xlsx
--------------------------------------------------------------------------------
/PerformanceTestOrmLite/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding/=Cp1252
3 |
--------------------------------------------------------------------------------
/.arcconfig:
--------------------------------------------------------------------------------
1 | {
2 | "project_id": "Path GreenDao",
3 | "conduit_uri": "https://phabricator.path.com/",
4 | "immutable_history": false
5 | }
6 |
--------------------------------------------------------------------------------
/DaoGenerator/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/path/greenDAO/HEAD/DaoGenerator/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/DaoGenerator/performance/performance-data.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/path/greenDAO/HEAD/DaoGenerator/performance/performance-data.xlsx
--------------------------------------------------------------------------------
/DaoTest/src/de/greenrobot/daotest/TestSuperclass.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.daotest;
2 |
3 | public class TestSuperclass {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/DaoTest/src/de/greenrobot/daotest/TestInterface.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.daotest;
2 |
3 | public interface TestInterface {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/DaoCore/NOTICE:
--------------------------------------------------------------------------------
1 | greenrobot greenDAO
2 | Copyright 2011 greenrobot.de
3 |
4 | This product includes software developed at greenrobot.de (http://greenrobot.de/).
--------------------------------------------------------------------------------
/PerformanceTestOrmLite/lib/ormlite-core-4.34-SNAPSHOT.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/path/greenDAO/HEAD/PerformanceTestOrmLite/lib/ormlite-core-4.34-SNAPSHOT.jar
--------------------------------------------------------------------------------
/DaoExample/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | greenDAO Note Example
4 |
5 |
--------------------------------------------------------------------------------
/PerformanceTestOrmLite/lib/ormlite-android-4.34-SNAPSHOT.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/path/greenDAO/HEAD/PerformanceTestOrmLite/lib/ormlite-android-4.34-SNAPSHOT.jar
--------------------------------------------------------------------------------
/DaoTest/src/de/greenrobot/daotest/query/QueryBuilderOrderTest.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/path/greenDAO/HEAD/DaoTest/src/de/greenrobot/daotest/query/QueryBuilderOrderTest.java
--------------------------------------------------------------------------------
/DaoCore/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jan 31 13:05:10 PST 2014
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip
7 |
--------------------------------------------------------------------------------
/DaoGenerator/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jan 31 13:03:24 PST 2014
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-bin.zip
7 |
--------------------------------------------------------------------------------
/DaoCore/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DaoTest/assets/minimal-entity.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE MINIMAL_ENTITY (_id INTEGER PRIMARY KEY);
2 | INSERT INTO MINIMAL_ENTITY VALUES (1);
3 | INSERT INTO MINIMAL_ENTITY
4 | VALUES (2);
5 | INSERT INTO MINIMAL_ENTITY VALUES (3) ;
6 | INSERT INTO MINIMAL_ENTITY VALUES (4);
7 | INSERT INTO MINIMAL_ENTITY VALUES (5) ;
8 |
--------------------------------------------------------------------------------
/DaoCore/src/de/greenrobot/dao/annotations/SerializedField.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.dao.annotations;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.RetentionPolicy;
5 |
6 | /**
7 | * add this annotation to a field that will be serialized into db
8 | */
9 | @Retention(RetentionPolicy.RUNTIME)
10 | public @interface SerializedField {
11 | }
12 |
--------------------------------------------------------------------------------
/DaoCore/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/DaoExample/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-4
12 |
--------------------------------------------------------------------------------
/PerformanceTestOrmLite/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-4
12 |
--------------------------------------------------------------------------------
/DaoCore/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | android.library=true
11 | # Project target.
12 | target=android-4
13 |
--------------------------------------------------------------------------------
/DaoTest/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/DaoTest/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | android.library.reference.1=../DaoCore
11 | # Project target.
12 | target=android-4
13 |
--------------------------------------------------------------------------------
/DaoGenerator/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | DaoGenerator
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/DaoExampleGenerator/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | DaoExampleGenerator
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/DaoExample/src-gen/de/greenrobot/daoexample/Customer.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.daoexample;
2 |
3 |
4 |
5 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
6 | /**
7 | * Entity mapped to table CUSTOMER.
8 | */
9 | public class Customer extends CustomerBase {
10 | public Customer() {
11 | }
12 |
13 | public Customer(Long id) {
14 | super(id);
15 | }
16 |
17 | public Customer(Long id, String name) {
18 | super(id, name);
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/PerformanceTestOrmLite/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/PerformanceTestOrmLite/src/de/greenrobot/performance/ormlite/MinimalEntity.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.performance.ormlite;
2 |
3 | import com.j256.ormlite.field.DatabaseField;
4 | import com.j256.ormlite.table.DatabaseTable;
5 |
6 | @DatabaseTable(tableName = "MINIMAL_ENTITY")
7 | public class MinimalEntity {
8 |
9 | @DatabaseField(id = true, columnName="_id")
10 | private Long id;
11 |
12 | public Long getId() {
13 | return id;
14 | }
15 |
16 | public void setId(Long id) {
17 | this.id = id;
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/PerformanceTestOrmLite/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/DaoExample/src-gen/de/greenrobot/daoexample/Order.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.daoexample;
2 |
3 |
4 |
5 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
6 | /**
7 | * Entity mapped to table ORDERS.
8 | */
9 | public class Order extends OrderBase {
10 | public Order() {
11 | }
12 |
13 | public Order(Long id) {
14 | super(id);
15 | }
16 |
17 | public Order(Long id, java.util.Date date, long customerId, byte[] serializedCustomer) {
18 | super(id, date, customerId, serializedCustomer);
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/DaoTest/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/DaoGenerator/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/DaoTest/src-gen/de/greenrobot/daotest/AutoincrementEntity.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.daotest;
2 |
3 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
4 | /**
5 | * Entity mapped to table AUTOINCREMENT_ENTITY.
6 | */
7 | public class AutoincrementEntity {
8 |
9 | private Long id;
10 |
11 | public AutoincrementEntity() {
12 | }
13 |
14 | public AutoincrementEntity(Long id) {
15 | this.id = id;
16 | }
17 |
18 | public Long getId() {
19 | return id;
20 | }
21 |
22 | public void setId(Long id) {
23 | this.id = id;
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/DaoExampleGenerator/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/DaoCore/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | #Sat Jan 28 16:28:19 CET 2012
2 | eclipse.preferences.version=1
3 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6 | org.eclipse.jdt.core.compiler.compliance=1.6
7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.source=1.6
13 |
--------------------------------------------------------------------------------
/DaoExample/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | #Sat Jan 28 16:28:37 CET 2012
2 | eclipse.preferences.version=1
3 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6 | org.eclipse.jdt.core.compiler.compliance=1.6
7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.source=1.6
13 |
--------------------------------------------------------------------------------
/DaoTest/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | #Sat Jan 28 16:28:53 CET 2012
2 | eclipse.preferences.version=1
3 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6 | org.eclipse.jdt.core.compiler.compliance=1.6
7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.source=1.6
13 |
--------------------------------------------------------------------------------
/DaoGenerator/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | #Fri Jul 22 21:20:49 CEST 2011
2 | eclipse.preferences.version=1
3 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6 | org.eclipse.jdt.core.compiler.compliance=1.6
7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.source=1.6
13 |
--------------------------------------------------------------------------------
/DaoExampleGenerator/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | #Wed Aug 03 11:42:59 CEST 2011
2 | eclipse.preferences.version=1
3 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6 | org.eclipse.jdt.core.compiler.compliance=1.6
7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.source=1.6
13 |
--------------------------------------------------------------------------------
/DaoExample/src-gen/de/greenrobot/daoexample/Note.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.daoexample;
2 |
3 |
4 |
5 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
6 | /**
7 | * Entity mapped to table NOTE.
8 | */
9 | @Test
10 | @Test2( singleValueeee )
11 | @Test3( key2 = "value2", key1 = 5 )
12 | @Test4( key2 = "value2", key1 = null )
13 | public class Note extends NoteBase {
14 | public Note() {
15 | }
16 |
17 | public Note(Long id) {
18 | super(id);
19 | }
20 |
21 | public Note(Long id, String text, String comment, java.util.Date date, Integer __gender, java.util.List userIds) {
22 | super(id, text, comment, date, __gender, userIds);
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/DaoExample/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/DaoGenerator/src-template/annotation.ftl:
--------------------------------------------------------------------------------
1 | <#macro print_annotation annotation prefix>
2 | ${prefix}@${annotation.name}<#rt>
3 | <@compress single_line=true>
4 | <#if annotation.parameters?has_content>
5 | (
6 | <#assign keys = annotation.parameters?keys>
7 | <#list keys as key>
8 | <#if key != annotation_no_name>
9 | ${key} =
10 | #if>
11 | ${annotation.parameters[key]}<#t>
12 | <#if key_has_next>,<#t> #if>
13 | #list>
14 | )
15 | #if>
16 | @compress>
17 | #macro>
18 |
19 | <#macro print_annotations annotations prefix>
20 | <#list annotations as annotation>
21 | <@print_annotation annotation, prefix/>
22 |
23 | #list>
24 | #macro>
--------------------------------------------------------------------------------
/DaoCore/src/de/greenrobot/dao/IdentityScopeType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Markus Junginger, greenrobot (http://greenrobot.de)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package de.greenrobot.dao;
17 |
18 | public enum IdentityScopeType {
19 | Session, None
20 | }
21 |
--------------------------------------------------------------------------------
/DaoCore/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/DaoExample/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/DaoTest/src-gen/de/greenrobot/daotest2/to1_specialentity/ToOneTarget2.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.daotest2.to1_specialentity;
2 |
3 | // THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
4 |
5 | // KEEP INCLUDES - put your custom includes here
6 | // KEEP INCLUDES END
7 | /**
8 | * Entity mapped to table TO_ONE_TARGET2.
9 | */
10 | public class ToOneTarget2 {
11 |
12 | private Long id;
13 |
14 | // KEEP FIELDS - put your custom fields here
15 | // KEEP FIELDS END
16 |
17 | public ToOneTarget2() {
18 | }
19 |
20 | public ToOneTarget2(Long id) {
21 | this.id = id;
22 | }
23 |
24 | public Long getId() {
25 | return id;
26 | }
27 |
28 | public void setId(Long id) {
29 | this.id = id;
30 | }
31 |
32 | // KEEP METHODS - put your custom methods here
33 | // KEEP METHODS END
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/DaoGenerator/src-template/serialize-helper.ftl:
--------------------------------------------------------------------------------
1 | <#include "*/annotation.ftl">
2 | <#macro print_serialization_stub stub>
3 | <@print_annotations stub.getterAnnotations, " "/>
4 | public ${stub.className} get${stub.propertyName?cap_first}() {
5 | if(${stub.propertyName} == null && ${stub.property.propertyName} != null) {
6 | ${stub.propertyName} = (${stub.className}) DbUtils.deserializeObject(${stub.property.propertyName}, ${stub.genericClassName}.class);
7 | ${stub.property.propertyName} = null; //clear memory, before save, we'll re-serialize anyways if needed
8 | }
9 | return ${stub.propertyName};
10 | }
11 |
12 | <@print_annotations stub.setterAnnotations, " "/>
13 | public void set${stub.propertyName?cap_first}(${stub.className} ${stub.propertyName}) {
14 | this.${stub.propertyName} = ${stub.propertyName};
15 | ${stub.property.propertyName} = null; //onBeforeSave will do serialization
16 | }
17 | #macro>
--------------------------------------------------------------------------------
/DaoTest/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | DaoTest
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/DaoExample/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | DaoExample
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/PerformanceTestOrmLite/src/de/greenrobot/performance/ormlite/SimpleEntityNotNullHelper.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.performance.ormlite;
2 |
3 | public class SimpleEntityNotNullHelper {
4 | protected static SimpleEntityNotNull createEntity(Long key) {
5 | if (key == null) {
6 | return null;
7 | }
8 | SimpleEntityNotNull entity = new SimpleEntityNotNull();
9 | entity.setId(key);
10 | entity.setSimpleBoolean(true);
11 | entity.setSimpleByte(Byte.MAX_VALUE);
12 | entity.setSimpleShort(Short.MAX_VALUE);
13 | entity.setSimpleInt(Integer.MAX_VALUE);
14 | entity.setSimpleLong(Long.MAX_VALUE);
15 | entity.setSimpleFloat(Float.MAX_VALUE);
16 | entity.setSimpleDouble(Double.MAX_VALUE);
17 | entity.setSimpleString("greenrobot greenDAO");
18 | byte[] bytes = { 42, -17, 23, 0, 127, -128 };
19 | entity.setSimpleByteArray(bytes);
20 | return entity;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/PerformanceTestOrmLite/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | PerformanceTestOrmLite
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/DaoTest/src-gen/de/greenrobot/daotest/StringKeyValueEntity.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.daotest;
2 |
3 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
4 | /**
5 | * Entity mapped to table STRING_KEY_VALUE_ENTITY.
6 | */
7 | public class StringKeyValueEntity {
8 |
9 | private String key;
10 | private String value;
11 |
12 | public StringKeyValueEntity() {
13 | }
14 |
15 | public StringKeyValueEntity(String key) {
16 | this.key = key;
17 | }
18 |
19 | public StringKeyValueEntity(String key, String value) {
20 | this.key = key;
21 | this.value = value;
22 | }
23 |
24 | public String getKey() {
25 | return key;
26 | }
27 |
28 | public void setKey(String key) {
29 | this.key = key;
30 | }
31 |
32 | public String getValue() {
33 | return value;
34 | }
35 |
36 | public void setValue(String value) {
37 | this.value = value;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/DaoGenerator/src-template/enum-helper.ftl:
--------------------------------------------------------------------------------
1 | <#include "*/annotation.ftl">
2 | <#macro print_enum_stub stub>
3 | <@print_annotations stub.getterAnnotations, " "/>
4 | public ${stub.className} get${stub.propertyName?cap_first}() {
5 | if(${stub.propertyName} == null && ${stub.property.propertyName} != null) {
6 | try {
7 | ${stub.propertyName} = ${stub.className}.values()[${stub.property.propertyName}];
8 | } catch(Throwable t) {
9 | //silent fail
10 | }
11 | }
12 | return ${stub.propertyName};
13 | }
14 |
15 | <@print_annotations stub.setterAnnotations, " "/>
16 | public void set${stub.propertyName?cap_first}(${stub.className} ${stub.propertyName}) {
17 | this.${stub.propertyName} = ${stub.propertyName};
18 | if( this.${stub.propertyName} == null) {
19 | ${stub.property.propertyName} = null;
20 | } else {
21 | ${stub.property.propertyName} = this.${stub.propertyName}.ordinal();
22 | }
23 | }
24 | #macro>
--------------------------------------------------------------------------------
/DaoTest/src-gen/de/greenrobot/daotest2/KeepEntity.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.daotest2;
2 |
3 | // THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
4 |
5 | // KEEP INCLUDES - put your custom includes here
6 | import android.os.Build;
7 | // KEEP INCLUDES END
8 | /**
9 | * Entity mapped to table KEEP_ENTITY.
10 | */
11 | public class KeepEntity {
12 |
13 | private Long id;
14 |
15 | // KEEP FIELDS - put your custom fields here
16 | String extra = Build.VERSION.SDK;
17 | // KEEP FIELDS END
18 |
19 | public KeepEntity() {
20 | }
21 |
22 | public KeepEntity(Long id) {
23 | this.id = id;
24 | }
25 |
26 | public Long getId() {
27 | return id;
28 | }
29 |
30 | public void setId(Long id) {
31 | this.id = id;
32 | }
33 |
34 | // KEEP METHODS - put your custom methods here
35 | @Override
36 | public String toString() {
37 | return "KeepEntity ID=42 (extra=" + extra + ")";
38 | }
39 | // KEEP METHODS END
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/DaoTest/src/de/greenrobot/daotest/entity/SqliteMasterTest.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.daotest.entity;
2 |
3 | import java.util.List;
4 |
5 | import de.greenrobot.dao.DaoLog;
6 | import de.greenrobot.dao.test.AbstractDaoTest;
7 | import de.greenrobot.daotest.SqliteMaster;
8 | import de.greenrobot.daotest.SqliteMasterDao;
9 | import de.greenrobot.daotest.SqliteMasterDao.Properties;
10 |
11 | public class SqliteMasterTest extends AbstractDaoTest {
12 |
13 | public SqliteMasterTest() {
14 | super(SqliteMasterDao.class);
15 | }
16 |
17 | public void testLoadAll() {
18 | List all = dao.loadAll();
19 | for (SqliteMaster meta : all) {
20 | DaoLog.v(meta.toString());
21 | }
22 | }
23 |
24 | public void testQueryRaw() {
25 | List tables = dao.queryRaw("WHERE " + Properties.Type.columnName + "=?", "table");
26 | for (SqliteMaster table : tables) {
27 | DaoLog.v(table.toString());
28 | }
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/DaoTest/src-gen/de/greenrobot/daotest/ExtendsImplementsEntity.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.daotest;
2 |
3 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
4 | /**
5 | * Entity mapped to table EXTENDS_IMPLEMENTS_ENTITY.
6 | */
7 | public class ExtendsImplementsEntity extends TestSuperclass implements TestInterface, java.io.Serializable {
8 |
9 | private Long id;
10 | private String text;
11 |
12 | public ExtendsImplementsEntity() {
13 | }
14 |
15 | public ExtendsImplementsEntity(Long id) {
16 | this.id = id;
17 | }
18 |
19 | public ExtendsImplementsEntity(Long id, String text) {
20 | this.id = id;
21 | this.text = text;
22 | }
23 |
24 | public Long getId() {
25 | return id;
26 | }
27 |
28 | public void setId(Long id) {
29 | this.id = id;
30 | }
31 |
32 | public String getText() {
33 | return text;
34 | }
35 |
36 | public void setText(String text) {
37 | this.text = text;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/DaoExample/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
20 |
26 |
27 |
31 |
32 |
--------------------------------------------------------------------------------
/DaoTest/src/de/greenrobot/daotest/entity/StringKeyValueEntityTest.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.daotest.entity;
2 |
3 | import junit.framework.Assert;
4 | import de.greenrobot.dao.test.AbstractDaoTestStringPk;
5 | import de.greenrobot.daotest.StringKeyValueEntity;
6 | import de.greenrobot.daotest.StringKeyValueEntityDao;
7 |
8 | public class StringKeyValueEntityTest extends AbstractDaoTestStringPk {
9 |
10 | public StringKeyValueEntityTest() {
11 | super(StringKeyValueEntityDao.class);
12 | }
13 |
14 | @Override
15 | protected StringKeyValueEntity createEntity(String key) {
16 | StringKeyValueEntity entity = new StringKeyValueEntity();
17 | entity.setKey(key);
18 | return entity;
19 | }
20 |
21 | public void testInsertWithoutPK() {
22 | StringKeyValueEntity entity = createEntity(null);
23 | try {
24 | dao.insert(entity);
25 | Assert.fail("Insert without pre-set PK succeeded");
26 | } catch (Exception e) {
27 | // Expected
28 | }
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/DaoCore/src/de/greenrobot/dao/CountQuery.java:
--------------------------------------------------------------------------------
1 | package de.greenrobot.dao;
2 |
3 | import java.util.Collection;
4 |
5 | import android.database.Cursor;
6 |
7 | public class CountQuery extends AbstractQuery {
8 |
9 | protected CountQuery(AbstractDao dao, String sql, Collection