Showing preview only (1,191K chars total). Download the full file or copy to clipboard to get everything.
Repository: greenrobot/greenDAO
Branch: master
Commit: 0bbb338e17c4
Files: 305
Total size: 1.1 MB
Directory structure:
gitextract_u02juyft/
├── .gitignore
├── .travis.yml
├── CONTRIBUTING.md
├── DaoCore/
│ ├── .gitignore
│ ├── LICENSE
│ ├── NOTICE
│ ├── build.gradle
│ ├── libs/
│ │ └── sqlcipher.jar
│ └── src/
│ └── main/
│ └── java/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ ├── AbstractDao.java
│ ├── AbstractDaoMaster.java
│ ├── AbstractDaoSession.java
│ ├── DaoException.java
│ ├── DaoLog.java
│ ├── DbUtils.java
│ ├── InternalQueryDaoAccess.java
│ ├── InternalUnitTestDaoAccess.java
│ ├── Property.java
│ ├── async/
│ │ ├── AsyncDaoException.java
│ │ ├── AsyncOperation.java
│ │ ├── AsyncOperationExecutor.java
│ │ ├── AsyncOperationListener.java
│ │ └── AsyncSession.java
│ ├── database/
│ │ ├── Database.java
│ │ ├── DatabaseOpenHelper.java
│ │ ├── DatabaseStatement.java
│ │ ├── EncryptedDatabase.java
│ │ ├── EncryptedDatabaseStatement.java
│ │ ├── SqlCipherEncryptedHelper.java
│ │ ├── StandardDatabase.java
│ │ └── StandardDatabaseStatement.java
│ ├── identityscope/
│ │ ├── IdentityScope.java
│ │ ├── IdentityScopeLong.java
│ │ ├── IdentityScopeObject.java
│ │ └── IdentityScopeType.java
│ ├── internal/
│ │ ├── DaoConfig.java
│ │ ├── FastCursor.java
│ │ ├── LongHashMap.java
│ │ ├── SqlUtils.java
│ │ └── TableStatements.java
│ ├── query/
│ │ ├── AbstractQuery.java
│ │ ├── AbstractQueryData.java
│ │ ├── AbstractQueryWithLimit.java
│ │ ├── CloseableListIterator.java
│ │ ├── CountQuery.java
│ │ ├── CursorQuery.java
│ │ ├── DeleteQuery.java
│ │ ├── Join.java
│ │ ├── LazyList.java
│ │ ├── Query.java
│ │ ├── QueryBuilder.java
│ │ ├── WhereCollector.java
│ │ └── WhereCondition.java
│ ├── rx/
│ │ ├── RxBase.java
│ │ ├── RxDao.java
│ │ ├── RxQuery.java
│ │ ├── RxTransaction.java
│ │ └── RxUtils.java
│ └── test/
│ ├── AbstractDaoSessionTest.java
│ ├── AbstractDaoTest.java
│ ├── AbstractDaoTestLongPk.java
│ ├── AbstractDaoTestSinglePk.java
│ ├── AbstractDaoTestStringPk.java
│ └── DbTest.java
├── DaoGenerator/
│ ├── .freemarker-ide.xml
│ ├── .gitignore
│ ├── build.gradle
│ ├── performance/
│ │ ├── galaxy-nexus.xlsx
│ │ └── performance-data.xlsx
│ ├── src/
│ │ └── org/
│ │ └── greenrobot/
│ │ └── greendao/
│ │ └── generator/
│ │ ├── ContentProvider.java
│ │ ├── DaoGenerator.java
│ │ ├── DaoUtil.java
│ │ ├── Entity.java
│ │ ├── Index.java
│ │ ├── Property.java
│ │ ├── PropertyOrderList.java
│ │ ├── PropertyType.java
│ │ ├── Query.java
│ │ ├── QueryParam.java
│ │ ├── Schema.java
│ │ ├── ToMany.java
│ │ ├── ToManyBase.java
│ │ ├── ToManyWithJoinEntity.java
│ │ └── ToOne.java
│ ├── src-template/
│ │ ├── content-provider.ftl
│ │ ├── dao-deep.ftl
│ │ ├── dao-master.ftl
│ │ ├── dao-session.ftl
│ │ ├── dao-unit-test.ftl
│ │ ├── dao.ftl
│ │ └── entity.ftl
│ └── src-test/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ └── generator/
│ └── SimpleDaoGeneratorTest.java
├── README.md
├── build.gradle
├── examples/
│ ├── DaoExample/
│ │ ├── build.gradle
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── org/
│ │ │ └── greenrobot/
│ │ │ └── greendao/
│ │ │ └── example/
│ │ │ └── NoteTest.java
│ │ └── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── org/
│ │ │ └── greenrobot/
│ │ │ └── greendao/
│ │ │ └── example/
│ │ │ ├── App.java
│ │ │ ├── Note.java
│ │ │ ├── NoteActivity.java
│ │ │ ├── NoteType.java
│ │ │ ├── NoteTypeConverter.java
│ │ │ └── NotesAdapter.java
│ │ └── res/
│ │ ├── layout/
│ │ │ ├── item_note.xml
│ │ │ └── main.xml
│ │ └── values/
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── RxDaoExample/
│ ├── build.gradle
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── org/
│ │ └── greenrobot/
│ │ └── greendao/
│ │ └── rxexample/
│ │ ├── App.java
│ │ ├── MainActivity.java
│ │ ├── Note.java
│ │ ├── NoteType.java
│ │ ├── NoteTypeConverter.java
│ │ └── NotesAdapter.java
│ └── res/
│ ├── layout/
│ │ ├── activity_main.xml
│ │ └── item_note.xml
│ └── values/
│ ├── colors.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── gradle/
│ ├── publish.gradle
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── greendao-api/
│ ├── LICENSE
│ ├── NOTICE
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ ├── annotation/
│ │ ├── Convert.java
│ │ ├── Entity.java
│ │ ├── Generated.java
│ │ ├── Id.java
│ │ ├── Index.java
│ │ ├── JoinEntity.java
│ │ ├── JoinProperty.java
│ │ ├── Keep.java
│ │ ├── NotNull.java
│ │ ├── OrderBy.java
│ │ ├── Property.java
│ │ ├── ToMany.java
│ │ ├── ToOne.java
│ │ ├── Transient.java
│ │ ├── Unique.java
│ │ └── apihint/
│ │ ├── Beta.java
│ │ ├── Experimental.java
│ │ └── Internal.java
│ └── converter/
│ └── PropertyConverter.java
├── javadoc-style/
│ └── stylesheet.css
├── settings.gradle
└── tests/
├── DaoTest/
│ ├── build.gradle
│ ├── proguard.cfg
│ ├── project.properties
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── org/
│ │ └── greenrobot/
│ │ └── greendao/
│ │ ├── daotest/
│ │ │ ├── DaoSessionConcurrentTest.java
│ │ │ ├── DaoSessionConcurrentWALTest.java
│ │ │ ├── DaoSessionTest.java
│ │ │ ├── DbTestTest.java
│ │ │ ├── DbUtilsTest.java
│ │ │ ├── DeadlockPreventionTest.java
│ │ │ ├── IndexTest.java
│ │ │ ├── LongHashMapTest.java
│ │ │ ├── async/
│ │ │ │ ├── AbstractAsyncTest.java
│ │ │ │ ├── BasicAsyncTest.java
│ │ │ │ └── MergeTxAsyncTest.java
│ │ │ ├── contentprovider/
│ │ │ │ └── SimpleEntityContentProviderTest.java
│ │ │ ├── encrypted/
│ │ │ │ ├── EncryptedDataFileTest.java
│ │ │ │ ├── EncryptedDatabaseOpenHelperTest.java
│ │ │ │ ├── EncryptedDbUtils.java
│ │ │ │ └── EncryptionSimpleEntityTest.java
│ │ │ ├── entity/
│ │ │ │ ├── AbcdefEntityTest.java
│ │ │ │ ├── AnActiveEntityMultithreadingTest.java
│ │ │ │ ├── AnActiveEntityTest.java
│ │ │ │ ├── AutoincrementEntityTest.java
│ │ │ │ ├── CustomTypeEntityTest.java
│ │ │ │ ├── DateEntityTest.java
│ │ │ │ ├── ExtendsImplementsEntityTest.java
│ │ │ │ ├── IndexedStringEntityTest.java
│ │ │ │ ├── JoinManyToDateEntityTest.java
│ │ │ │ ├── RelationEntityTest.java
│ │ │ │ ├── RelationEntityTestIdentityScope.java
│ │ │ │ ├── SimpleEntityNotNullTest.java
│ │ │ │ ├── SimpleEntityTest.java
│ │ │ │ ├── SpecialNamesEntityTest.java
│ │ │ │ ├── SqliteMasterTest.java
│ │ │ │ ├── StringKeyValueEntityIdentityScopeTest.java
│ │ │ │ ├── StringKeyValueEntityTest.java
│ │ │ │ ├── TestEntityIdentityScopeTest.java
│ │ │ │ ├── TestEntityTest.java
│ │ │ │ ├── TestEntityTestBase.java
│ │ │ │ ├── ToManyEntityTest.java
│ │ │ │ ├── ToManyTargetEntityTest.java
│ │ │ │ ├── TransactionTest.java
│ │ │ │ └── TreeEntityTest.java
│ │ │ ├── query/
│ │ │ │ ├── CountQueryTest.java
│ │ │ │ ├── CountQueryThreadLocalTest.java
│ │ │ │ ├── CursorQueryTest.java
│ │ │ │ ├── DeleteQueryTest.java
│ │ │ │ ├── DeleteQueryThreadLocalTest.java
│ │ │ │ ├── JoinTest.java
│ │ │ │ ├── LazyListTest.java
│ │ │ │ ├── QueryBuilderAndOrTest.java
│ │ │ │ ├── QueryBuilderOrderTest.java
│ │ │ │ ├── QueryBuilderSimpleTest.java
│ │ │ │ ├── QueryForThreadTest.java
│ │ │ │ ├── QueryLimitOffsetTest.java
│ │ │ │ ├── QuerySpecialNamesTest.java
│ │ │ │ └── RawQueryTest.java
│ │ │ └── rx/
│ │ │ ├── RxDaoTest.java
│ │ │ ├── RxQueryTest.java
│ │ │ ├── RxTestHelper.java
│ │ │ └── RxTransactionTest.java
│ │ └── daotest2/
│ │ └── entity/
│ │ └── KeepEntityTest.java
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ └── assets/
│ │ └── minimal-entity.sql
│ └── test/
│ └── java/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ └── unittest/
│ ├── DaoMaster.java
│ ├── DaoSession.java
│ ├── MinimalEntity.java
│ ├── MinimalEntityDao.java
│ ├── MinimalEntityTest.java
│ └── OptionalDepedenciesTest.java
├── DaoTestBase/
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ ├── daotest/
│ │ ├── AbcdefEntity.java
│ │ ├── AbcdefEntityDao.java
│ │ ├── AnActiveEntity.java
│ │ ├── AnActiveEntityDao.java
│ │ ├── AutoincrementEntity.java
│ │ ├── AutoincrementEntityDao.java
│ │ ├── CustomTypeEntity.java
│ │ ├── CustomTypeEntityDao.java
│ │ ├── DaoMaster.java
│ │ ├── DaoSession.java
│ │ ├── DateEntity.java
│ │ ├── DateEntityDao.java
│ │ ├── ExtendsImplementsEntity.java
│ │ ├── ExtendsImplementsEntityDao.java
│ │ ├── IndexedStringEntity.java
│ │ ├── IndexedStringEntityDao.java
│ │ ├── JoinManyToDateEntity.java
│ │ ├── JoinManyToDateEntityDao.java
│ │ ├── RelationEntity.java
│ │ ├── RelationEntityDao.java
│ │ ├── SimpleEntity.java
│ │ ├── SimpleEntityContentProvider.java
│ │ ├── SimpleEntityDao.java
│ │ ├── SimpleEntityNotNull.java
│ │ ├── SimpleEntityNotNullDao.java
│ │ ├── SpecialNamesEntity.java
│ │ ├── SpecialNamesEntityDao.java
│ │ ├── SqliteMaster.java
│ │ ├── SqliteMasterDao.java
│ │ ├── StringKeyValueEntity.java
│ │ ├── StringKeyValueEntityDao.java
│ │ ├── TestEntity.java
│ │ ├── TestEntityDao.java
│ │ ├── TestInterface.java
│ │ ├── TestSuperclass.java
│ │ ├── ToManyEntity.java
│ │ ├── ToManyEntityDao.java
│ │ ├── ToManyTargetEntity.java
│ │ ├── ToManyTargetEntityDao.java
│ │ ├── TreeEntity.java
│ │ ├── TreeEntityDao.java
│ │ ├── customtype/
│ │ │ ├── IntegerListConverter.java
│ │ │ ├── MyTimestamp.java
│ │ │ └── MyTimestampConverter.java
│ │ └── entity/
│ │ └── SimpleEntityNotNullHelper.java
│ └── daotest2/
│ ├── KeepEntity.java
│ ├── ToManyTarget2.java
│ ├── dao/
│ │ ├── DaoMaster.java
│ │ ├── DaoSession.java
│ │ ├── KeepEntityDao.java
│ │ └── ToManyTarget2Dao.java
│ ├── specialdao/
│ │ └── RelationSource2Dao.java
│ ├── specialentity/
│ │ └── RelationSource2.java
│ ├── to1_specialdao/
│ │ └── ToOneTarget2Dao.java
│ └── to1_specialentity/
│ └── ToOneTarget2.java
├── DaoTestEntityAnnotation/
│ ├── build.gradle
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── org/
│ │ └── greenrobot/
│ │ └── greendao/
│ │ └── test/
│ │ └── entityannotation/
│ │ ├── CustomerOrderTest.java
│ │ ├── CustomerTest.java
│ │ ├── NotNullThingTest.java
│ │ ├── OrderTest.java
│ │ └── TypesInInnerClassTest.java
│ └── main/
│ ├── AndroidManifest.xml
│ └── java/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ └── test/
│ └── entityannotation/
│ ├── Customer.java
│ ├── NotNullThing.java
│ ├── Order.java
│ └── TypesInInnerClass.java
├── DaoTestGenerator/
│ ├── build.gradle
│ └── src/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ └── generator/
│ └── gentest/
│ └── TestDaoGenerator.java
└── DaoTestPerformance/
├── build.gradle
└── src/
├── androidTest/
│ └── java/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ └── performance/
│ ├── Benchmark.java
│ ├── IndexedStringPerformanceTest.java
│ ├── LoockupPerformanceTest.java
│ ├── PerformanceTest.java
│ ├── PerformanceTestNotNull.java
│ ├── PerformanceTestNotNullIdentityScope.java
│ ├── ReflectionPerformanceTest.java
│ ├── StringGenerator.java
│ └── target/
│ ├── ArrayUtils.java
│ ├── LongHashMapAmarena2DZechner.java
│ ├── LongHashMapJDBM.java
│ └── LongSparseArray.java
└── main/
└── AndroidManifest.xml
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.gradle
*.iml
.idea/
out/
build/
local.properties
================================================
FILE: .travis.yml
================================================
# Use the Travis Container-Based Infrastructure
sudo: false
language: android
jdk:
- oraclejdk8
before_install:
# Install the rest of tools (e.g., avdmanager)
- yes | sdkmanager tools
# Install the system image
- yes | sdkmanager "system-images;android-18;default;armeabi-v7a"
# Create and start emulator for the script. Meant to race the install task.
- echo no | avdmanager create avd --force -n test -k "system-images;android-18;default;armeabi-v7a"
- $ANDROID_HOME/emulator/emulator -avd test -no-audio -no-window &
install: ./gradlew clean assemble assembleAndroidTest --stacktrace
before_script:
- android-wait-for-emulator
- adb shell input keyevent 82
script: ./gradlew check connectedCheck -x :tests:DaoTestPerformance:connectedCheck --stacktrace
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
================================================
FILE: CONTRIBUTING.md
================================================
Before you create an Issue...
=============================
There are better Places for Support
-----------------------------------
We want your question to be answered, so it is important that you ask at the right place. Be aware that an issue tracker is not the best place to ask for support. An issue tracker is used to track issues (bugs or feature requests).
Instead, please use [stackoverflow.com](https://stackoverflow.com/questions/tagged/greendao?sort=frequent) and use the tag [greendao](https://stackoverflow.com/tags/greendao/info) for your question.
Examples for support questions that are more likely to be answered on StackOverflow:
* Asking how something works
* Asking how to use greenDAO in a specific scenario
* Your app crashes/misbehaves and you are not sure why
The perfect Issue Report
------------------------
A couple of simple steps can save time for everyone.
Check before reporting:
* It's not a support inquiry
* You have read the docs
* You searched the web and stackoverflow
* You searched existing issues to avoid duplicates
Reporting bugs:
* Please investigate if is the bug is really caused by the library. Isolate the issue: what's the minimal code to reproduce the bug?
* Bonus steps to gain extra karma points: once you isolated and identified the issue, you can prepare an push request. Submit an unit test causing the bug, and ideally a fix for the bug.
Requesting features:
* Ask yourself: is the feature useful for a majority users? One of our major goals is to keep the API simple and concise. We do not want to cover all possible use cases, but those that make 80% of users happy.
Thanks for reading!
===================
It's your feedback that makes maintaining this library fun.
================================================
FILE: DaoCore/.gitignore
================================================
/gradle.properties
================================================
FILE: DaoCore/LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: DaoCore/NOTICE
================================================
greenrobot greenDAO (c) Copyright 2011-2016 by Markus Junginger / greenrobot.org
All rights reserved
This product includes software developed at greenrobot.org
================================================
FILE: DaoCore/build.gradle
================================================
apply plugin: 'java'
group = 'org.greenrobot'
archivesBaseName = 'greendao'
version = rootProject.version
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
mavenCentral()
}
dependencies {
compile project(':greendao-api')
compileOnly 'com.google.android:android:4.1.1.4'
compileOnly 'com.google.android:android-test:4.1.1.4'
compileOnly 'com.google.android:annotations:4.1.1.4'
compileOnly 'com.google.android:support-v4:r7'
compileOnly 'io.reactivex:rxjava:1.1.8'
compileOnly files('libs/sqlcipher.jar')
}
apply from: rootProject.file("gradle/publish.gradle")
javadoc {
failOnError = false
title = " greenDAO ${version} API"
options.bottom = 'Available under the Apache License, Version 2.0 - <i>Copyright © 2011-2020 <a href="https://greenrobot.org/">greenrobot.org</a>. All Rights Reserved.</i>'
excludes = ['org/greenrobot/dao/internal', 'org/greenrobot/dao/Internal*']
def srcApi = project(':greendao-api').file('src/main/java/')
if (!srcApi.directory) throw new GradleScriptException("Not a directory: ${srcApi}", null)
source += srcApi
doLast {
copy {
from '../javadoc-style'
into "build/docs/javadoc/"
}
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
// jar added by Java plugin.
archives javadocJar
archives sourcesJar
}
uploadArchives {
repositories {
mavenDeployer {
// Basic definitions are defined in root project
pom.project {
name 'greenDAO'
description 'greenDAO is a light and fast ORM for Android'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
}
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/AbstractDao.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao;
import android.database.CrossProcessCursor;
import android.database.Cursor;
import android.database.CursorWindow;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteStatement;
import org.greenrobot.greendao.annotation.apihint.Experimental;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseStatement;
import org.greenrobot.greendao.identityscope.IdentityScope;
import org.greenrobot.greendao.identityscope.IdentityScopeLong;
import org.greenrobot.greendao.internal.DaoConfig;
import org.greenrobot.greendao.internal.FastCursor;
import org.greenrobot.greendao.internal.TableStatements;
import org.greenrobot.greendao.query.Query;
import org.greenrobot.greendao.query.QueryBuilder;
import org.greenrobot.greendao.rx.RxDao;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import rx.schedulers.Schedulers;
/**
* Base class for all DAOs: Implements entity operations like insert, load, delete, and query.
* <p>
* This class is thread-safe.
*
* @param <T> Entity type
* @param <K> Primary key (PK) type; use Void if entity does not have exactly one PK
* @author Markus
*/
/*
* When operating on TX, statements, or identity scope the following locking order must be met to avoid deadlocks:
*
* 1.) If not inside a TX already, begin a TX to acquire a DB connection (connection is to be handled like a lock)
*
* 2.) The DatabaseStatement
*
* 3.) identityScope
*/
public abstract class AbstractDao<T, K> {
protected final DaoConfig config;
protected final Database db;
protected final boolean isStandardSQLite;
protected final IdentityScope<K, T> identityScope;
protected final IdentityScopeLong<T> identityScopeLong;
protected final TableStatements statements;
protected final AbstractDaoSession session;
protected final int pkOrdinal;
private volatile RxDao<T, K> rxDao;
private volatile RxDao<T, K> rxDaoPlain;
public AbstractDao(DaoConfig config) {
this(config, null);
}
@SuppressWarnings("unchecked")
public AbstractDao(DaoConfig config, AbstractDaoSession daoSession) {
this.config = config;
this.session = daoSession;
db = config.db;
isStandardSQLite = db.getRawDatabase() instanceof SQLiteDatabase;
identityScope = (IdentityScope<K, T>) config.getIdentityScope();
if (identityScope instanceof IdentityScopeLong) {
identityScopeLong = (IdentityScopeLong<T>) identityScope;
} else {
identityScopeLong = null;
}
statements = config.statements;
pkOrdinal = config.pkProperty != null ? config.pkProperty.ordinal : -1;
}
public AbstractDaoSession getSession() {
return session;
}
TableStatements getStatements() {
return config.statements;
}
public String getTablename() {
return config.tablename;
}
public Property[] getProperties() {
return config.properties;
}
public Property getPkProperty() {
return config.pkProperty;
}
public String[] getAllColumns() {
return config.allColumns;
}
public String[] getPkColumns() {
return config.pkColumns;
}
public String[] getNonPkColumns() {
return config.nonPkColumns;
}
/**
* Loads the entity for the given PK.
*
* @param key a PK value or null
* @return The entity or null, if no entity matched the PK value
*/
public T load(K key) {
assertSinglePk();
if (key == null) {
return null;
}
if (identityScope != null) {
T entity = identityScope.get(key);
if (entity != null) {
return entity;
}
}
String sql = statements.getSelectByKey();
String[] keyArray = new String[]{key.toString()};
Cursor cursor = db.rawQuery(sql, keyArray);
return loadUniqueAndCloseCursor(cursor);
}
public T loadByRowId(long rowId) {
String[] idArray = new String[]{Long.toString(rowId)};
Cursor cursor = db.rawQuery(statements.getSelectByRowId(), idArray);
return loadUniqueAndCloseCursor(cursor);
}
protected T loadUniqueAndCloseCursor(Cursor cursor) {
try {
return loadUnique(cursor);
} finally {
cursor.close();
}
}
protected T loadUnique(Cursor cursor) {
boolean available = cursor.moveToFirst();
if (!available) {
return null;
} else if (!cursor.isLast()) {
throw new DaoException("Expected unique result, but count was " + cursor.getCount());
}
return loadCurrent(cursor, 0, true);
}
/** Loads all available entities from the database. */
public List<T> loadAll() {
Cursor cursor = db.rawQuery(statements.getSelectAll(), null);
return loadAllAndCloseCursor(cursor);
}
/** Detaches an entity from the identity scope (session). Subsequent query results won't return this object. */
public boolean detach(T entity) {
if (identityScope != null) {
K key = getKeyVerified(entity);
return identityScope.detach(key, entity);
} else {
return false;
}
}
/**
* Detaches all entities (of type T) from the identity scope (session). Subsequent query results won't return any
* previously loaded objects.
*/
public void detachAll() {
if (identityScope != null) {
identityScope.clear();
}
}
protected List<T> loadAllAndCloseCursor(Cursor cursor) {
try {
return loadAllFromCursor(cursor);
} finally {
cursor.close();
}
}
/**
* Inserts the given entities in the database using a transaction.
*
* @param entities The entities to insert.
*/
public void insertInTx(Iterable<T> entities) {
insertInTx(entities, isEntityUpdateable());
}
/**
* Inserts the given entities in the database using a transaction.
*
* @param entities The entities to insert.
*/
public void insertInTx(T... entities) {
insertInTx(Arrays.asList(entities), isEntityUpdateable());
}
/**
* Inserts the given entities in the database using a transaction. The given entities will become tracked if the PK
* is set.
*
* @param entities The entities to insert.
* @param setPrimaryKey if true, the PKs of the given will be set after the insert; pass false to improve
* performance.
*/
public void insertInTx(Iterable<T> entities, boolean setPrimaryKey) {
DatabaseStatement stmt = statements.getInsertStatement();
executeInsertInTx(stmt, entities, setPrimaryKey);
}
/**
* Inserts or replaces the given entities in the database using a transaction. The given entities will become
* tracked if the PK is set.
*
* @param entities The entities to insert.
* @param setPrimaryKey if true, the PKs of the given will be set after the insert; pass false to improve
* performance.
*/
public void insertOrReplaceInTx(Iterable<T> entities, boolean setPrimaryKey) {
DatabaseStatement stmt = statements.getInsertOrReplaceStatement();
executeInsertInTx(stmt, entities, setPrimaryKey);
}
/**
* Inserts or replaces the given entities in the database using a transaction.
*
* @param entities The entities to insert.
*/
public void insertOrReplaceInTx(Iterable<T> entities) {
insertOrReplaceInTx(entities, isEntityUpdateable());
}
/**
* Inserts or replaces the given entities in the database using a transaction.
*
* @param entities The entities to insert.
*/
public void insertOrReplaceInTx(T... entities) {
insertOrReplaceInTx(Arrays.asList(entities), isEntityUpdateable());
}
private void executeInsertInTx(DatabaseStatement stmt, Iterable<T> entities, boolean setPrimaryKey) {
db.beginTransaction();
try {
synchronized (stmt) {
if (identityScope != null) {
identityScope.lock();
}
try {
if (isStandardSQLite) {
SQLiteStatement rawStmt = (SQLiteStatement) stmt.getRawStatement();
for (T entity : entities) {
bindValues(rawStmt, entity);
if (setPrimaryKey) {
long rowId = rawStmt.executeInsert();
updateKeyAfterInsertAndAttach(entity, rowId, false);
} else {
rawStmt.execute();
}
}
} else {
for (T entity : entities) {
bindValues(stmt, entity);
if (setPrimaryKey) {
long rowId = stmt.executeInsert();
updateKeyAfterInsertAndAttach(entity, rowId, false);
} else {
stmt.execute();
}
}
}
} finally {
if (identityScope != null) {
identityScope.unlock();
}
}
}
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
}
/**
* Insert an entity into the table associated with a concrete DAO.
*
* @return row ID of newly inserted entity
*/
public long insert(T entity) {
return executeInsert(entity, statements.getInsertStatement(), true);
}
/**
* Insert an entity into the table associated with a concrete DAO <b>without</b> setting key property.
* <p>
* Warning: This may be faster, but the entity should not be used anymore. The entity also won't be attached to
* identity scope.
*
* @return row ID of newly inserted entity
*/
public long insertWithoutSettingPk(T entity) {
return executeInsert(entity, statements.getInsertOrReplaceStatement(), false);
}
/**
* Insert an entity into the table associated with a concrete DAO.
*
* @return row ID of newly inserted entity
*/
public long insertOrReplace(T entity) {
return executeInsert(entity, statements.getInsertOrReplaceStatement(), true);
}
private long executeInsert(T entity, DatabaseStatement stmt, boolean setKeyAndAttach) {
long rowId;
if (db.isDbLockedByCurrentThread()) {
rowId = insertInsideTx(entity, stmt);
} else {
// Do TX to acquire a connection before locking the stmt to avoid deadlocks
db.beginTransaction();
try {
rowId = insertInsideTx(entity, stmt);
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
}
if (setKeyAndAttach) {
updateKeyAfterInsertAndAttach(entity, rowId, true);
}
return rowId;
}
private long insertInsideTx(T entity, DatabaseStatement stmt) {
synchronized (stmt) {
if (isStandardSQLite) {
SQLiteStatement rawStmt = (SQLiteStatement) stmt.getRawStatement();
bindValues(rawStmt, entity);
return rawStmt.executeInsert();
} else {
bindValues(stmt, entity);
return stmt.executeInsert();
}
}
}
protected void updateKeyAfterInsertAndAttach(T entity, long rowId, boolean lock) {
if (rowId != -1) {
K key = updateKeyAfterInsert(entity, rowId);
attachEntity(key, entity, lock);
} else {
// TODO When does this actually happen? Should we throw instead?
DaoLog.w("Could not insert row (executeInsert returned -1)");
}
}
/**
* "Saves" an entity to the database: depending on the existence of the key property, it will be inserted
* (key is null) or updated (key is not null).
* <p>
* This is similar to {@link #insertOrReplace(Object)}, but may be more efficient, because if a key is present,
* it does not have to query if that key already exists.
*/
public void save(T entity) {
if (hasKey(entity)) {
update(entity);
} else {
insert(entity);
}
}
/**
* Saves (see {@link #save(Object)}) the given entities in the database using a transaction.
*
* @param entities The entities to save.
*/
public void saveInTx(T... entities) {
saveInTx(Arrays.asList(entities));
}
/**
* Saves (see {@link #save(Object)}) the given entities in the database using a transaction.
*
* @param entities The entities to save.
*/
public void saveInTx(Iterable<T> entities) {
int updateCount = 0;
int insertCount = 0;
for (T entity : entities) {
if (hasKey(entity)) {
updateCount++;
} else {
insertCount++;
}
}
if (updateCount > 0 && insertCount > 0) {
List<T> toUpdate = new ArrayList<>(updateCount);
List<T> toInsert = new ArrayList<>(insertCount);
for (T entity : entities) {
if (hasKey(entity)) {
toUpdate.add(entity);
} else {
toInsert.add(entity);
}
}
db.beginTransaction();
try {
updateInTx(toUpdate);
insertInTx(toInsert);
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
} else if (insertCount > 0) {
insertInTx(entities);
} else if (updateCount > 0) {
updateInTx(entities);
}
}
/** Reads all available rows from the given cursor and returns a list of entities. */
protected List<T> loadAllFromCursor(Cursor cursor) {
int count = cursor.getCount();
if (count == 0) {
return new ArrayList<T>();
}
List<T> list = new ArrayList<T>(count);
CursorWindow window = null;
boolean useFastCursor = false;
if (cursor instanceof CrossProcessCursor) {
window = ((CrossProcessCursor) cursor).getWindow();
if (window != null) { // E.g. Robolectric has no Window at this point
if (window.getNumRows() == count) {
cursor = new FastCursor(window);
useFastCursor = true;
} else {
DaoLog.d("Window vs. result size: " + window.getNumRows() + "/" + count);
}
}
}
if (cursor.moveToFirst()) {
if (identityScope != null) {
identityScope.lock();
identityScope.reserveRoom(count);
}
try {
if (!useFastCursor && window != null && identityScope != null) {
loadAllUnlockOnWindowBounds(cursor, window, list);
} else {
do {
list.add(loadCurrent(cursor, 0, false));
} while (cursor.moveToNext());
}
} finally {
if (identityScope != null) {
identityScope.unlock();
}
}
}
return list;
}
private void loadAllUnlockOnWindowBounds(Cursor cursor, CursorWindow window, List<T> list) {
int windowEnd = window.getStartPosition() + window.getNumRows();
for (int row = 0; ; row++) {
list.add(loadCurrent(cursor, 0, false));
row++;
if (row >= windowEnd) {
window = moveToNextUnlocked(cursor);
if (window == null) {
break;
}
windowEnd = window.getStartPosition() + window.getNumRows();
} else {
if (!cursor.moveToNext()) {
break;
}
}
}
}
/**
* Unlock identityScope during cursor.moveToNext() when it is about to fill the window (needs a db connection):
* We should not hold the lock while trying to acquire a db connection to avoid deadlocks.
*/
private CursorWindow moveToNextUnlocked(Cursor cursor) {
identityScope.unlock();
try {
if (cursor.moveToNext()) {
return ((CrossProcessCursor) cursor).getWindow();
} else {
return null;
}
} finally {
identityScope.lock();
}
}
/** Internal use only. Considers identity scope. */
final protected T loadCurrent(Cursor cursor, int offset, boolean lock) {
if (identityScopeLong != null) {
if (offset != 0) {
// Occurs with deep loads (left outer joins)
if (cursor.isNull(pkOrdinal + offset)) {
return null;
}
}
long key = cursor.getLong(pkOrdinal + offset);
T entity = lock ? identityScopeLong.get2(key) : identityScopeLong.get2NoLock(key);
if (entity != null) {
return entity;
} else {
entity = readEntity(cursor, offset);
attachEntity(entity);
if (lock) {
identityScopeLong.put2(key, entity);
} else {
identityScopeLong.put2NoLock(key, entity);
}
return entity;
}
} else if (identityScope != null) {
K key = readKey(cursor, offset);
if (offset != 0 && key == null) {
// Occurs with deep loads (left outer joins)
return null;
}
T entity = lock ? identityScope.get(key) : identityScope.getNoLock(key);
if (entity != null) {
return entity;
} else {
entity = readEntity(cursor, offset);
attachEntity(key, entity, lock);
return entity;
}
} else {
// Check offset, assume a value !=0 indicating a potential outer join, so check PK
if (offset != 0) {
K key = readKey(cursor, offset);
if (key == null) {
// Occurs with deep loads (left outer joins)
return null;
}
}
T entity = readEntity(cursor, offset);
attachEntity(entity);
return entity;
}
}
/** Internal use only. Considers identity scope. */
final protected <O> O loadCurrentOther(AbstractDao<O, ?> dao, Cursor cursor, int offset) {
return dao.loadCurrent(cursor, offset, /* TODO check this */true);
}
/** A raw-style query where you can pass any WHERE clause and arguments. */
public List<T> queryRaw(String where, String... selectionArg) {
Cursor cursor = db.rawQuery(statements.getSelectAll() + where, selectionArg);
return loadAllAndCloseCursor(cursor);
}
/**
* Creates a repeatable {@link Query} object based on the given raw SQL where you can pass any WHERE clause and
* arguments.
*/
public Query<T> queryRawCreate(String where, Object... selectionArg) {
List<Object> argList = Arrays.asList(selectionArg);
return queryRawCreateListArgs(where, argList);
}
/**
* Creates a repeatable {@link Query} object based on the given raw SQL where you can pass any WHERE clause and
* arguments.
*/
public Query<T> queryRawCreateListArgs(String where, Collection<Object> selectionArg) {
return Query.internalCreate(this, statements.getSelectAll() + where, selectionArg.toArray());
}
public void deleteAll() {
// String sql = SqlUtils.createSqlDelete(config.tablename, null);
// db.execSQL(sql);
db.execSQL("DELETE FROM '" + config.tablename + "'");
if (identityScope != null) {
identityScope.clear();
}
}
/** Deletes the given entity from the database. Currently, only single value PK entities are supported. */
public void delete(T entity) {
assertSinglePk();
K key = getKeyVerified(entity);
deleteByKey(key);
}
/** Deletes an entity with the given PK from the database. Currently, only single value PK entities are supported. */
public void deleteByKey(K key) {
assertSinglePk();
DatabaseStatement stmt = statements.getDeleteStatement();
if (db.isDbLockedByCurrentThread()) {
synchronized (stmt) {
deleteByKeyInsideSynchronized(key, stmt);
}
} else {
// Do TX to acquire a connection before locking the stmt to avoid deadlocks
db.beginTransaction();
try {
synchronized (stmt) {
deleteByKeyInsideSynchronized(key, stmt);
}
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
}
if (identityScope != null) {
identityScope.remove(key);
}
}
private void deleteByKeyInsideSynchronized(K key, DatabaseStatement stmt) {
if (key instanceof Long) {
stmt.bindLong(1, (Long) key);
} else if (key == null) {
throw new DaoException("Cannot delete entity, key is null");
} else {
stmt.bindString(1, key.toString());
}
stmt.execute();
}
private void deleteInTxInternal(Iterable<T> entities, Iterable<K> keys) {
assertSinglePk();
DatabaseStatement stmt = statements.getDeleteStatement();
List<K> keysToRemoveFromIdentityScope = null;
db.beginTransaction();
try {
synchronized (stmt) {
if (identityScope != null) {
identityScope.lock();
keysToRemoveFromIdentityScope = new ArrayList<K>();
}
try {
if (entities != null) {
for (T entity : entities) {
K key = getKeyVerified(entity);
deleteByKeyInsideSynchronized(key, stmt);
if (keysToRemoveFromIdentityScope != null) {
keysToRemoveFromIdentityScope.add(key);
}
}
}
if (keys != null) {
for (K key : keys) {
deleteByKeyInsideSynchronized(key, stmt);
if (keysToRemoveFromIdentityScope != null) {
keysToRemoveFromIdentityScope.add(key);
}
}
}
} finally {
if (identityScope != null) {
identityScope.unlock();
}
}
}
db.setTransactionSuccessful();
if (keysToRemoveFromIdentityScope != null && identityScope != null) {
identityScope.remove(keysToRemoveFromIdentityScope);
}
} finally {
db.endTransaction();
}
}
/**
* Deletes the given entities in the database using a transaction.
*
* @param entities The entities to delete.
*/
public void deleteInTx(Iterable<T> entities) {
deleteInTxInternal(entities, null);
}
/**
* Deletes the given entities in the database using a transaction.
*
* @param entities The entities to delete.
*/
public void deleteInTx(T... entities) {
deleteInTxInternal(Arrays.asList(entities), null);
}
/**
* Deletes all entities with the given keys in the database using a transaction.
*
* @param keys Keys of the entities to delete.
*/
public void deleteByKeyInTx(Iterable<K> keys) {
deleteInTxInternal(null, keys);
}
/**
* Deletes all entities with the given keys in the database using a transaction.
*
* @param keys Keys of the entities to delete.
*/
public void deleteByKeyInTx(K... keys) {
deleteInTxInternal(null, Arrays.asList(keys));
}
/** Resets all locally changed properties of the entity by reloading the values from the database. */
public void refresh(T entity) {
assertSinglePk();
K key = getKeyVerified(entity);
String sql = statements.getSelectByKey();
String[] keyArray = new String[]{key.toString()};
Cursor cursor = db.rawQuery(sql, keyArray);
try {
boolean available = cursor.moveToFirst();
if (!available) {
throw new DaoException("Entity does not exist in the database anymore: " + entity.getClass()
+ " with key " + key);
} else if (!cursor.isLast()) {
throw new DaoException("Expected unique result, but count was " + cursor.getCount());
}
readEntity(cursor, entity, 0);
attachEntity(key, entity, true);
} finally {
cursor.close();
}
}
public void update(T entity) {
assertSinglePk();
DatabaseStatement stmt = statements.getUpdateStatement();
if (db.isDbLockedByCurrentThread()) {
synchronized (stmt) {
if (isStandardSQLite) {
updateInsideSynchronized(entity, (SQLiteStatement) stmt.getRawStatement(), true);
} else {
updateInsideSynchronized(entity, stmt, true);
}
}
} else {
// Do TX to acquire a connection before locking the stmt to avoid deadlocks
db.beginTransaction();
try {
synchronized (stmt) {
updateInsideSynchronized(entity, stmt, true);
}
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
}
}
public QueryBuilder<T> queryBuilder() {
return QueryBuilder.internalCreate(this);
}
protected void updateInsideSynchronized(T entity, DatabaseStatement stmt, boolean lock) {
// To do? Check if it's worth not to bind PKs here (performance).
bindValues(stmt, entity);
int index = config.allColumns.length + 1;
K key = getKey(entity);
if (key instanceof Long) {
stmt.bindLong(index, (Long) key);
} else if (key == null) {
throw new DaoException("Cannot update entity without key - was it inserted before?");
} else {
stmt.bindString(index, key.toString());
}
stmt.execute();
attachEntity(key, entity, lock);
}
protected void updateInsideSynchronized(T entity, SQLiteStatement stmt, boolean lock) {
// To do? Check if it's worth not to bind PKs here (performance).
bindValues(stmt, entity);
int index = config.allColumns.length + 1;
K key = getKey(entity);
if (key instanceof Long) {
stmt.bindLong(index, (Long) key);
} else if (key == null) {
throw new DaoException("Cannot update entity without key - was it inserted before?");
} else {
stmt.bindString(index, key.toString());
}
stmt.execute();
attachEntity(key, entity, lock);
}
/**
* Attaches the entity to the identity scope. Calls attachEntity(T entity).
*
* @param key Needed only for identity scope, pass null if there's none.
* @param entity The entitiy to attach
*/
protected final void attachEntity(K key, T entity, boolean lock) {
attachEntity(entity);
if (identityScope != null && key != null) {
if (lock) {
identityScope.put(key, entity);
} else {
identityScope.putNoLock(key, entity);
}
}
}
/**
* Sub classes with relations additionally set the DaoMaster here. Must be called before the entity is attached to
* the identity scope.
*
* @param entity The entitiy to attach
*/
protected void attachEntity(T entity) {
}
/**
* Updates the given entities in the database using a transaction.
*
* @param entities The entities to insert.
*/
public void updateInTx(Iterable<T> entities) {
DatabaseStatement stmt = statements.getUpdateStatement();
db.beginTransaction();
// txEx: just to preserve original exception in case another exceptions is thrown in endTransaction()
RuntimeException txEx = null;
try {
synchronized (stmt) {
if (identityScope != null) {
identityScope.lock();
}
try {
if (isStandardSQLite) {
SQLiteStatement rawStmt = (SQLiteStatement) stmt.getRawStatement();
for (T entity : entities) {
updateInsideSynchronized(entity, rawStmt, false);
}
} else {
for (T entity : entities) {
updateInsideSynchronized(entity, stmt, false);
}
}
} finally {
if (identityScope != null) {
identityScope.unlock();
}
}
}
db.setTransactionSuccessful();
} catch (RuntimeException e) {
txEx = e;
} finally {
try {
db.endTransaction();
} catch (RuntimeException e) {
if (txEx != null) {
DaoLog.w("Could not end transaction (rethrowing initial exception)", e);
throw txEx;
} else {
throw e;
}
}
}
if (txEx != null) {
throw txEx;
}
}
/**
* Updates the given entities in the database using a transaction.
*
* @param entities The entities to update.
*/
public void updateInTx(T... entities) {
updateInTx(Arrays.asList(entities));
}
protected void assertSinglePk() {
if (config.pkColumns.length != 1) {
throw new DaoException(this + " (" + config.tablename + ") does not have a single-column primary key");
}
}
public long count() {
return statements.getCountStatement().simpleQueryForLong();
}
/** See {@link #getKey(Object)}, but guarantees that the returned key is never null (throws if null). */
protected K getKeyVerified(T entity) {
K key = getKey(entity);
if (key == null) {
if (entity == null) {
throw new NullPointerException("Entity may not be null");
} else {
throw new DaoException("Entity has no key");
}
} else {
return key;
}
}
/**
* The returned RxDao is a special DAO that let's you interact with Rx Observables without any Scheduler set
* for subscribeOn.
*
* @see #rx()
*/
@Experimental
public RxDao<T, K> rxPlain() {
if (rxDaoPlain == null) {
rxDaoPlain = new RxDao<>(this);
}
return rxDaoPlain;
}
/**
* The returned RxDao is a special DAO that let's you interact with Rx Observables using RX's IO scheduler for
* subscribeOn.
*
* @see #rxPlain()
*/
@Experimental
public RxDao<T, K> rx() {
if (rxDao == null) {
rxDao = new RxDao<>(this, Schedulers.io());
}
return rxDao;
}
/** Gets the SQLiteDatabase for custom database access. Not needed for greenDAO entities. */
public Database getDatabase() {
return db;
}
/** Reads the values from the current position of the given cursor and returns a new entity. */
abstract protected T readEntity(Cursor cursor, int offset);
/** Reads the key from the current position of the given cursor, or returns null if there's no single-value key. */
abstract protected K readKey(Cursor cursor, int offset);
/** Reads the values from the current position of the given cursor into an existing entity. */
abstract protected void readEntity(Cursor cursor, T entity, int offset);
/** Binds the entity's values to the statement. Make sure to synchronize the statement outside of the method. */
abstract protected void bindValues(DatabaseStatement stmt, T entity);
/**
* Binds the entity's values to the statement. Make sure to synchronize the enclosing DatabaseStatement outside
* of the method.
*/
protected abstract void bindValues(SQLiteStatement stmt, T entity);
/**
* Updates the entity's key if possible (only for Long PKs currently). This method must always return the entity's
* key regardless of whether the key existed before or not.
*/
abstract protected K updateKeyAfterInsert(T entity, long rowId);
/**
* Returns the value of the primary key, if the entity has a single primary key, or, if not, null. Returns null if
* entity is null.
*/
abstract protected K getKey(T entity);
/**
* Returns true if the entity is not null, and has a non-null key, which is also != 0.
* entity is null.
*/
abstract protected boolean hasKey(T entity);
/** Returns true if the Entity class can be updated, e.g. for setting the PK after insert. */
abstract protected boolean isEntityUpdateable();
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/AbstractDaoMaster.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao;
import java.util.HashMap;
import java.util.Map;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;
/**
* The master of dao will guide you: start dao sessions with the master.
*
* @author Markus
*/
public abstract class AbstractDaoMaster {
protected final Database db;
protected final int schemaVersion;
protected final Map<Class<? extends AbstractDao<?, ?>>, DaoConfig> daoConfigMap;
public AbstractDaoMaster(Database db, int schemaVersion) {
this.db = db;
this.schemaVersion = schemaVersion;
daoConfigMap = new HashMap<Class<? extends AbstractDao<?, ?>>, DaoConfig>();
}
protected void registerDaoClass(Class<? extends AbstractDao<?, ?>> daoClass) {
DaoConfig daoConfig = new DaoConfig(db, daoClass);
daoConfigMap.put(daoClass, daoConfig);
}
public int getSchemaVersion() {
return schemaVersion;
}
/** Gets the SQLiteDatabase for custom database access. Not needed for greenDAO entities. */
public Database getDatabase() {
return db;
}
public abstract AbstractDaoSession newSession();
public abstract AbstractDaoSession newSession(IdentityScopeType type);
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/AbstractDaoSession.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import org.greenrobot.greendao.annotation.apihint.Experimental;
import org.greenrobot.greendao.async.AsyncSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.query.QueryBuilder;
import org.greenrobot.greendao.rx.RxTransaction;
import rx.schedulers.Schedulers;
/**
* DaoSession gives you access to your DAOs, offers convenient persistence methods, and also serves as a session cache.<br>
* <br>
* To access the DAOs, call the get{entity}Dao methods by the generated DaoSession sub class.<br>
* <br>
* DaoSession offers many of the available persistence operations on entities as a convenience. Consider using DAOs
* directly to access all available operations, especially if you call a lot of operations on a single entity type to
* avoid the overhead imposed by DaoSession (the overhead is small, but it may add up).<br>
* <br>
* By default, the DaoSession has a session cache (IdentityScopeType.Session). The session cache is not just a plain
* data cache to improve performance, but also manages object identities. For example, if you load the same entity twice
* in a query, you will get a single Java object instead of two when using a session cache. This is particular useful
* for relations pointing to a common set of entities.
*
* This class is thread-safe.
*
* @author Markus
*
*/
public class AbstractDaoSession {
private final Database db;
private final Map<Class<?>, AbstractDao<?, ?>> entityToDao;
private volatile RxTransaction rxTxPlain;
private volatile RxTransaction rxTxIo;
public AbstractDaoSession(Database db) {
this.db = db;
this.entityToDao = new HashMap<Class<?>, AbstractDao<?, ?>>();
}
protected <T> void registerDao(Class<T> entityClass, AbstractDao<T, ?> dao) {
entityToDao.put(entityClass, dao);
}
/** Convenient call for {@link AbstractDao#insert(Object)}. */
public <T> long insert(T entity) {
@SuppressWarnings("unchecked")
AbstractDao<T, ?> dao = (AbstractDao<T, ?>) getDao(entity.getClass());
return dao.insert(entity);
}
/** Convenient call for {@link AbstractDao#insertOrReplace(Object)}. */
public <T> long insertOrReplace(T entity) {
@SuppressWarnings("unchecked")
AbstractDao<T, ?> dao = (AbstractDao<T, ?>) getDao(entity.getClass());
return dao.insertOrReplace(entity);
}
/** Convenient call for {@link AbstractDao#refresh(Object)}. */
public <T> void refresh(T entity) {
@SuppressWarnings("unchecked")
AbstractDao<T, ?> dao = (AbstractDao<T, ?>) getDao(entity.getClass());
dao.refresh(entity);
}
/** Convenient call for {@link AbstractDao#update(Object)}. */
public <T> void update(T entity) {
@SuppressWarnings("unchecked")
AbstractDao<T, ?> dao = (AbstractDao<T, ?>) getDao(entity.getClass());
dao.update(entity);
}
/** Convenient call for {@link AbstractDao#delete(Object)}. */
public <T> void delete(T entity) {
@SuppressWarnings("unchecked")
AbstractDao<T, ?> dao = (AbstractDao<T, ?>) getDao(entity.getClass());
dao.delete(entity);
}
/** Convenient call for {@link AbstractDao#deleteAll()}. */
public <T> void deleteAll(Class<T> entityClass) {
@SuppressWarnings("unchecked")
AbstractDao<T, ?> dao = (AbstractDao<T, ?>) getDao(entityClass);
dao.deleteAll();
}
/** Convenient call for {@link AbstractDao#load(Object)}. */
public <T, K> T load(Class<T> entityClass, K key) {
@SuppressWarnings("unchecked")
AbstractDao<T, K> dao = (AbstractDao<T, K>) getDao(entityClass);
return dao.load(key);
}
/** Convenient call for {@link AbstractDao#loadAll()}. */
public <T, K> List<T> loadAll(Class<T> entityClass) {
@SuppressWarnings("unchecked")
AbstractDao<T, K> dao = (AbstractDao<T, K>) getDao(entityClass);
return dao.loadAll();
}
/** Convenient call for {@link AbstractDao#queryRaw(String, String...)}. */
public <T, K> List<T> queryRaw(Class<T> entityClass, String where, String... selectionArgs) {
@SuppressWarnings("unchecked")
AbstractDao<T, K> dao = (AbstractDao<T, K>) getDao(entityClass);
return dao.queryRaw(where, selectionArgs);
}
/** Convenient call for {@link AbstractDao#queryBuilder()}. */
public <T> QueryBuilder<T> queryBuilder(Class<T> entityClass) {
@SuppressWarnings("unchecked")
AbstractDao<T, ?> dao = (AbstractDao<T, ?>) getDao(entityClass);
return dao.queryBuilder();
}
public AbstractDao<?, ?> getDao(Class<? extends Object> entityClass) {
AbstractDao<?, ?> dao = entityToDao.get(entityClass);
if (dao == null) {
throw new DaoException("No DAO registered for " + entityClass);
}
return dao;
}
/**
* Run the given Runnable inside a database transaction. If you except a result, consider callInTx.
*/
public void runInTx(Runnable runnable) {
db.beginTransaction();
try {
runnable.run();
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
}
/**
* Calls the given Callable inside a database transaction and returns the result of the Callable. If you don't
* except a result, consider runInTx.
*/
public <V> V callInTx(Callable<V> callable) throws Exception {
db.beginTransaction();
try {
V result = callable.call();
db.setTransactionSuccessful();
return result;
} finally {
db.endTransaction();
}
}
/**
* Like {@link #callInTx(Callable)} but does not require Exception handling (rethrows an Exception as a runtime
* DaoException).
*/
public <V> V callInTxNoException(Callable<V> callable) {
db.beginTransaction();
try {
V result;
try {
result = callable.call();
} catch (Exception e) {
throw new DaoException("Callable failed", e);
}
db.setTransactionSuccessful();
return result;
} finally {
db.endTransaction();
}
}
/** Gets the Database for custom database access. Not needed for greenDAO entities. */
public Database getDatabase() {
return db;
}
/** Allows to inspect the meta model using DAOs (e.g. querying table names or properties). */
public Collection<AbstractDao<?, ?>> getAllDaos() {
return Collections.unmodifiableCollection(entityToDao.values());
}
/**
* Creates a new {@link AsyncSession} to issue asynchronous entity operations. See {@link AsyncSession} for details.
*/
public AsyncSession startAsyncSession() {
return new AsyncSession(this);
}
/**
* The returned {@link RxTransaction} allows DB transactions using Rx Observables without any Scheduler set for
* subscribeOn.
*
* @see #rxTx()
*/
@Experimental
public RxTransaction rxTxPlain() {
if (rxTxPlain == null) {
rxTxPlain = new RxTransaction(this);
}
return rxTxPlain;
}
/**
* The returned {@link RxTransaction} allows DB transactions using Rx Observables using RX's IO scheduler for
* subscribeOn.
*
* @see #rxTxPlain()
*/
@Experimental
public RxTransaction rxTx() {
if (rxTxIo == null) {
rxTxIo = new RxTransaction(this, Schedulers.io());
}
return rxTxIo;
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/DaoException.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao;
import android.database.SQLException;
/**
* Exception thrown when something goes wrong in the DAO/ORM layer.
*
* @author Markus
*
*/
public class DaoException extends SQLException {
private static final long serialVersionUID = -5877937327907457779L;
public DaoException() {
}
public DaoException(String error) {
super(error);
}
public DaoException(String error, Throwable cause) {
super(error);
safeInitCause(cause);
}
public DaoException(Throwable th) {
safeInitCause(th);
}
protected void safeInitCause(Throwable cause) {
try {
initCause(cause);
} catch (Throwable e) {
DaoLog.e("Could not set initial cause", e);
DaoLog.e( "Initial cause is:", cause);
}
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/DaoLog.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao;
import android.util.Log;
/**
* Internal greenDAO logger class. A wrapper around the Android Log class providing a static Log Tag.
*
* @author markus
*
*/
public class DaoLog {
private final static String TAG = "greenDAO";
public static final int VERBOSE = 2;
public static final int DEBUG = 3;
public static final int INFO = 4;
public static final int WARN = 5;
public static final int ERROR = 6;
public static final int ASSERT = 7;
public static boolean isLoggable(int level) {
return Log.isLoggable(TAG, level);
}
public static String getStackTraceString(Throwable th) {
return Log.getStackTraceString(th);
}
public static int println(int level, String msg) {
return Log.println(level, TAG, msg);
}
public static int v(String msg) {
return Log.v(TAG, msg);
}
public static int v(String msg, Throwable th) {
return Log.v(TAG, msg, th);
}
public static int d(String msg) {
return Log.d(TAG, msg);
}
public static int d(String msg, Throwable th) {
return Log.d(TAG, msg, th);
}
public static int i(String msg) {
return Log.i(TAG, msg);
}
public static int i(String msg, Throwable th) {
return Log.i(TAG, msg, th);
}
public static int w(String msg) {
return Log.w(TAG, msg);
}
public static int w(String msg, Throwable th) {
return Log.w(TAG, msg, th);
}
public static int w(Throwable th) {
return Log.w(TAG, th);
}
public static int e(String msg) {
return Log.w(TAG, msg);
}
public static int e(String msg, Throwable th) {
return Log.e(TAG, msg, th);
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/DbUtils.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import android.content.Context;
import android.database.Cursor;
import android.database.DatabaseUtils;
import android.database.sqlite.SQLiteDatabase;
import org.greenrobot.greendao.database.Database;
/** Database utils, for example to execute SQL scripts */
// TODO add unit tests
public class DbUtils {
public static void vacuum(Database db) {
db.execSQL("VACUUM");
}
/**
* Calls {@link #executeSqlScript(Context, Database, String, boolean)} with transactional set to true.
*
* @return number of statements executed.
*/
public static int executeSqlScript(Context context, Database db, String assetFilename) throws IOException {
return executeSqlScript(context, db, assetFilename, true);
}
/**
* Executes the given SQL asset in the given database (SQL file should be UTF-8). The database file may contain
* multiple SQL statements. Statements are split using a simple regular expression (something like
* "semicolon before a line break"), not by analyzing the SQL syntax. This will work for many SQL files, but check
* yours.
*
* @return number of statements executed.
*/
public static int executeSqlScript(Context context, Database db, String assetFilename, boolean transactional)
throws IOException {
byte[] bytes = readAsset(context, assetFilename);
String sql = new String(bytes, "UTF-8");
String[] lines = sql.split(";(\\s)*[\n\r]");
int count;
if (transactional) {
count = executeSqlStatementsInTx(db, lines);
} else {
count = executeSqlStatements(db, lines);
}
DaoLog.i("Executed " + count + " statements from SQL script '" + assetFilename + "'");
return count;
}
public static int executeSqlStatementsInTx(Database db, String[] statements) {
db.beginTransaction();
try {
int count = executeSqlStatements(db, statements);
db.setTransactionSuccessful();
return count;
} finally {
db.endTransaction();
}
}
public static int executeSqlStatements(Database db, String[] statements) {
int count = 0;
for (String line : statements) {
line = line.trim();
if (line.length() > 0) {
db.execSQL(line);
count++;
}
}
return count;
}
/**
* Copies all available data from in to out without closing any stream.
*
* @return number of bytes copied
*/
public static int copyAllBytes(InputStream in, OutputStream out) throws IOException {
int byteCount = 0;
byte[] buffer = new byte[4096];
while (true) {
int read = in.read(buffer);
if (read == -1) {
break;
}
out.write(buffer, 0, read);
byteCount += read;
}
return byteCount;
}
public static byte[] readAllBytes(InputStream in) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
copyAllBytes(in, out);
return out.toByteArray();
}
public static byte[] readAsset(Context context, String filename) throws IOException {
InputStream in = context.getResources().getAssets().open(filename);
try {
return readAllBytes(in);
} finally {
in.close();
}
}
public static void logTableDump(SQLiteDatabase db, String tablename) {
Cursor cursor = db.query(tablename, null, null, null, null, null, null);
try {
String dump = DatabaseUtils.dumpCursorToString(cursor);
DaoLog.d(dump);
} finally {
cursor.close();
}
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/InternalQueryDaoAccess.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao;
import java.util.List;
import android.database.Cursor;
import org.greenrobot.greendao.internal.TableStatements;
/** For internal use by greenDAO only. */
public final class InternalQueryDaoAccess<T> {
private final AbstractDao<T, ?> dao;
public InternalQueryDaoAccess(AbstractDao<T, ?> abstractDao) {
dao = abstractDao;
}
public T loadCurrent(Cursor cursor, int offset, boolean lock) {
return dao.loadCurrent(cursor, offset, lock);
}
public List<T> loadAllAndCloseCursor(Cursor cursor) {
return dao.loadAllAndCloseCursor(cursor);
}
public T loadUniqueAndCloseCursor(Cursor cursor) {
return dao.loadUniqueAndCloseCursor(cursor);
}
public TableStatements getStatements() {
return dao.getStatements();
}
public static <T2> TableStatements getStatements(AbstractDao<T2, ?> dao) {
return dao.getStatements();
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/InternalUnitTestDaoAccess.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao;
import android.database.Cursor;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScope;
import org.greenrobot.greendao.internal.DaoConfig;
import java.lang.reflect.Constructor;
/** Reserved for internal unit tests that want to access some non-public methods. Don't use for anything else. */
public class InternalUnitTestDaoAccess<T, K> {
private final AbstractDao<T, K> dao;
public InternalUnitTestDaoAccess(Database db, Class<AbstractDao<T, K>> daoClass, IdentityScope<?, ?> identityScope)
throws Exception {
DaoConfig daoConfig = new DaoConfig(db, daoClass);
daoConfig.setIdentityScope(identityScope);
Constructor<AbstractDao<T, K>> constructor = daoClass.getConstructor(DaoConfig.class);
dao = constructor.newInstance(daoConfig);
}
public K getKey(T entity) {
return dao.getKey(entity);
}
public Property[] getProperties() {
return dao.getProperties();
}
public boolean isEntityUpdateable() {
return dao.isEntityUpdateable();
}
public T readEntity(Cursor cursor, int offset) {
return dao.readEntity(cursor, offset);
}
public K readKey(Cursor cursor, int offset) {
return dao.readKey(cursor, offset);
}
public AbstractDao<T, K> getDao() {
return dao;
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/Property.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao;
import java.util.Collection;
import org.greenrobot.greendao.internal.SqlUtils;
import org.greenrobot.greendao.query.WhereCondition;
import org.greenrobot.greendao.query.WhereCondition.PropertyCondition;
/**
* Meta data describing a property mapped to a database column; used to create WhereCondition object used by the query builder.
*
* @author Markus
*/
public class Property {
public final int ordinal;
public final Class<?> type;
public final String name;
public final boolean primaryKey;
public final String columnName;
public Property(int ordinal, Class<?> type, String name, boolean primaryKey, String columnName) {
this.ordinal = ordinal;
this.type = type;
this.name = name;
this.primaryKey = primaryKey;
this.columnName = columnName;
}
/** Creates an "equal ('=')" condition for this property. */
public WhereCondition eq(Object value) {
return new PropertyCondition(this, "=?", value);
}
/** Creates an "not equal ('<>')" condition for this property. */
public WhereCondition notEq(Object value) {
return new PropertyCondition(this, "<>?", value);
}
/** Creates an "LIKE" condition for this property. */
public WhereCondition like(String value) {
return new PropertyCondition(this, " LIKE ?", value);
}
/** Creates an "BETWEEN ... AND ..." condition for this property. */
public WhereCondition between(Object value1, Object value2) {
Object[] values = { value1, value2 };
return new PropertyCondition(this, " BETWEEN ? AND ?", values);
}
/** Creates an "IN (..., ..., ...)" condition for this property. */
public WhereCondition in(Object... inValues) {
StringBuilder condition = new StringBuilder(" IN (");
SqlUtils.appendPlaceholders(condition, inValues.length).append(')');
return new PropertyCondition(this, condition.toString(), inValues);
}
/** Creates an "IN (..., ..., ...)" condition for this property. */
public WhereCondition in(Collection<?> inValues) {
return in(inValues.toArray());
}
/** Creates an "NOT IN (..., ..., ...)" condition for this property. */
public WhereCondition notIn(Object... notInValues) {
StringBuilder condition = new StringBuilder(" NOT IN (");
SqlUtils.appendPlaceholders(condition, notInValues.length).append(')');
return new PropertyCondition(this, condition.toString(), notInValues);
}
/** Creates an "NOT IN (..., ..., ...)" condition for this property. */
public WhereCondition notIn(Collection<?> notInValues) {
return notIn(notInValues.toArray());
}
/** Creates an "greater than ('>')" condition for this property. */
public WhereCondition gt(Object value) {
return new PropertyCondition(this, ">?", value);
}
/** Creates an "less than ('<')" condition for this property. */
public WhereCondition lt(Object value) {
return new PropertyCondition(this, "<?", value);
}
/** Creates an "greater or equal ('>=')" condition for this property. */
public WhereCondition ge(Object value) {
return new PropertyCondition(this, ">=?", value);
}
/** Creates an "less or equal ('<=')" condition for this property. */
public WhereCondition le(Object value) {
return new PropertyCondition(this, "<=?", value);
}
/** Creates an "IS NULL" condition for this property. */
public WhereCondition isNull() {
return new PropertyCondition(this, " IS NULL");
}
/** Creates an "IS NOT NULL" condition for this property. */
public WhereCondition isNotNull() {
return new PropertyCondition(this, " IS NOT NULL");
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncDaoException.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.async;
import org.greenrobot.greendao.DaoException;
/**
* Used here: {@link AsyncOperation#getResult()}.
*
* @author Markus
*/
public class AsyncDaoException extends DaoException {
private static final long serialVersionUID = 5872157552005102382L;
private final AsyncOperation failedOperation;
public AsyncDaoException(AsyncOperation failedOperation, Throwable cause) {
super(cause);
this.failedOperation = failedOperation;
}
public AsyncOperation getFailedOperation() {
return failedOperation;
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncOperation.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.async;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.DaoException;
import org.greenrobot.greendao.database.Database;
/**
* An operation that will be enqueued for asynchronous execution.
*
* @author Markus
* @see AsyncSession
*/
// TODO Implement Future<V>
public class AsyncOperation {
public enum OperationType {
Insert, InsertInTxIterable, InsertInTxArray, //
InsertOrReplace, InsertOrReplaceInTxIterable, InsertOrReplaceInTxArray, //
Update, UpdateInTxIterable, UpdateInTxArray, //
Delete, DeleteInTxIterable, DeleteInTxArray, //
DeleteByKey, DeleteAll, //
TransactionRunnable, TransactionCallable, //
QueryList, QueryUnique, //
Load, LoadAll, //
Count, Refresh
}
public static final int FLAG_MERGE_TX = 1;
/** TODO unused, just an idea */
public static final int FLAG_STOP_QUEUE_ON_EXCEPTION = 1 << 1;
public static final int FLAG_TRACK_CREATOR_STACKTRACE = 1 << 2;
final OperationType type;
final AbstractDao<Object, Object> dao;
private final Database database;
/** Entity, Iterable<Entity>, Entity[], or Runnable. */
final Object parameter;
final int flags;
volatile long timeStarted;
volatile long timeCompleted;
private volatile boolean completed;
volatile Throwable throwable;
final Exception creatorStacktrace;
volatile Object result;
volatile int mergedOperationsCount;
int sequenceNumber;
@SuppressWarnings("unchecked")
/** Either supply dao or database (set other to null). */
AsyncOperation(OperationType type, AbstractDao<?, ?> dao, Database database, Object parameter, int flags) {
this.type = type;
this.flags = flags;
this.dao = (AbstractDao<Object, Object>) dao;
this.database = database;
this.parameter = parameter;
creatorStacktrace = (flags & FLAG_TRACK_CREATOR_STACKTRACE) != 0 ? new Exception("AsyncOperation was created here") : null;
}
public Throwable getThrowable() {
return throwable;
}
public void setThrowable(Throwable throwable) {
this.throwable = throwable;
}
public OperationType getType() {
return type;
}
public Object getParameter() {
return parameter;
}
/**
* The operation's result after it has completed. Waits until a result is available.
*
* @return The operation's result or null if the operation type does not produce any result.
* @throws {@link AsyncDaoException} if the operation produced an exception
* @see #waitForCompletion()
*/
public synchronized Object getResult() {
if (!completed) {
waitForCompletion();
}
if (throwable != null) {
throw new AsyncDaoException(this, throwable);
}
return result;
}
/** @return true if this operation may be merged with others into a single database transaction. */
public boolean isMergeTx() {
return (flags & FLAG_MERGE_TX) != 0;
}
Database getDatabase() {
return database != null ? database : dao.getDatabase();
}
/**
* @return true if this operation is mergeable with the given operation. Checks for null, {@link #FLAG_MERGE_TX},
* and if the database instances match.
*/
boolean isMergeableWith(AsyncOperation other) {
return other != null && isMergeTx() && other.isMergeTx() && getDatabase() == other.getDatabase();
}
public long getTimeStarted() {
return timeStarted;
}
public long getTimeCompleted() {
return timeCompleted;
}
public long getDuration() {
if (timeCompleted == 0) {
throw new DaoException("This operation did not yet complete");
} else {
return timeCompleted - timeStarted;
}
}
public boolean isFailed() {
return throwable != null;
}
public boolean isCompleted() {
return completed;
}
/**
* Waits until the operation is complete. If the thread gets interrupted, any {@link InterruptedException} will be
* rethrown as a {@link DaoException}.
*
* @return Result if any, see {@link #getResult()}
*/
public synchronized Object waitForCompletion() {
while (!completed) {
try {
wait();
} catch (InterruptedException e) {
throw new DaoException("Interrupted while waiting for operation to complete", e);
}
}
return result;
}
/**
* Waits until the operation is complete, but at most the given amount of milliseconds.If the thread gets
* interrupted, any {@link InterruptedException} will be rethrown as a {@link DaoException}.
*
* @return true if the operation completed in the given time frame.
*/
public synchronized boolean waitForCompletion(int maxMillis) {
if (!completed) {
try {
wait(maxMillis);
} catch (InterruptedException e) {
throw new DaoException("Interrupted while waiting for operation to complete", e);
}
}
return completed;
}
/** Called when the operation is done. Notifies any threads waiting for this operation's completion. */
synchronized void setCompleted() {
completed = true;
notifyAll();
}
public boolean isCompletedSucessfully() {
return completed && throwable == null;
}
/**
* If this operation was successfully merged with other operation into a single TX, this will give the count of
* merged operations. If the operation was not merged, it will be 0.
*/
public int getMergedOperationsCount() {
return mergedOperationsCount;
}
/**
* Each operation get a unique sequence number when the operation is enqueued. Can be used for efficiently
* identifying/mapping operations.
*/
public int getSequenceNumber() {
return sequenceNumber;
}
/** Reset to prepare another execution run. */
void reset() {
timeStarted = 0;
timeCompleted = 0;
completed = false;
throwable = null;
result = null;
mergedOperationsCount = 0;
}
/**
* The stacktrace is captured using an exception if {@link #FLAG_TRACK_CREATOR_STACKTRACE} was used (null
* otherwise).
*/
public Exception getCreatorStacktrace() {
return creatorStacktrace;
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncOperationExecutor.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.async;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import org.greenrobot.greendao.DaoException;
import org.greenrobot.greendao.DaoLog;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.query.Query;
import java.util.ArrayList;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
class AsyncOperationExecutor implements Runnable, Handler.Callback {
private static ExecutorService executorService = Executors.newCachedThreadPool();
private final BlockingQueue<AsyncOperation> queue;
private volatile boolean executorRunning;
private volatile int maxOperationCountToMerge;
private volatile AsyncOperationListener listener;
private volatile AsyncOperationListener listenerMainThread;
private volatile int waitForMergeMillis;
private int countOperationsEnqueued;
private int countOperationsCompleted;
private Handler handlerMainThread;
private int lastSequenceNumber;
AsyncOperationExecutor() {
queue = new LinkedBlockingQueue<AsyncOperation>();
maxOperationCountToMerge = 50;
waitForMergeMillis = 50;
}
public void enqueue(AsyncOperation operation) {
synchronized (this) {
operation.sequenceNumber = ++lastSequenceNumber;
queue.add(operation);
countOperationsEnqueued++;
if (!executorRunning) {
executorRunning = true;
executorService.execute(this);
}
}
}
public int getMaxOperationCountToMerge() {
return maxOperationCountToMerge;
}
public void setMaxOperationCountToMerge(int maxOperationCountToMerge) {
this.maxOperationCountToMerge = maxOperationCountToMerge;
}
public int getWaitForMergeMillis() {
return waitForMergeMillis;
}
public void setWaitForMergeMillis(int waitForMergeMillis) {
this.waitForMergeMillis = waitForMergeMillis;
}
public AsyncOperationListener getListener() {
return listener;
}
public void setListener(AsyncOperationListener listener) {
this.listener = listener;
}
public AsyncOperationListener getListenerMainThread() {
return listenerMainThread;
}
public void setListenerMainThread(AsyncOperationListener listenerMainThread) {
this.listenerMainThread = listenerMainThread;
}
public synchronized boolean isCompleted() {
return countOperationsEnqueued == countOperationsCompleted;
}
/**
* Waits until all enqueued operations are complete. If the thread gets interrupted, any
* {@link InterruptedException} will be rethrown as a {@link DaoException}.
*/
public synchronized void waitForCompletion() {
while (!isCompleted()) {
try {
wait();
} catch (InterruptedException e) {
throw new DaoException("Interrupted while waiting for all operations to complete", e);
}
}
}
/**
* Waits until all enqueued operations are complete, but at most the given amount of milliseconds. If the thread
* gets interrupted, any {@link InterruptedException} will be rethrown as a {@link DaoException}.
*
* @return true if operations completed in the given time frame.
*/
public synchronized boolean waitForCompletion(int maxMillis) {
if (!isCompleted()) {
try {
wait(maxMillis);
} catch (InterruptedException e) {
throw new DaoException("Interrupted while waiting for all operations to complete", e);
}
}
return isCompleted();
}
@Override
public void run() {
try {
try {
while (true) {
AsyncOperation operation = queue.poll(1, TimeUnit.SECONDS);
if (operation == null) {
synchronized (this) {
// Check again, this time in synchronized to be in sync with enqueue(AsyncOperation)
operation = queue.poll();
if (operation == null) {
// set flag while still inside synchronized
executorRunning = false;
return;
}
}
}
if (operation.isMergeTx()) {
// Wait some ms for another operation to merge because a TX is expensive
AsyncOperation operation2 = queue.poll(waitForMergeMillis, TimeUnit.MILLISECONDS);
if (operation2 != null) {
if (operation.isMergeableWith(operation2)) {
mergeTxAndExecute(operation, operation2);
} else {
// Cannot merge, execute both
executeOperationAndPostCompleted(operation);
executeOperationAndPostCompleted(operation2);
}
continue;
}
}
executeOperationAndPostCompleted(operation);
}
} catch (InterruptedException e) {
DaoLog.w(Thread.currentThread().getName() + " was interruppted", e);
}
} finally {
executorRunning = false;
}
}
/** Also checks for other operations in the queue that can be merged into the transaction. */
private void mergeTxAndExecute(AsyncOperation operation1, AsyncOperation operation2) {
ArrayList<AsyncOperation> mergedOps = new ArrayList<AsyncOperation>();
mergedOps.add(operation1);
mergedOps.add(operation2);
Database db = operation1.getDatabase();
db.beginTransaction();
boolean success = false;
try {
for (int i = 0; i < mergedOps.size(); i++) {
AsyncOperation operation = mergedOps.get(i);
executeOperation(operation);
if (operation.isFailed()) {
// Operation may still have changed the DB, roll back everything
break;
}
if (i == mergedOps.size() - 1) {
AsyncOperation peekedOp = queue.peek();
if (i < maxOperationCountToMerge && operation.isMergeableWith(peekedOp)) {
AsyncOperation removedOp = queue.remove();
if (removedOp != peekedOp) {
// Paranoia check, should not occur unless threading is broken
throw new DaoException("Internal error: peeked op did not match removed op");
}
mergedOps.add(removedOp);
} else {
// No more ops in the queue to merge, finish it
db.setTransactionSuccessful();
success = true;
break;
}
}
}
} finally {
try {
db.endTransaction();
} catch (RuntimeException e) {
DaoLog.i("Async transaction could not be ended, success so far was: " + success, e);
success = false;
}
}
if (success) {
int mergedCount = mergedOps.size();
for (AsyncOperation asyncOperation : mergedOps) {
asyncOperation.mergedOperationsCount = mergedCount;
handleOperationCompleted(asyncOperation);
}
} else {
DaoLog.i("Reverted merged transaction because one of the operations failed. Executing operations one by " +
"one instead...");
for (AsyncOperation asyncOperation : mergedOps) {
asyncOperation.reset();
executeOperationAndPostCompleted(asyncOperation);
}
}
}
private void handleOperationCompleted(AsyncOperation operation) {
operation.setCompleted();
AsyncOperationListener listenerToCall = listener;
if (listenerToCall != null) {
listenerToCall.onAsyncOperationCompleted(operation);
}
if (listenerMainThread != null) {
if (handlerMainThread == null) {
handlerMainThread = new Handler(Looper.getMainLooper(), this);
}
Message msg = handlerMainThread.obtainMessage(1, operation);
handlerMainThread.sendMessage(msg);
}
synchronized (this) {
countOperationsCompleted++;
if (countOperationsCompleted == countOperationsEnqueued) {
notifyAll();
}
}
}
private void executeOperationAndPostCompleted(AsyncOperation operation) {
executeOperation(operation);
handleOperationCompleted(operation);
}
@SuppressWarnings({"unchecked", "rawtypes"})
private void executeOperation(AsyncOperation operation) {
operation.timeStarted = System.currentTimeMillis();
try {
switch (operation.type) {
case Delete:
operation.dao.delete(operation.parameter);
break;
case DeleteInTxIterable:
operation.dao.deleteInTx((Iterable<Object>) operation.parameter);
break;
case DeleteInTxArray:
operation.dao.deleteInTx((Object[]) operation.parameter);
break;
case Insert:
operation.dao.insert(operation.parameter);
break;
case InsertInTxIterable:
operation.dao.insertInTx((Iterable<Object>) operation.parameter);
break;
case InsertInTxArray:
operation.dao.insertInTx((Object[]) operation.parameter);
break;
case InsertOrReplace:
operation.dao.insertOrReplace(operation.parameter);
break;
case InsertOrReplaceInTxIterable:
operation.dao.insertOrReplaceInTx((Iterable<Object>) operation.parameter);
break;
case InsertOrReplaceInTxArray:
operation.dao.insertOrReplaceInTx((Object[]) operation.parameter);
break;
case Update:
operation.dao.update(operation.parameter);
break;
case UpdateInTxIterable:
operation.dao.updateInTx((Iterable<Object>) operation.parameter);
break;
case UpdateInTxArray:
operation.dao.updateInTx((Object[]) operation.parameter);
break;
case TransactionRunnable:
executeTransactionRunnable(operation);
break;
case TransactionCallable:
executeTransactionCallable(operation);
break;
case QueryList:
operation.result = ((Query) operation.parameter).forCurrentThread().list();
break;
case QueryUnique:
operation.result = ((Query) operation.parameter).forCurrentThread().unique();
break;
case DeleteByKey:
operation.dao.deleteByKey(operation.parameter);
break;
case DeleteAll:
operation.dao.deleteAll();
break;
case Load:
operation.result = operation.dao.load(operation.parameter);
break;
case LoadAll:
operation.result = operation.dao.loadAll();
break;
case Count:
operation.result = operation.dao.count();
break;
case Refresh:
operation.dao.refresh(operation.parameter);
break;
default:
throw new DaoException("Unsupported operation: " + operation.type);
}
} catch (Throwable th) {
operation.throwable = th;
}
operation.timeCompleted = System.currentTimeMillis();
// Do not set it to completed here because it might be a merged TX
}
private void executeTransactionRunnable(AsyncOperation operation) {
Database db = operation.getDatabase();
db.beginTransaction();
try {
((Runnable) operation.parameter).run();
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
}
@SuppressWarnings("unchecked")
private void executeTransactionCallable(AsyncOperation operation) throws Exception {
Database db = operation.getDatabase();
db.beginTransaction();
try {
operation.result = ((Callable<Object>) operation.parameter).call();
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
}
@Override
public boolean handleMessage(Message msg) {
AsyncOperationListener listenerToCall = listenerMainThread;
if (listenerToCall != null) {
listenerToCall.onAsyncOperationCompleted((AsyncOperation) msg.obj);
}
return false;
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncOperationListener.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.async;
/** Listener being called after completion of {@link org.greenrobot.greendao.async.AsyncOperation}. */
public interface AsyncOperationListener {
/**
* Note, that the operation may not have been successful, check
* {@link AsyncOperation#isFailed()} and/or {@link AsyncOperation#getThrowable()} for error situations.
*/
void onAsyncOperationCompleted(AsyncOperation operation);
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncSession.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.async;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.DaoException;
import org.greenrobot.greendao.async.AsyncOperation.OperationType;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.query.Query;
import java.util.concurrent.Callable;
/**
* Asynchronous interface to entity operations. All operations will enqueued a @link {@link AsyncOperation} and return
* immediately (fine to call on the UI/main thread). The queue will be processed in a (single) background thread. The
* processing order is the call order of the operations. It's possible to start multiple AsyncSessions that will
* execute
* concurrently.
*
* @author Markus
* @see AbstractDaoSession#startAsyncSession()
*/
// Facade to AsyncOperationExecutor: prepares operations and delegates work to AsyncOperationExecutor.
public class AsyncSession {
private final AbstractDaoSession daoSession;
private final AsyncOperationExecutor executor;
private int sessionFlags;
public AsyncSession(AbstractDaoSession daoSession) {
this.daoSession = daoSession;
this.executor = new AsyncOperationExecutor();
}
public int getMaxOperationCountToMerge() {
return executor.getMaxOperationCountToMerge();
}
public void setMaxOperationCountToMerge(int maxOperationCountToMerge) {
executor.setMaxOperationCountToMerge(maxOperationCountToMerge);
}
public int getWaitForMergeMillis() {
return executor.getWaitForMergeMillis();
}
public void setWaitForMergeMillis(int waitForMergeMillis) {
executor.setWaitForMergeMillis(waitForMergeMillis);
}
public AsyncOperationListener getListener() {
return executor.getListener();
}
public void setListener(AsyncOperationListener listener) {
executor.setListener(listener);
}
public AsyncOperationListener getListenerMainThread() {
return executor.getListenerMainThread();
}
public void setListenerMainThread(AsyncOperationListener listenerMainThread) {
executor.setListenerMainThread(listenerMainThread);
}
public boolean isCompleted() {
return executor.isCompleted();
}
/**
* Waits until all enqueued operations are complete. If the thread gets interrupted, any
* {@link InterruptedException} will be rethrown as a {@link DaoException}.
*/
public void waitForCompletion() {
executor.waitForCompletion();
}
/**
* Waits until all enqueued operations are complete, but at most the given amount of milliseconds. If the thread
* gets interrupted, any {@link InterruptedException} will be rethrown as a {@link DaoException}.
*
* @return true if operations completed in the given time frame.
*/
public boolean waitForCompletion(int maxMillis) {
return executor.waitForCompletion(maxMillis);
}
/** Asynchronous version of {@link AbstractDao#insert(Object)}. */
public AsyncOperation insert(Object entity) {
return insert(entity, 0);
}
/** Asynchronous version of {@link AbstractDao#insert(Object)}. */
public AsyncOperation insert(Object entity, int flags) {
return enqueueEntityOperation(OperationType.Insert, entity, flags);
}
/** Asynchronous version of {@link AbstractDao#insertInTx(Object...)}. */
public <E> AsyncOperation insertInTx(Class<E> entityClass, E... entities) {
return insertInTx(entityClass, 0, entities);
}
/** Asynchronous version of {@link AbstractDao#insertInTx(Object...)}. */
public <E> AsyncOperation insertInTx(Class<E> entityClass, int flags, E... entities) {
return enqueEntityOperation(OperationType.InsertInTxArray, entityClass, entities, flags);
}
/** Asynchronous version of {@link AbstractDao#insertInTx(Iterable)}. */
public <E> AsyncOperation insertInTx(Class<E> entityClass, Iterable<E> entities) {
return insertInTx(entityClass, entities, 0);
}
/** Asynchronous version of {@link AbstractDao#insertInTx(Iterable)}. */
public <E> AsyncOperation insertInTx(Class<E> entityClass, Iterable<E> entities, int flags) {
return enqueEntityOperation(OperationType.InsertInTxIterable, entityClass, entities, flags);
}
/** Asynchronous version of {@link AbstractDao#insertOrReplace(Object)}. */
public AsyncOperation insertOrReplace(Object entity) {
return insertOrReplace(entity, 0);
}
/** Asynchronous version of {@link AbstractDao#insertOrReplace(Object)}. */
public AsyncOperation insertOrReplace(Object entity, int flags) {
return enqueueEntityOperation(OperationType.InsertOrReplace, entity, flags);
}
/** Asynchronous version of {@link AbstractDao#insertOrReplaceInTx(Object...)}. */
public <E> AsyncOperation insertOrReplaceInTx(Class<E> entityClass, E... entities) {
return insertOrReplaceInTx(entityClass, 0, entities);
}
/** Asynchronous version of {@link AbstractDao#insertOrReplaceInTx(Object...)}. */
public <E> AsyncOperation insertOrReplaceInTx(Class<E> entityClass, int flags, E... entities) {
return enqueEntityOperation(OperationType.InsertOrReplaceInTxArray, entityClass, entities, flags);
}
/** Asynchronous version of {@link AbstractDao#insertOrReplaceInTx(Iterable)}. */
public <E> AsyncOperation insertOrReplaceInTx(Class<E> entityClass, Iterable<E> entities) {
return insertOrReplaceInTx(entityClass, entities, 0);
}
/** Asynchronous version of {@link AbstractDao#insertOrReplaceInTx(Iterable)}. */
public <E> AsyncOperation insertOrReplaceInTx(Class<E> entityClass, Iterable<E> entities, int flags) {
return enqueEntityOperation(OperationType.InsertOrReplaceInTxIterable, entityClass, entities, flags);
}
/** Asynchronous version of {@link AbstractDao#update(Object)}. */
public AsyncOperation update(Object entity) {
return update(entity, 0);
}
/** Asynchronous version of {@link AbstractDao#update(Object)}. */
public AsyncOperation update(Object entity, int flags) {
return enqueueEntityOperation(OperationType.Update, entity, flags);
}
/** Asynchronous version of {@link AbstractDao#updateInTx(Object...)}. */
public <E> AsyncOperation updateInTx(Class<E> entityClass, E... entities) {
return updateInTx(entityClass, 0, entities);
}
/** Asynchronous version of {@link AbstractDao#updateInTx(Object...)}. */
public <E> AsyncOperation updateInTx(Class<E> entityClass, int flags, E... entities) {
return enqueEntityOperation(OperationType.UpdateInTxArray, entityClass, entities, flags);
}
/** Asynchronous version of {@link AbstractDao#updateInTx(Iterable)}. */
public <E> AsyncOperation updateInTx(Class<E> entityClass, Iterable<E> entities) {
return updateInTx(entityClass, entities, 0);
}
/** Asynchronous version of {@link AbstractDao#updateInTx(Iterable)}. */
public <E> AsyncOperation updateInTx(Class<E> entityClass, Iterable<E> entities, int flags) {
return enqueEntityOperation(OperationType.UpdateInTxIterable, entityClass, entities, flags);
}
/** Asynchronous version of {@link AbstractDao#delete(Object)}. */
public AsyncOperation delete(Object entity) {
return delete(entity, 0);
}
/** Asynchronous version of {@link AbstractDao#delete(Object)}. */
public AsyncOperation delete(Object entity, int flags) {
return enqueueEntityOperation(OperationType.Delete, entity, flags);
}
/** Asynchronous version of {@link AbstractDao#deleteByKey(Object)}. */
public AsyncOperation deleteByKey(Object key) {
return deleteByKey(key, 0);
}
/** Asynchronous version of {@link AbstractDao#deleteByKey(Object)}. */
public AsyncOperation deleteByKey(Object key, int flags) {
return enqueueEntityOperation(OperationType.DeleteByKey, key, flags);
}
/** Asynchronous version of {@link AbstractDao#deleteInTx(Object...)}. */
public <E> AsyncOperation deleteInTx(Class<E> entityClass, E... entities) {
return deleteInTx(entityClass, 0, entities);
}
/** Asynchronous version of {@link AbstractDao#deleteInTx(Object...)}. */
public <E> AsyncOperation deleteInTx(Class<E> entityClass, int flags, E... entities) {
return enqueEntityOperation(OperationType.DeleteInTxArray, entityClass, entities, flags);
}
/** Asynchronous version of {@link AbstractDao#deleteInTx(Iterable)}. */
public <E> AsyncOperation deleteInTx(Class<E> entityClass, Iterable<E> entities) {
return deleteInTx(entityClass, entities, 0);
}
/** Asynchronous version of {@link AbstractDao#deleteInTx(Iterable)}. */
public <E> AsyncOperation deleteInTx(Class<E> entityClass, Iterable<E> entities, int flags) {
return enqueEntityOperation(OperationType.DeleteInTxIterable, entityClass, entities, flags);
}
/** Asynchronous version of {@link AbstractDao#deleteAll()}. */
public <E> AsyncOperation deleteAll(Class<E> entityClass) {
return deleteAll(entityClass, 0);
}
/** Asynchronous version of {@link AbstractDao#deleteAll()}. */
public <E> AsyncOperation deleteAll(Class<E> entityClass, int flags) {
return enqueEntityOperation(OperationType.DeleteAll, entityClass, null, flags);
}
/** Asynchronous version of {@link AbstractDaoSession#runInTx(Runnable)}. */
public AsyncOperation runInTx(Runnable runnable) {
return runInTx(runnable, 0);
}
/** Asynchronous version of {@link AbstractDaoSession#runInTx(Runnable)}. */
public AsyncOperation runInTx(Runnable runnable, int flags) {
return enqueueDatabaseOperation(OperationType.TransactionRunnable, runnable, flags);
}
/** Asynchronous version of {@link AbstractDaoSession#callInTx(Callable)}. */
public AsyncOperation callInTx(Callable<?> callable) {
return callInTx(callable, 0);
}
/** Asynchronous version of {@link AbstractDaoSession#callInTx(Callable)}. */
public AsyncOperation callInTx(Callable<?> callable, int flags) {
return enqueueDatabaseOperation(OperationType.TransactionCallable, callable, flags);
}
/** Asynchronous version of {@link Query#list()}. */
public AsyncOperation queryList(Query<?> query) {
return queryList(query, 0);
}
/** Asynchronous version of {@link Query#list()}. */
public AsyncOperation queryList(Query<?> query, int flags) {
return enqueueDatabaseOperation(OperationType.QueryList, query, flags);
}
/** Asynchronous version of {@link Query#unique()}. */
public AsyncOperation queryUnique(Query<?> query) {
return queryUnique(query, 0);
}
/** Asynchronous version of {@link Query#unique()}. */
public AsyncOperation queryUnique(Query<?> query, int flags) {
return enqueueDatabaseOperation(OperationType.QueryUnique, query, flags);
}
/** Asynchronous version of {@link AbstractDao#load(Object)}. */
public AsyncOperation load(Class<?> entityClass, Object key) {
return load(entityClass, key, 0);
}
/** Asynchronous version of {@link AbstractDao#load(Object)}. */
public AsyncOperation load(Class<?> entityClass, Object key, int flags) {
return enqueEntityOperation(OperationType.Load, entityClass, key, flags);
}
/** Asynchronous version of {@link AbstractDao#loadAll()}. */
public AsyncOperation loadAll(Class<?> entityClass) {
return loadAll(entityClass, 0);
}
/** Asynchronous version of {@link AbstractDao#loadAll()}. */
public AsyncOperation loadAll(Class<?> entityClass, int flags) {
return enqueEntityOperation(OperationType.LoadAll, entityClass, null, flags);
}
/** Asynchronous version of {@link AbstractDao#count()}. */
public AsyncOperation count(Class<?> entityClass) {
return count(entityClass, 0);
}
/** Asynchronous version of {@link AbstractDao#count()}. */
public AsyncOperation count(Class<?> entityClass, int flags) {
return enqueEntityOperation(OperationType.Count, entityClass, null, flags);
}
/** Asynchronous version of {@link AbstractDao#refresh(Object)}. */
public AsyncOperation refresh(Object entity) {
return refresh(entity, 0);
}
/** Asynchronous version of {@link AbstractDao#refresh(Object)}. */
public AsyncOperation refresh(Object entity, int flags) {
return enqueueEntityOperation(OperationType.Refresh, entity, flags);
}
private AsyncOperation enqueueDatabaseOperation(OperationType type, Object param, int flags) {
Database database = daoSession.getDatabase();
AsyncOperation operation = new AsyncOperation(type, null, database, param, flags | sessionFlags);
executor.enqueue(operation);
return operation;
}
private AsyncOperation enqueueEntityOperation(OperationType type, Object entity, int flags) {
return enqueEntityOperation(type, entity.getClass(), entity, flags);
}
private <E> AsyncOperation enqueEntityOperation(OperationType type, Class<E> entityClass, Object param, int flags) {
AbstractDao<?, ?> dao = daoSession.getDao(entityClass);
AsyncOperation operation = new AsyncOperation(type, dao, null, param, flags | sessionFlags);
executor.enqueue(operation);
return operation;
}
/** {@link org.greenrobot.greendao.async.AsyncOperation} flags set for all operations (will be ORed with call flags). */
public int getSessionFlags() {
return sessionFlags;
}
/** {@link org.greenrobot.greendao.async.AsyncOperation} flags set for all operations (will be ORed with call flags). */
public void setSessionFlags(int sessionFlags) {
this.sessionFlags = sessionFlags;
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/Database.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.database;
import android.database.Cursor;
import android.database.SQLException;
/**
* Database abstraction used internally by greenDAO.
*/
public interface Database {
Cursor rawQuery(String sql, String[] selectionArgs);
void execSQL(String sql) throws SQLException;
void beginTransaction();
void endTransaction();
boolean inTransaction();
void setTransactionSuccessful();
void execSQL(String sql, Object[] bindArgs) throws SQLException;
DatabaseStatement compileStatement(String sql);
boolean isDbLockedByCurrentThread();
boolean isOpen();
void close();
Object getRawDatabase();
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/DatabaseOpenHelper.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.database;
import android.annotation.SuppressLint;
import android.content.Context;
import android.database.DatabaseErrorHandler;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;
import org.greenrobot.greendao.DaoException;
import java.lang.reflect.Constructor;
/**
* SQLiteOpenHelper to allow working with greenDAO's {@link Database} abstraction to create and update database schemas.
*/
public abstract class DatabaseOpenHelper extends SQLiteOpenHelper {
private final Context context;
private final String name;
private final int version;
private EncryptedHelper encryptedHelper;
private boolean loadSQLCipherNativeLibs = true;
public DatabaseOpenHelper(Context context, String name, int version) {
this(context, name, null, version);
}
public DatabaseOpenHelper(Context context, String name, CursorFactory factory, int version) {
super(context, name, factory, version);
this.context = context;
this.name = name;
this.version = version;
}
@SuppressLint("NewApi")
public DatabaseOpenHelper(Context context, String name, CursorFactory factory, int version, DatabaseErrorHandler errorHandler) {
super(context, name, factory, version, errorHandler);
this.context = context;
this.name = name;
this.version = version;
}
/**
* Flag to load SQLCipher native libs (default: true).
*/
public void setLoadSQLCipherNativeLibs(boolean loadSQLCipherNativeLibs) {
this.loadSQLCipherNativeLibs = loadSQLCipherNativeLibs;
}
/**
* Like {@link #getWritableDatabase()}, but returns a greenDAO abstraction of the database.
* The backing DB is an standard {@link SQLiteDatabase}.
*/
public Database getWritableDb() {
return wrap(getWritableDatabase());
}
/**
* Like {@link #getReadableDatabase()}, but returns a greenDAO abstraction of the database.
* The backing DB is an standard {@link SQLiteDatabase}.
*/
public Database getReadableDb() {
return wrap(getReadableDatabase());
}
protected Database wrap(SQLiteDatabase sqLiteDatabase) {
return new StandardDatabase(sqLiteDatabase);
}
/**
* Delegates to {@link #onCreate(Database)}, which uses greenDAO's database abstraction.
*/
@Override
public void onCreate(SQLiteDatabase db) {
onCreate(wrap(db));
}
/**
* Override this if you do not want to depend on {@link SQLiteDatabase}.
*/
public void onCreate(Database db) {
// Do nothing by default
}
/**
* Delegates to {@link #onUpgrade(Database, int, int)}, which uses greenDAO's database abstraction.
*/
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
onUpgrade(wrap(db), oldVersion, newVersion);
}
/**
* Override this if you do not want to depend on {@link SQLiteDatabase}.
*/
public void onUpgrade(Database db, int oldVersion, int newVersion) {
// Do nothing by default
}
/**
* Delegates to {@link #onOpen(Database)}, which uses greenDAO's database abstraction.
*/
@Override
public void onOpen(SQLiteDatabase db) {
onOpen(wrap(db));
}
/**
* Override this if you do not want to depend on {@link SQLiteDatabase}.
*/
public void onOpen(Database db) {
// Do nothing by default
}
interface EncryptedHelper {
Database getEncryptedReadableDb(String password);
Database getEncryptedReadableDb(char[] password);
Database getEncryptedWritableDb(String password);
Database getEncryptedWritableDb(char[] password);
}
private EncryptedHelper checkEncryptedHelper() {
if (encryptedHelper == null) {
try {
Class.forName("net.sqlcipher.database.SQLiteOpenHelper");
} catch (ClassNotFoundException e) {
throw new DaoException("Using an encrypted database requires SQLCipher, " +
"make sure to add it to dependencies: " +
"https://greenrobot.org/greendao/documentation/database-encryption/");
}
// Avoid referencing SqlCipherEncryptedHelper to avoid
// "Rejecting re-init on previously-failed class java.lang.NoClassDefFoundError" logs
// if SQLCipher is not in classpath.
try {
Class<?> helperClass = Class.forName(
"org.greenrobot.greendao.database.SqlCipherEncryptedHelper");
Constructor<?> constructor = helperClass.getConstructor(
DatabaseOpenHelper.class, Context.class, String.class, int.class, boolean.class);
encryptedHelper = (EncryptedHelper) constructor.newInstance(
this, context, name, version, loadSQLCipherNativeLibs);
} catch (Exception e) {
throw new DaoException(e);
}
}
return encryptedHelper;
}
/**
* Use this to initialize an encrypted SQLCipher database.
*
* @see #onCreate(Database)
* @see #onUpgrade(Database, int, int)
*/
public Database getEncryptedWritableDb(String password) {
EncryptedHelper encryptedHelper = checkEncryptedHelper();
return encryptedHelper.getEncryptedWritableDb(password);
}
/**
* Use this to initialize an encrypted SQLCipher database.
*
* @see #onCreate(Database)
* @see #onUpgrade(Database, int, int)
*/
public Database getEncryptedWritableDb(char[] password) {
EncryptedHelper encryptedHelper = checkEncryptedHelper();
return encryptedHelper.getEncryptedWritableDb(password);
}
/**
* Use this to initialize an encrypted SQLCipher database.
*
* @see #onCreate(Database)
* @see #onUpgrade(Database, int, int)
*/
public Database getEncryptedReadableDb(String password) {
EncryptedHelper encryptedHelper = checkEncryptedHelper();
return encryptedHelper.getEncryptedReadableDb(password);
}
/**
* Use this to initialize an encrypted SQLCipher database.
*
* @see #onCreate(Database)
* @see #onUpgrade(Database, int, int)
*/
public Database getEncryptedReadableDb(char[] password) {
EncryptedHelper encryptedHelper = checkEncryptedHelper();
return encryptedHelper.getEncryptedReadableDb(password);
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/DatabaseStatement.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.database;
public interface DatabaseStatement {
void execute();
long simpleQueryForLong();
void bindNull(int index);
long executeInsert();
void bindString(int index, String value);
void bindBlob(int index, byte[] value);
void bindLong(int index, long value);
void clearBindings();
void bindDouble(int index, double value);
void close();
Object getRawStatement();
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/EncryptedDatabase.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.database;
import android.database.Cursor;
import android.database.SQLException;
import net.sqlcipher.database.SQLiteDatabase;
public class EncryptedDatabase implements Database {
private final SQLiteDatabase delegate;
public EncryptedDatabase(SQLiteDatabase delegate) {
this.delegate = delegate;
}
@Override
public Cursor rawQuery(String sql, String[] selectionArgs) {
return delegate.rawQuery(sql, selectionArgs);
}
@Override
public void execSQL(String sql) throws SQLException {
delegate.execSQL(sql);
}
@Override
public void beginTransaction() {
delegate.beginTransaction();
}
@Override
public void endTransaction() {
delegate.endTransaction();
}
@Override
public boolean inTransaction() {
return delegate.inTransaction();
}
@Override
public void setTransactionSuccessful() {
delegate.setTransactionSuccessful();
}
@Override
public void execSQL(String sql, Object[] bindArgs) throws SQLException {
delegate.execSQL(sql, bindArgs);
}
@Override
public DatabaseStatement compileStatement(String sql) {
return new EncryptedDatabaseStatement(delegate.compileStatement(sql));
}
@Override
public boolean isDbLockedByCurrentThread() {
return delegate.isDbLockedByCurrentThread();
}
@Override
public boolean isOpen() {
return delegate.isOpen();
}
@Override
public void close() {
delegate.close();
}
@Override
public Object getRawDatabase() {
return delegate;
}
public SQLiteDatabase getSQLiteDatabase() {
return delegate;
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/EncryptedDatabaseStatement.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.database;
import net.sqlcipher.database.SQLiteStatement;
public class EncryptedDatabaseStatement implements DatabaseStatement {
private final SQLiteStatement delegate;
public EncryptedDatabaseStatement(SQLiteStatement delegate) {
this.delegate = delegate;
}
@Override
public void execute() {
delegate.execute();
}
@Override
public long simpleQueryForLong() {
return delegate.simpleQueryForLong();
}
@Override
public void bindNull(int index) {
delegate.bindNull(index);
}
@Override
public long executeInsert() {
return delegate.executeInsert();
}
@Override
public void bindString(int index, String value) {
delegate.bindString(index, value);
}
@Override
public void bindBlob(int index, byte[] value) {
delegate.bindBlob(index, value);
}
@Override
public void bindLong(int index, long value) {
delegate.bindLong(index, value);
}
@Override
public void clearBindings() {
delegate.clearBindings();
}
@Override
public void bindDouble(int index, double value) {
delegate.bindDouble(index, value);
}
@Override
public void close() {
delegate.close();
}
@Override
public Object getRawStatement() {
return delegate;
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/SqlCipherEncryptedHelper.java
================================================
package org.greenrobot.greendao.database;
import android.content.Context;
import net.sqlcipher.database.SQLiteDatabase;
import net.sqlcipher.database.SQLiteOpenHelper;
class SqlCipherEncryptedHelper extends SQLiteOpenHelper implements DatabaseOpenHelper.EncryptedHelper {
private final DatabaseOpenHelper delegate;
public SqlCipherEncryptedHelper(DatabaseOpenHelper delegate, Context context, String name, int version, boolean loadLibs) {
super(context, name, null, version);
this.delegate = delegate;
if (loadLibs) {
SQLiteDatabase.loadLibs(context);
}
}
private Database wrap(SQLiteDatabase sqLiteDatabase) {
return new EncryptedDatabase(sqLiteDatabase);
}
@Override
public void onCreate(SQLiteDatabase db) {
delegate.onCreate(wrap(db));
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
delegate.onUpgrade(wrap(db), oldVersion, newVersion);
}
@Override
public void onOpen(SQLiteDatabase db) {
delegate.onOpen(wrap(db));
}
@Override
public Database getEncryptedReadableDb(String password) {
return wrap(getReadableDatabase(password));
}
@Override
public Database getEncryptedReadableDb(char[] password) {
return wrap(getReadableDatabase(password));
}
@Override
public Database getEncryptedWritableDb(String password) {
return wrap(getWritableDatabase(password));
}
@Override
public Database getEncryptedWritableDb(char[] password) {
return wrap(getWritableDatabase(password));
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/StandardDatabase.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.database;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
public class StandardDatabase implements Database {
private final SQLiteDatabase delegate;
public StandardDatabase(SQLiteDatabase delegate) {
this.delegate = delegate;
}
@Override
public Cursor rawQuery(String sql, String[] selectionArgs) {
return delegate.rawQuery(sql, selectionArgs);
}
@Override
public void execSQL(String sql) throws SQLException {
delegate.execSQL(sql);
}
@Override
public void beginTransaction() {
delegate.beginTransaction();
}
@Override
public void endTransaction() {
delegate.endTransaction();
}
@Override
public boolean inTransaction() {
return delegate.inTransaction();
}
@Override
public void setTransactionSuccessful() {
delegate.setTransactionSuccessful();
}
@Override
public void execSQL(String sql, Object[] bindArgs) throws SQLException {
delegate.execSQL(sql, bindArgs);
}
@Override
public DatabaseStatement compileStatement(String sql) {
return new StandardDatabaseStatement(delegate.compileStatement(sql));
}
@Override
public boolean isDbLockedByCurrentThread() {
return delegate.isDbLockedByCurrentThread();
}
@Override
public boolean isOpen() {
return delegate.isOpen();
}
@Override
public void close() {
delegate.close();
}
@Override
public Object getRawDatabase() {
return delegate;
}
public SQLiteDatabase getSQLiteDatabase() {
return delegate;
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/StandardDatabaseStatement.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.database;
import android.database.sqlite.SQLiteStatement;
public class StandardDatabaseStatement implements DatabaseStatement {
private final SQLiteStatement delegate;
public StandardDatabaseStatement(SQLiteStatement delegate) {
this.delegate = delegate;
}
@Override
public void execute() {
delegate.execute();
}
@Override
public long simpleQueryForLong() {
return delegate.simpleQueryForLong();
}
@Override
public void bindNull(int index) {
delegate.bindNull(index);
}
@Override
public long executeInsert() {
return delegate.executeInsert();
}
@Override
public void bindString(int index, String value) {
delegate.bindString(index, value);
}
@Override
public void bindBlob(int index, byte[] value) {
delegate.bindBlob(index, value);
}
@Override
public void bindLong(int index, long value) {
delegate.bindLong(index, value);
}
@Override
public void clearBindings() {
delegate.clearBindings();
}
@Override
public void bindDouble(int index, double value) {
delegate.bindDouble(index, value);
}
@Override
public void close() {
delegate.close();
}
@Override
public Object getRawStatement() {
return delegate;
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/identityscope/IdentityScope.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.identityscope;
/**
* Common interface for a identity scopes needed internally by greenDAO. Identity scopes let greenDAO re-use Java
* objects.
*
* @author Markus
*
* @param <K>
* Key
* @param <T>
* Entity
*/
public interface IdentityScope<K, T> {
T get(K key);
void put(K key, T entity);
T getNoLock(K key);
void putNoLock(K key, T entity);
boolean detach(K key, T entity);
void remove(K key);
void remove(Iterable<K> key);
void clear();
void lock();
void unlock();
void reserveRoom(int count);
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/identityscope/IdentityScopeLong.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.identityscope;
import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
import java.util.concurrent.locks.ReentrantLock;
import org.greenrobot.greendao.internal.LongHashMap;
/**
* The context for entity identities. Provides the scope in which entities will be tracked and managed.
*
* @author Markus
* @param <T>
* Entity
*/
public class IdentityScopeLong<T> implements IdentityScope<Long, T> {
private final LongHashMap<Reference<T>> map;
private final ReentrantLock lock;
public IdentityScopeLong() {
map = new LongHashMap<Reference<T>>();
lock = new ReentrantLock();
}
@Override
public T get(Long key) {
return get2(key);
}
@Override
public T getNoLock(Long key) {
return get2NoLock(key);
}
public T get2(long key) {
lock.lock();
Reference<T> ref;
try {
ref = map.get(key);
} finally {
lock.unlock();
}
if (ref != null) {
return ref.get();
} else {
return null;
}
}
public T get2NoLock(long key) {
Reference<T> ref = map.get(key);
if (ref != null) {
return ref.get();
} else {
return null;
}
}
@Override
public void put(Long key, T entity) {
put2(key, entity);
}
@Override
public void putNoLock(Long key, T entity) {
put2NoLock(key, entity);
}
public void put2(long key, T entity) {
lock.lock();
try {
map.put(key, new WeakReference<T>(entity));
} finally {
lock.unlock();
}
}
public void put2NoLock(long key, T entity) {
map.put(key, new WeakReference<T>(entity));
}
@Override
public boolean detach(Long key, T entity) {
lock.lock();
try {
if (get(key) == entity && entity != null) {
remove(key);
return true;
} else {
return false;
}
} finally {
lock.unlock();
}
}
@Override
public void remove(Long key) {
lock.lock();
try {
map.remove(key);
} finally {
lock.unlock();
}
}
@Override
public void remove(Iterable<Long> keys) {
lock.lock();
try {
for (Long key : keys) {
map.remove(key);
}
} finally {
lock.unlock();
}
}
@Override
public void clear() {
lock.lock();
try {
map.clear();
} finally {
lock.unlock();
}
}
@Override
public void lock() {
lock.lock();
}
@Override
public void unlock() {
lock.unlock();
}
@Override
public void reserveRoom(int count) {
map.reserveRoom(count);
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/identityscope/IdentityScopeObject.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.identityscope;
import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.concurrent.locks.ReentrantLock;
/**
* The context for entity identities. Provides the scope in which entities will be tracked and managed.
*
* @author Markus
* @param <K>
* @param <T>
*/
public class IdentityScopeObject<K, T> implements IdentityScope<K, T> {
private final HashMap<K, Reference<T>> map;
private final ReentrantLock lock;
public IdentityScopeObject() {
map = new HashMap<K, Reference<T>>();
lock = new ReentrantLock();
}
@Override
public T get(K key) {
Reference<T> ref;
lock.lock();
try {
ref = map.get(key);
} finally {
lock.unlock();
}
if (ref != null) {
return ref.get();
} else {
return null;
}
}
@Override
public T getNoLock(K key) {
Reference<T> ref = map.get(key);
if (ref != null) {
return ref.get();
} else {
return null;
}
}
@Override
public void put(K key, T entity) {
lock.lock();
try {
map.put(key, new WeakReference<T>(entity));
} finally {
lock.unlock();
}
}
@Override
public void putNoLock(K key, T entity) {
map.put(key, new WeakReference<T>(entity));
}
@Override
public boolean detach(K key, T entity) {
lock.lock();
try {
if (get(key) == entity && entity != null) {
remove(key);
return true;
} else {
return false;
}
} finally {
lock.unlock();
}
}
@Override
public void remove(K key) {
lock.lock();
try {
map.remove(key);
} finally {
lock.unlock();
}
}
@Override
public void remove(Iterable< K> keys) {
lock.lock();
try {
for (K key : keys) {
map.remove(key);
}
} finally {
lock.unlock();
}
}
@Override
public void clear() {
lock.lock();
try {
map.clear();
} finally {
lock.unlock();
}
}
@Override
public void lock() {
lock.lock();
}
@Override
public void unlock() {
lock.unlock();
}
@Override
public void reserveRoom(int count) {
// HashMap does not allow
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/identityscope/IdentityScopeType.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.identityscope;
public enum IdentityScopeType {
Session, None
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/internal/DaoConfig.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.internal;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.List;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.DaoException;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.Property;
import org.greenrobot.greendao.identityscope.IdentityScope;
import org.greenrobot.greendao.identityscope.IdentityScopeLong;
import org.greenrobot.greendao.identityscope.IdentityScopeObject;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
/**
* Internal class used by greenDAO. DaoConfig stores essential data for DAOs, and is hold by AbstractDaoMaster. This
* class will retrieve the required information from the DAO classes.
*/
public final class DaoConfig implements Cloneable {
public final Database db;
public final String tablename;
public final Property[] properties;
public final String[] allColumns;
public final String[] pkColumns;
public final String[] nonPkColumns;
/** Single property PK or null if there's no PK or a multi property PK. */
public final Property pkProperty;
public final boolean keyIsNumeric;
public final TableStatements statements;
private IdentityScope<?, ?> identityScope;
public DaoConfig(Database db, Class<? extends AbstractDao<?, ?>> daoClass) {
this.db = db;
try {
this.tablename = (String) daoClass.getField("TABLENAME").get(null);
Property[] properties = reflectProperties(daoClass);
this.properties = properties;
allColumns = new String[properties.length];
List<String> pkColumnList = new ArrayList<String>();
List<String> nonPkColumnList = new ArrayList<String>();
Property lastPkProperty = null;
for (int i = 0; i < properties.length; i++) {
Property property = properties[i];
String name = property.columnName;
allColumns[i] = name;
if (property.primaryKey) {
pkColumnList.add(name);
lastPkProperty = property;
} else {
nonPkColumnList.add(name);
}
}
String[] nonPkColumnsArray = new String[nonPkColumnList.size()];
nonPkColumns = nonPkColumnList.toArray(nonPkColumnsArray);
String[] pkColumnsArray = new String[pkColumnList.size()];
pkColumns = pkColumnList.toArray(pkColumnsArray);
pkProperty = pkColumns.length == 1 ? lastPkProperty : null;
statements = new TableStatements(db, tablename, allColumns, pkColumns);
if (pkProperty != null) {
Class<?> type = pkProperty.type;
keyIsNumeric = type.equals(long.class) || type.equals(Long.class) || type.equals(int.class)
|| type.equals(Integer.class) || type.equals(short.class) || type.equals(Short.class)
|| type.equals(byte.class) || type.equals(Byte.class);
} else {
keyIsNumeric = false;
}
} catch (Exception e) {
throw new DaoException("Could not init DAOConfig", e);
}
}
private static Property[] reflectProperties(Class<? extends AbstractDao<?, ?>> daoClass)
throws ClassNotFoundException, IllegalArgumentException, IllegalAccessException {
Class<?> propertiesClass = Class.forName(daoClass.getName() + "$Properties");
Field[] fields = propertiesClass.getDeclaredFields();
ArrayList<Property> propertyList = new ArrayList<Property>();
final int modifierMask = Modifier.STATIC | Modifier.PUBLIC;
for (Field field : fields) {
// There might be other fields introduced by some tools, just ignore them (see issue #28)
if ((field.getModifiers() & modifierMask) == modifierMask) {
Object fieldValue = field.get(null);
if (fieldValue instanceof Property) {
propertyList.add((Property) fieldValue);
}
}
}
Property[] properties = new Property[propertyList.size()];
for (Property property : propertyList) {
if (properties[property.ordinal] != null) {
throw new DaoException("Duplicate property ordinals");
}
properties[property.ordinal] = property;
}
return properties;
}
/** Does not copy identity scope. */
public DaoConfig(DaoConfig source) {
db = source.db;
tablename = source.tablename;
properties = source.properties;
allColumns = source.allColumns;
pkColumns = source.pkColumns;
nonPkColumns = source.nonPkColumns;
pkProperty = source.pkProperty;
statements = source.statements;
keyIsNumeric = source.keyIsNumeric;
}
/** Does not copy identity scope. */
@Override
public DaoConfig clone() {
return new DaoConfig(this);
}
public IdentityScope<?, ?> getIdentityScope() {
return identityScope;
}
/**
* Clears the identify scope if it exists.
*/
public void clearIdentityScope() {
IdentityScope<?, ?> identityScope = this.identityScope;
if(identityScope != null) {
identityScope.clear();
}
}
public void setIdentityScope(IdentityScope<?, ?> identityScope) {
this.identityScope = identityScope;
}
@SuppressWarnings("rawtypes")
public void initIdentityScope(IdentityScopeType type) {
if (type == IdentityScopeType.None) {
identityScope = null;
} else if (type == IdentityScopeType.Session) {
if (keyIsNumeric) {
identityScope = new IdentityScopeLong();
} else {
identityScope = new IdentityScopeObject();
}
} else {
throw new IllegalArgumentException("Unsupported type: " + type);
}
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/internal/FastCursor.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.internal;
import android.content.ContentResolver;
import android.database.CharArrayBuffer;
import android.database.ContentObserver;
import android.database.Cursor;
import android.database.CursorWindow;
import android.database.DataSetObserver;
import android.net.Uri;
import android.os.Bundle;
/** Internal class used by greenDAO. */
final public class FastCursor implements Cursor {
private final CursorWindow window;
private int position;
private final int count;
public FastCursor(CursorWindow window) {
this.window = window;
count = window.getNumRows();
}
@Override
public int getCount() {
return window.getNumRows();
}
@Override
public int getPosition() {
return position;
}
@Override
public boolean move(int offset) {
return moveToPosition(position + offset);
}
@Override
public boolean moveToPosition(int position) {
if (position >= 0 && position < count) {
this.position = position;
return true;
} else {
return false;
}
}
@Override
public boolean moveToFirst() {
position = 0;
return count > 0;
}
@Override
public boolean moveToLast() {
if (count > 0) {
position = count - 1;
return true;
} else {
return false;
}
}
@Override
public boolean moveToNext() {
if (position < count - 1) {
position++;
return true;
} else {
return false;
}
}
@Override
public boolean moveToPrevious() {
if (position > 0) {
position--;
return true;
} else {
return false;
}
}
@Override
public boolean isFirst() {
return position == 0;
}
@Override
public boolean isLast() {
return position == count - 1;
}
@Override
public boolean isBeforeFirst() {
throw new UnsupportedOperationException();
}
@Override
public boolean isAfterLast() {
throw new UnsupportedOperationException();
}
@Override
public int getColumnIndex(String columnName) {
throw new UnsupportedOperationException();
}
@Override
public int getColumnIndexOrThrow(String columnName) throws IllegalArgumentException {
throw new UnsupportedOperationException();
}
@Override
public String getColumnName(int columnIndex) {
throw new UnsupportedOperationException();
}
@Override
public String[] getColumnNames() {
throw new UnsupportedOperationException();
}
@Override
public int getColumnCount() {
throw new UnsupportedOperationException();
}
@Override
public byte[] getBlob(int columnIndex) {
return window.getBlob(position, columnIndex);
}
@Override
public String getString(int columnIndex) {
return window.getString(position, columnIndex);
}
@Override
public void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer) {
throw new UnsupportedOperationException();
}
@Override
public short getShort(int columnIndex) {
return window.getShort(position, columnIndex);
}
@Override
public int getInt(int columnIndex) {
return window.getInt(position, columnIndex);
}
@Override
public long getLong(int columnIndex) {
return window.getLong(position, columnIndex);
}
@Override
public float getFloat(int columnIndex) {
return window.getFloat(position, columnIndex);
}
@Override
public double getDouble(int columnIndex) {
return window.getDouble(position, columnIndex);
}
@SuppressWarnings("deprecation")
@Override
public boolean isNull(int columnIndex) {
return window.isNull(position, columnIndex);
}
@Override
public void deactivate() {
throw new UnsupportedOperationException();
}
@Override
public boolean requery() {
throw new UnsupportedOperationException();
}
@Override
public void close() {
throw new UnsupportedOperationException();
}
@Override
public boolean isClosed() {
throw new UnsupportedOperationException();
}
@Override
public void registerContentObserver(ContentObserver observer) {
throw new UnsupportedOperationException();
}
@Override
public void unregisterContentObserver(ContentObserver observer) {
throw new UnsupportedOperationException();
}
@Override
public void registerDataSetObserver(DataSetObserver observer) {
throw new UnsupportedOperationException();
}
@Override
public void unregisterDataSetObserver(DataSetObserver observer) {
throw new UnsupportedOperationException();
}
@Override
public void setNotificationUri(ContentResolver cr, Uri uri) {
throw new UnsupportedOperationException();
}
@Override
public boolean getWantsAllOnMoveCalls() {
throw new UnsupportedOperationException();
}
@Override
public Bundle getExtras() {
throw new UnsupportedOperationException();
}
@Override
public Bundle respond(Bundle extras) {
throw new UnsupportedOperationException();
}
/** Since API level 11 */
public int getType(int columnIndex) {
throw new UnsupportedOperationException();
}
/** Since API level 19 */
public Uri getNotificationUri() {
return null;
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/internal/LongHashMap.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.internal;
import java.util.Arrays;
import org.greenrobot.greendao.DaoLog;
/**
* An minimalistic hash map optimized for long keys.
*
* @author Markus
*
* @param <T>
* The class to store.
*/
public final class LongHashMap<T> {
final static class Entry<T> {
final long key;
T value;
Entry<T> next;
Entry(long key, T value, Entry<T> next) {
this.key = key;
this.value = value;
this.next = next;
}
}
private Entry<T>[] table;
private int capacity;
private int threshold;
private int size;
public LongHashMap() {
this(16);
}
@SuppressWarnings("unchecked")
public LongHashMap(int capacity) {
this.capacity = capacity;
this.threshold = capacity * 4 / 3;
this.table = new Entry[capacity];
}
public boolean containsKey(long key) {
final int index = ((((int) (key >>> 32)) ^ ((int) (key))) & 0x7fffffff) % capacity;
for (Entry<T> entry = table[index]; entry != null; entry = entry.next) {
if (entry.key == key) {
return true;
}
}
return false;
}
public T get(long key) {
final int index = ((((int) (key >>> 32)) ^ ((int) (key))) & 0x7fffffff) % capacity;
for (Entry<T> entry = table[index]; entry != null; entry = entry.next) {
if (entry.key == key) {
return entry.value;
}
}
return null;
}
public T put(long key, T value) {
final int index = ((((int) (key >>> 32)) ^ ((int) (key))) & 0x7fffffff) % capacity;
final Entry<T> entryOriginal = table[index];
for (Entry<T> entry = entryOriginal; entry != null; entry = entry.next) {
if (entry.key == key) {
T oldValue = entry.value;
entry.value = value;
return oldValue;
}
}
table[index] = new Entry<T>(key, value, entryOriginal);
size++;
if (size > threshold) {
setCapacity(2 * capacity);
}
return null;
}
public T remove(long key) {
int index = ((((int) (key >>> 32)) ^ ((int) (key))) & 0x7fffffff) % capacity;
Entry<T> previous = null;
Entry<T> entry = table[index];
while (entry != null) {
Entry<T> next = entry.next;
if (entry.key == key) {
if (previous == null) {
table[index] = next;
} else {
previous.next = next;
}
size--;
return entry.value;
}
previous = entry;
entry = next;
}
return null;
}
public void clear() {
size = 0;
Arrays.fill(table, null);
}
public int size() {
return size;
}
public void setCapacity(int newCapacity) {
@SuppressWarnings("unchecked")
Entry<T>[] newTable = new Entry[newCapacity];
int length = table.length;
for (int i = 0; i < length; i++) {
Entry<T> entry = table[i];
while (entry != null) {
long key = entry.key;
int index = ((((int) (key >>> 32)) ^ ((int) (key))) & 0x7fffffff) % newCapacity;
Entry<T> originalNext = entry.next;
entry.next = newTable[index];
newTable[index] = entry;
entry = originalNext;
}
}
table = newTable;
capacity = newCapacity;
threshold = newCapacity * 4 / 3;
}
/** Target load: 0,6 */
public void reserveRoom(int entryCount) {
setCapacity(entryCount * 5 / 3);
}
public void logStats() {
int collisions = 0;
for (Entry<T> entry : table) {
while (entry != null && entry.next != null) {
collisions++;
entry = entry.next;
}
}
DaoLog.d("load: " + ((float) size) / capacity + ", size: " + size + ", capa: " + capacity + ", collisions: "
+ collisions + ", collision ratio: " + ((float) collisions) / size);
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/internal/SqlUtils.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.internal;
import org.greenrobot.greendao.DaoException;
import org.greenrobot.greendao.Property;
/** Helper class to create SQL statements as used by greenDAO internally. */
public class SqlUtils {
private final static char[] HEX_ARRAY = "0123456789ABCDEF".toCharArray();
public static StringBuilder appendProperty(StringBuilder builder, String tablePrefix, Property property) {
if (tablePrefix != null) {
builder.append(tablePrefix).append('.');
}
builder.append('"').append(property.columnName).append('"');
return builder;
}
public static StringBuilder appendColumn(StringBuilder builder, String column) {
builder.append('"').append(column).append('"');
return builder;
}
public static StringBuilder appendColumn(StringBuilder builder, String tableAlias, String column) {
builder.append(tableAlias).append(".\"").append(column).append('"');
return builder;
}
public static StringBuilder appendColumns(StringBuilder builder, String tableAlias, String[] columns) {
int length = columns.length;
for (int i = 0; i < length; i++) {
appendColumn(builder, tableAlias, columns[i]);
if (i < length - 1) {
builder.append(',');
}
}
return builder;
}
public static StringBuilder appendColumns(StringBuilder builder, String[] columns) {
int length = columns.length;
for (int i = 0; i < length; i++) {
builder.append('"').append(columns[i]).append('"');
if (i < length - 1) {
builder.append(',');
}
}
return builder;
}
public static StringBuilder appendPlaceholders(StringBuilder builder, int count) {
for (int i = 0; i < count; i++) {
if (i < count - 1) {
builder.append("?,");
} else {
builder.append('?');
}
}
return builder;
}
public static StringBuilder appendColumnsEqualPlaceholders(StringBuilder builder, String[] columns) {
for (int i = 0; i < columns.length; i++) {
appendColumn(builder, columns[i]).append("=?");
if (i < columns.length - 1) {
builder.append(',');
}
}
return builder;
}
public static StringBuilder appendColumnsEqValue(StringBuilder builder, String tableAlias, String[] columns) {
for (int i = 0; i < columns.length; i++) {
appendColumn(builder, tableAlias, columns[i]).append("=?");
if (i < columns.length - 1) {
builder.append(',');
}
}
return builder;
}
public static String createSqlInsert(String insertInto, String tablename, String[] columns) {
StringBuilder builder = new StringBuilder(insertInto);
builder.append('"').append(tablename).append('"').append(" (");
appendColumns(builder, columns);
builder.append(") VALUES (");
appendPlaceholders(builder, columns.length);
builder.append(')');
return builder.toString();
}
/** Creates an select for given columns with a trailing space */
public static String createSqlSelect(String tablename, String tableAlias, String[] columns, boolean distinct) {
if (tableAlias == null || tableAlias.length() < 0) {
throw new DaoException("Table alias required");
}
StringBuilder builder = new StringBuilder(distinct ? "SELECT DISTINCT " : "SELECT ");
SqlUtils.appendColumns(builder, tableAlias, columns).append(" FROM ");
builder.append('"').append(tablename).append('"').append(' ').append(tableAlias).append(' ');
return builder.toString();
}
/** Creates SELECT COUNT(*) with a trailing space. */
public static String createSqlSelectCountStar(String tablename, String tableAliasOrNull) {
StringBuilder builder = new StringBuilder("SELECT COUNT(*) FROM ");
builder.append('"').append(tablename).append('"').append(' ');
if (tableAliasOrNull != null) {
builder.append(tableAliasOrNull).append(' ');
}
return builder.toString();
}
/** Remember: SQLite does not support joins nor table alias for DELETE. */
public static String createSqlDelete(String tablename, String[] columns) {
String quotedTablename = '"' + tablename + '"';
StringBuilder builder = new StringBuilder("DELETE FROM ");
builder.append(quotedTablename);
if (columns != null && columns.length > 0) {
builder.append(" WHERE ");
appendColumnsEqValue(builder, quotedTablename, columns);
}
return builder.toString();
}
public static String createSqlUpdate(String tablename, String[] updateColumns, String[] whereColumns) {
String quotedTablename = '"' + tablename + '"';
StringBuilder builder = new StringBuilder("UPDATE ");
builder.append(quotedTablename).append(" SET ");
appendColumnsEqualPlaceholders(builder, updateColumns);
builder.append(" WHERE ");
appendColumnsEqValue(builder, quotedTablename, whereColumns);
return builder.toString();
}
public static String createSqlCount(String tablename) {
return "SELECT COUNT(*) FROM \"" + tablename +'"';
}
public static String escapeBlobArgument(byte[] bytes) {
return "X'" + toHex(bytes) + '\'';
}
public static String toHex(byte[] bytes) {
char[] hexChars = new char[bytes.length * 2];
for (int i = 0; i < bytes.length; i++) {
int byteValue = bytes[i] & 0xFF;
hexChars[i * 2] = HEX_ARRAY[byteValue >>> 4];
hexChars[i * 2 + 1] = HEX_ARRAY[byteValue & 0x0F];
}
return new String(hexChars);
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/internal/TableStatements.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.internal;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseStatement;
/** Helper class to create SQL statements for specific tables (used by greenDAO internally). */
// Note: avoid locking while compiling any statement (accessing the db) to avoid deadlocks on lock-savvy DBs like
// SQLCipher.
public class TableStatements {
private final Database db;
private final String tablename;
private final String[] allColumns;
private final String[] pkColumns;
private DatabaseStatement insertStatement;
private DatabaseStatement insertOrReplaceStatement;
private DatabaseStatement updateStatement;
private DatabaseStatement deleteStatement;
private DatabaseStatement countStatement;
private volatile String selectAll;
private volatile String selectByKey;
private volatile String selectByRowId;
private volatile String selectKeys;
public TableStatements(Database db, String tablename, String[] allColumns, String[] pkColumns) {
this.db = db;
this.tablename = tablename;
this.allColumns = allColumns;
this.pkColumns = pkColumns;
}
public DatabaseStatement getInsertStatement() {
if (insertStatement == null) {
String sql = SqlUtils.createSqlInsert("INSERT INTO ", tablename, allColumns);
DatabaseStatement newInsertStatement = db.compileStatement(sql);
synchronized (this) {
if (insertStatement == null) {
insertStatement = newInsertStatement;
}
}
if (insertStatement != newInsertStatement) {
newInsertStatement.close();
}
}
return insertStatement;
}
public DatabaseStatement getInsertOrReplaceStatement() {
if (insertOrReplaceStatement == null) {
String sql = SqlUtils.createSqlInsert("INSERT OR REPLACE INTO ", tablename, allColumns);
DatabaseStatement newInsertOrReplaceStatement = db.compileStatement(sql);
synchronized (this) {
if (insertOrReplaceStatement == null) {
insertOrReplaceStatement = newInsertOrReplaceStatement;
}
}
if (insertOrReplaceStatement != newInsertOrReplaceStatement) {
newInsertOrReplaceStatement.close();
}
}
return insertOrReplaceStatement;
}
public DatabaseStatement getDeleteStatement() {
if (deleteStatement == null) {
String sql = SqlUtils.createSqlDelete(tablename, pkColumns);
DatabaseStatement newDeleteStatement = db.compileStatement(sql);
synchronized (this) {
if (deleteStatement == null) {
deleteStatement = newDeleteStatement;
}
}
if (deleteStatement != newDeleteStatement) {
newDeleteStatement.close();
}
}
return deleteStatement;
}
public DatabaseStatement getUpdateStatement() {
if (updateStatement == null) {
String sql = SqlUtils.createSqlUpdate(tablename, allColumns, pkColumns);
DatabaseStatement newUpdateStatement = db.compileStatement(sql);
synchronized (this) {
if (updateStatement == null) {
updateStatement = newUpdateStatement;
}
}
if (updateStatement != newUpdateStatement) {
newUpdateStatement.close();
}
}
return updateStatement;
}
public DatabaseStatement getCountStatement() {
if (countStatement == null) {
String sql = SqlUtils.createSqlCount(tablename);
countStatement = db.compileStatement(sql);
}
return countStatement;
}
/** ends with an space to simplify appending to this string. */
public String getSelectAll() {
if (selectAll == null) {
selectAll = SqlUtils.createSqlSelect(tablename, "T", allColumns, false);
}
return selectAll;
}
/** ends with an space to simplify appending to this string. */
public String getSelectKeys() {
if (selectKeys == null) {
selectKeys = SqlUtils.createSqlSelect(tablename, "T", pkColumns, false);
}
return selectKeys;
}
// TODO precompile
public String getSelectByKey() {
if (selectByKey == null) {
StringBuilder builder = new StringBuilder(getSelectAll());
builder.append("WHERE ");
SqlUtils.appendColumnsEqValue(builder, "T", pkColumns);
selectByKey = builder.toString();
}
return selectByKey;
}
public String getSelectByRowId() {
if (selectByRowId == null) {
selectByRowId = getSelectAll() + "WHERE ROWID=?";
}
return selectByRowId;
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/AbstractQuery.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.query;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.DaoException;
import org.greenrobot.greendao.InternalQueryDaoAccess;
import java.util.Date;
/**
* A repeatable query returning entities.
*
* @author Markus
*
* @param <T>
* The entity class the query will return results for.
*/
// TODO support long, double and other types, not just Strings, for parameters
// TODO Make parameters setable by Property (if unique in parameters)
// TODO Make query compilable
abstract class AbstractQuery<T> {
protected final AbstractDao<T, ?> dao;
protected final InternalQueryDaoAccess<T> daoAccess;
protected final String sql;
protected final String[] parameters;
protected final Thread ownerThread;
protected static String[] toStringArray(Object[] values) {
int length = values.length;
String[] strings = new String[length];
for (int i = 0; i < length; i++) {
Object object = values[i];
if (object != null) {
strings[i] = object.toString();
} else {
strings[i] = null;
}
}
return strings;
}
protected AbstractQuery(AbstractDao<T, ?> dao, String sql, String[] parameters) {
this.dao = dao;
this.daoAccess = new InternalQueryDaoAccess<T>(dao);
this.sql = sql;
this.parameters = parameters;
ownerThread = Thread.currentThread();
}
// public void compile() {
// // TODO implement compile
// }
/**
* Sets the parameter (0 based) using the position in which it was added during building the query.
*/
public AbstractQuery<T> setParameter(int index, Object parameter) {
checkThread();
if (parameter != null) {
parameters[index] = parameter.toString();
} else {
parameters[index] = null;
}
return this;
}
/**
* @see #setParameter(int, Object)
*/
public AbstractQuery<T> setParameter(int index, Date parameter) {
Long converted = parameter != null ? parameter.getTime() : null;
return setParameter(index, converted);
}
/**
* @see #setParameter(int, Object)
*/
public AbstractQuery<T> setParameter(int index, Boolean parameter) {
Integer converted = parameter != null ? (parameter ? 1 : 0) : null;
return setParameter(index, converted);
}
protected void checkThread() {
if (Thread.currentThread() != ownerThread) {
throw new DaoException(
"Method may be called only in owner thread, use forCurrentThread to get an instance for this thread");
}
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/AbstractQueryData.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.query;
import org.greenrobot.greendao.AbstractDao;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
abstract class AbstractQueryData<T, Q extends AbstractQuery<T>> {
final String sql;
final AbstractDao<T, ?> dao;
final String[] initialValues;
final Map<Long, WeakReference<Q>> queriesForThreads;
AbstractQueryData(AbstractDao<T, ?> dao, String sql, String[] initialValues) {
this.dao = dao;
this.sql = sql;
this.initialValues = initialValues;
queriesForThreads = new HashMap<>();
}
/**
* Just an optimized version, which performs faster if the current thread is already the query's owner thread.
* Note: all parameters are reset to their initial values specified in {@link QueryBuilder}.
*/
Q forCurrentThread(Q query) {
if (Thread.currentThread() == query.ownerThread) {
System.arraycopy(initialValues, 0, query.parameters, 0, initialValues.length);
return query;
} else {
return forCurrentThread();
}
}
/**
* Note: all parameters are reset to their initial values specified in {@link QueryBuilder}.
*/
Q forCurrentThread() {
// Process.myTid() seems to have issues on some devices (see Github #376) and Robolectric (#171):
// We use currentThread().getId() instead (unfortunately return a long, can not use SparseArray).
// PS.: thread ID may be reused, which should be fine because old thread will be gone anyway.
long threadId = Thread.currentThread().getId();
synchronized (queriesForThreads) {
WeakReference<Q> queryRef = queriesForThreads.get(threadId);
Q query = queryRef != null ? queryRef.get() : null;
if (query == null) {
gc();
query = createQuery();
queriesForThreads.put(threadId, new WeakReference<Q>(query));
} else {
System.arraycopy(initialValues, 0, query.parameters, 0, initialValues.length);
}
return query;
}
}
abstract protected Q createQuery();
void gc() {
synchronized (queriesForThreads) {
Iterator<Entry<Long, WeakReference<Q>>> iterator = queriesForThreads.entrySet().iterator();
while (iterator.hasNext()) {
Entry<Long, WeakReference<Q>> entry = iterator.next();
if (entry.getValue().get() == null) {
iterator.remove();
}
}
}
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/AbstractQueryWithLimit.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.query;
import org.greenrobot.greendao.AbstractDao;
/**
* Base class for queries returning data (entities or cursor).
*
* @param <T> The entity class the query will return results for.
* @author Markus
*/
// TODO Query for PKs/ROW IDs
abstract class AbstractQueryWithLimit<T> extends AbstractQuery<T> {
protected final int limitPosition;
protected final int offsetPosition;
protected AbstractQueryWithLimit(AbstractDao<T, ?> dao, String sql, String[] initialValues, int limitPosition,
int offsetPosition) {
super(dao, sql, initialValues);
this.limitPosition = limitPosition;
this.offsetPosition = offsetPosition;
}
/**
* Sets the parameter (0 based) using the position in which it was added during building the query. Note: all
* standard WHERE parameters come first. After that come the WHERE parameters of joins (if any).
*/
public AbstractQueryWithLimit<T> setParameter(int index, Object parameter) {
if (index >= 0 && (index == limitPosition || index == offsetPosition)) {
throw new IllegalArgumentException("Illegal parameter index: " + index);
}
return (AbstractQueryWithLimit<T>) super.setParameter(index, parameter);
}
/**
* Sets the limit of the maximum number of results returned by this Query. {@link
* org.greenrobot.greendao.query.QueryBuilder#limit(int)} must
* have been called on the QueryBuilder that created this Query object.
*/
public void setLimit(int limit) {
checkThread();
if (limitPosition == -1) {
throw new IllegalStateException("Limit must be set with QueryBuilder before it can be used here");
}
parameters[limitPosition] = Integer.toString(limit);
}
/**
* Sets the offset for results returned by this Query. {@link org.greenrobot.greendao.query.QueryBuilder#offset(int)} must
* have been called on
* the QueryBuilder that created this Query object.
*/
public void setOffset(int offset) {
checkThread();
if (offsetPosition == -1) {
throw new IllegalStateException("Offset must be set with QueryBuilder before it can be used here");
}
parameters[offsetPosition] = Integer.toString(offset);
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/CloseableListIterator.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.query;
import java.io.Closeable;
import java.util.ListIterator;
/**
* A list iterator that needs to be closed (or the associated list) to free underlying resources like a database cursor.
* Typically used with LazyList.
*
* @author Markus
*
* @param <T>
*/
public interface CloseableListIterator<T> extends ListIterator<T>, Closeable {
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/CountQuery.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.query;
import android.database.Cursor;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.DaoException;
import java.util.Date;
public class CountQuery<T> extends AbstractQuery<T> {
private final static class QueryData<T2> extends AbstractQueryData<T2, CountQuery<T2>> {
private QueryData(AbstractDao<T2, ?> dao, String sql, String[] initialValues) {
super(dao, sql, initialValues);
}
@Override
protected CountQuery<T2> createQuery() {
return new CountQuery<T2>(this, dao, sql, initialValues.clone());
}
}
static <T2> CountQuery<T2> create(AbstractDao<T2, ?> dao, String sql, Object[] initialValues) {
QueryData<T2> queryData = new QueryData<T2>(dao, sql, toStringArray(initialValues));
return queryData.forCurrentThread();
}
private final QueryData<T> queryData;
private CountQuery(QueryData<T> queryData, AbstractDao<T, ?> dao, String sql, String[] initialValues) {
super(dao, sql, initialValues);
this.queryData = queryData;
}
public CountQuery<T> forCurrentThread() {
return queryData.forCurrentThread(this);
}
/** Returns the count (number of results matching the query). Uses SELECT COUNT (*) sematics. */
public long count() {
checkThread();
Cursor cursor = dao.getDatabase().rawQuery(sql, parameters);
try {
if (!cursor.moveToNext()) {
throw new DaoException("No result for count");
} else if (!cursor.isLast()) {
throw new DaoException("Unexpected row count: " + cursor.getCount());
} else if (cursor.getColumnCount() != 1) {
throw new DaoException("Unexpected column count: " + cursor.getColumnCount());
}
return cursor.getLong(0);
} finally {
cursor.close();
}
}
// copy setParameter methods to allow easy chaining
@Override
public CountQuery<T> setParameter(int index, Object parameter) {
return (CountQuery<T>) super.setParameter(index, parameter);
}
@Override
public CountQuery<T> setParameter(int index, Date parameter) {
return (CountQuery<T>) super.setParameter(index, parameter);
}
@Override
public CountQuery<T> setParameter(int index, Boolean parameter) {
return (CountQuery<T>) super.setParameter(index, parameter);
}
}
================================================
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/CursorQuery.java
================================================
/*
* Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.greenrobot.greendao.query;
import android.database.Cursor;
import org.greenrobot.greendao.AbstractDao;
import java.util.Date;
/**
* A repeatable query returning a raw android.database.Cursor. Note, that using cursors is usually a hassle and
* greenDAO provides a higher level abstraction using entities (see {@link org.greenrobot.greendao.query.Query}). This class
* can nevertheless be useful to work with legacy code that is based on Cursors or CursorLoaders.
*
* @param <T> The entity class the query will return results for.
* @author Markus
*/
public class CursorQuery<T> extends AbstractQueryWithLimit<T> {
private final static class QueryData<T2> extends AbstractQueryData<T2, CursorQuery<T2>> {
private final int limitPosition;
private final int offsetPosition;
QueryData(AbstractDao dao, String sql, String[] initialValues, int limitPosition, int offsetPosition) {
super(dao, sql, initialValues);
this.limitPosition = limitPosition;
this.offsetPosition = offsetPosition;
gitextract_u02juyft/
├── .gitignore
├── .travis.yml
├── CONTRIBUTING.md
├── DaoCore/
│ ├── .gitignore
│ ├── LICENSE
│ ├── NOTICE
│ ├── build.gradle
│ ├── libs/
│ │ └── sqlcipher.jar
│ └── src/
│ └── main/
│ └── java/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ ├── AbstractDao.java
│ ├── AbstractDaoMaster.java
│ ├── AbstractDaoSession.java
│ ├── DaoException.java
│ ├── DaoLog.java
│ ├── DbUtils.java
│ ├── InternalQueryDaoAccess.java
│ ├── InternalUnitTestDaoAccess.java
│ ├── Property.java
│ ├── async/
│ │ ├── AsyncDaoException.java
│ │ ├── AsyncOperation.java
│ │ ├── AsyncOperationExecutor.java
│ │ ├── AsyncOperationListener.java
│ │ └── AsyncSession.java
│ ├── database/
│ │ ├── Database.java
│ │ ├── DatabaseOpenHelper.java
│ │ ├── DatabaseStatement.java
│ │ ├── EncryptedDatabase.java
│ │ ├── EncryptedDatabaseStatement.java
│ │ ├── SqlCipherEncryptedHelper.java
│ │ ├── StandardDatabase.java
│ │ └── StandardDatabaseStatement.java
│ ├── identityscope/
│ │ ├── IdentityScope.java
│ │ ├── IdentityScopeLong.java
│ │ ├── IdentityScopeObject.java
│ │ └── IdentityScopeType.java
│ ├── internal/
│ │ ├── DaoConfig.java
│ │ ├── FastCursor.java
│ │ ├── LongHashMap.java
│ │ ├── SqlUtils.java
│ │ └── TableStatements.java
│ ├── query/
│ │ ├── AbstractQuery.java
│ │ ├── AbstractQueryData.java
│ │ ├── AbstractQueryWithLimit.java
│ │ ├── CloseableListIterator.java
│ │ ├── CountQuery.java
│ │ ├── CursorQuery.java
│ │ ├── DeleteQuery.java
│ │ ├── Join.java
│ │ ├── LazyList.java
│ │ ├── Query.java
│ │ ├── QueryBuilder.java
│ │ ├── WhereCollector.java
│ │ └── WhereCondition.java
│ ├── rx/
│ │ ├── RxBase.java
│ │ ├── RxDao.java
│ │ ├── RxQuery.java
│ │ ├── RxTransaction.java
│ │ └── RxUtils.java
│ └── test/
│ ├── AbstractDaoSessionTest.java
│ ├── AbstractDaoTest.java
│ ├── AbstractDaoTestLongPk.java
│ ├── AbstractDaoTestSinglePk.java
│ ├── AbstractDaoTestStringPk.java
│ └── DbTest.java
├── DaoGenerator/
│ ├── .freemarker-ide.xml
│ ├── .gitignore
│ ├── build.gradle
│ ├── performance/
│ │ ├── galaxy-nexus.xlsx
│ │ └── performance-data.xlsx
│ ├── src/
│ │ └── org/
│ │ └── greenrobot/
│ │ └── greendao/
│ │ └── generator/
│ │ ├── ContentProvider.java
│ │ ├── DaoGenerator.java
│ │ ├── DaoUtil.java
│ │ ├── Entity.java
│ │ ├── Index.java
│ │ ├── Property.java
│ │ ├── PropertyOrderList.java
│ │ ├── PropertyType.java
│ │ ├── Query.java
│ │ ├── QueryParam.java
│ │ ├── Schema.java
│ │ ├── ToMany.java
│ │ ├── ToManyBase.java
│ │ ├── ToManyWithJoinEntity.java
│ │ └── ToOne.java
│ ├── src-template/
│ │ ├── content-provider.ftl
│ │ ├── dao-deep.ftl
│ │ ├── dao-master.ftl
│ │ ├── dao-session.ftl
│ │ ├── dao-unit-test.ftl
│ │ ├── dao.ftl
│ │ └── entity.ftl
│ └── src-test/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ └── generator/
│ └── SimpleDaoGeneratorTest.java
├── README.md
├── build.gradle
├── examples/
│ ├── DaoExample/
│ │ ├── build.gradle
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── org/
│ │ │ └── greenrobot/
│ │ │ └── greendao/
│ │ │ └── example/
│ │ │ └── NoteTest.java
│ │ └── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── org/
│ │ │ └── greenrobot/
│ │ │ └── greendao/
│ │ │ └── example/
│ │ │ ├── App.java
│ │ │ ├── Note.java
│ │ │ ├── NoteActivity.java
│ │ │ ├── NoteType.java
│ │ │ ├── NoteTypeConverter.java
│ │ │ └── NotesAdapter.java
│ │ └── res/
│ │ ├── layout/
│ │ │ ├── item_note.xml
│ │ │ └── main.xml
│ │ └── values/
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── RxDaoExample/
│ ├── build.gradle
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── org/
│ │ └── greenrobot/
│ │ └── greendao/
│ │ └── rxexample/
│ │ ├── App.java
│ │ ├── MainActivity.java
│ │ ├── Note.java
│ │ ├── NoteType.java
│ │ ├── NoteTypeConverter.java
│ │ └── NotesAdapter.java
│ └── res/
│ ├── layout/
│ │ ├── activity_main.xml
│ │ └── item_note.xml
│ └── values/
│ ├── colors.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── gradle/
│ ├── publish.gradle
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── greendao-api/
│ ├── LICENSE
│ ├── NOTICE
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ ├── annotation/
│ │ ├── Convert.java
│ │ ├── Entity.java
│ │ ├── Generated.java
│ │ ├── Id.java
│ │ ├── Index.java
│ │ ├── JoinEntity.java
│ │ ├── JoinProperty.java
│ │ ├── Keep.java
│ │ ├── NotNull.java
│ │ ├── OrderBy.java
│ │ ├── Property.java
│ │ ├── ToMany.java
│ │ ├── ToOne.java
│ │ ├── Transient.java
│ │ ├── Unique.java
│ │ └── apihint/
│ │ ├── Beta.java
│ │ ├── Experimental.java
│ │ └── Internal.java
│ └── converter/
│ └── PropertyConverter.java
├── javadoc-style/
│ └── stylesheet.css
├── settings.gradle
└── tests/
├── DaoTest/
│ ├── build.gradle
│ ├── proguard.cfg
│ ├── project.properties
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── org/
│ │ └── greenrobot/
│ │ └── greendao/
│ │ ├── daotest/
│ │ │ ├── DaoSessionConcurrentTest.java
│ │ │ ├── DaoSessionConcurrentWALTest.java
│ │ │ ├── DaoSessionTest.java
│ │ │ ├── DbTestTest.java
│ │ │ ├── DbUtilsTest.java
│ │ │ ├── DeadlockPreventionTest.java
│ │ │ ├── IndexTest.java
│ │ │ ├── LongHashMapTest.java
│ │ │ ├── async/
│ │ │ │ ├── AbstractAsyncTest.java
│ │ │ │ ├── BasicAsyncTest.java
│ │ │ │ └── MergeTxAsyncTest.java
│ │ │ ├── contentprovider/
│ │ │ │ └── SimpleEntityContentProviderTest.java
│ │ │ ├── encrypted/
│ │ │ │ ├── EncryptedDataFileTest.java
│ │ │ │ ├── EncryptedDatabaseOpenHelperTest.java
│ │ │ │ ├── EncryptedDbUtils.java
│ │ │ │ └── EncryptionSimpleEntityTest.java
│ │ │ ├── entity/
│ │ │ │ ├── AbcdefEntityTest.java
│ │ │ │ ├── AnActiveEntityMultithreadingTest.java
│ │ │ │ ├── AnActiveEntityTest.java
│ │ │ │ ├── AutoincrementEntityTest.java
│ │ │ │ ├── CustomTypeEntityTest.java
│ │ │ │ ├── DateEntityTest.java
│ │ │ │ ├── ExtendsImplementsEntityTest.java
│ │ │ │ ├── IndexedStringEntityTest.java
│ │ │ │ ├── JoinManyToDateEntityTest.java
│ │ │ │ ├── RelationEntityTest.java
│ │ │ │ ├── RelationEntityTestIdentityScope.java
│ │ │ │ ├── SimpleEntityNotNullTest.java
│ │ │ │ ├── SimpleEntityTest.java
│ │ │ │ ├── SpecialNamesEntityTest.java
│ │ │ │ ├── SqliteMasterTest.java
│ │ │ │ ├── StringKeyValueEntityIdentityScopeTest.java
│ │ │ │ ├── StringKeyValueEntityTest.java
│ │ │ │ ├── TestEntityIdentityScopeTest.java
│ │ │ │ ├── TestEntityTest.java
│ │ │ │ ├── TestEntityTestBase.java
│ │ │ │ ├── ToManyEntityTest.java
│ │ │ │ ├── ToManyTargetEntityTest.java
│ │ │ │ ├── TransactionTest.java
│ │ │ │ └── TreeEntityTest.java
│ │ │ ├── query/
│ │ │ │ ├── CountQueryTest.java
│ │ │ │ ├── CountQueryThreadLocalTest.java
│ │ │ │ ├── CursorQueryTest.java
│ │ │ │ ├── DeleteQueryTest.java
│ │ │ │ ├── DeleteQueryThreadLocalTest.java
│ │ │ │ ├── JoinTest.java
│ │ │ │ ├── LazyListTest.java
│ │ │ │ ├── QueryBuilderAndOrTest.java
│ │ │ │ ├── QueryBuilderOrderTest.java
│ │ │ │ ├── QueryBuilderSimpleTest.java
│ │ │ │ ├── QueryForThreadTest.java
│ │ │ │ ├── QueryLimitOffsetTest.java
│ │ │ │ ├── QuerySpecialNamesTest.java
│ │ │ │ └── RawQueryTest.java
│ │ │ └── rx/
│ │ │ ├── RxDaoTest.java
│ │ │ ├── RxQueryTest.java
│ │ │ ├── RxTestHelper.java
│ │ │ └── RxTransactionTest.java
│ │ └── daotest2/
│ │ └── entity/
│ │ └── KeepEntityTest.java
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ └── assets/
│ │ └── minimal-entity.sql
│ └── test/
│ └── java/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ └── unittest/
│ ├── DaoMaster.java
│ ├── DaoSession.java
│ ├── MinimalEntity.java
│ ├── MinimalEntityDao.java
│ ├── MinimalEntityTest.java
│ └── OptionalDepedenciesTest.java
├── DaoTestBase/
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ ├── daotest/
│ │ ├── AbcdefEntity.java
│ │ ├── AbcdefEntityDao.java
│ │ ├── AnActiveEntity.java
│ │ ├── AnActiveEntityDao.java
│ │ ├── AutoincrementEntity.java
│ │ ├── AutoincrementEntityDao.java
│ │ ├── CustomTypeEntity.java
│ │ ├── CustomTypeEntityDao.java
│ │ ├── DaoMaster.java
│ │ ├── DaoSession.java
│ │ ├── DateEntity.java
│ │ ├── DateEntityDao.java
│ │ ├── ExtendsImplementsEntity.java
│ │ ├── ExtendsImplementsEntityDao.java
│ │ ├── IndexedStringEntity.java
│ │ ├── IndexedStringEntityDao.java
│ │ ├── JoinManyToDateEntity.java
│ │ ├── JoinManyToDateEntityDao.java
│ │ ├── RelationEntity.java
│ │ ├── RelationEntityDao.java
│ │ ├── SimpleEntity.java
│ │ ├── SimpleEntityContentProvider.java
│ │ ├── SimpleEntityDao.java
│ │ ├── SimpleEntityNotNull.java
│ │ ├── SimpleEntityNotNullDao.java
│ │ ├── SpecialNamesEntity.java
│ │ ├── SpecialNamesEntityDao.java
│ │ ├── SqliteMaster.java
│ │ ├── SqliteMasterDao.java
│ │ ├── StringKeyValueEntity.java
│ │ ├── StringKeyValueEntityDao.java
│ │ ├── TestEntity.java
│ │ ├── TestEntityDao.java
│ │ ├── TestInterface.java
│ │ ├── TestSuperclass.java
│ │ ├── ToManyEntity.java
│ │ ├── ToManyEntityDao.java
│ │ ├── ToManyTargetEntity.java
│ │ ├── ToManyTargetEntityDao.java
│ │ ├── TreeEntity.java
│ │ ├── TreeEntityDao.java
│ │ ├── customtype/
│ │ │ ├── IntegerListConverter.java
│ │ │ ├── MyTimestamp.java
│ │ │ └── MyTimestampConverter.java
│ │ └── entity/
│ │ └── SimpleEntityNotNullHelper.java
│ └── daotest2/
│ ├── KeepEntity.java
│ ├── ToManyTarget2.java
│ ├── dao/
│ │ ├── DaoMaster.java
│ │ ├── DaoSession.java
│ │ ├── KeepEntityDao.java
│ │ └── ToManyTarget2Dao.java
│ ├── specialdao/
│ │ └── RelationSource2Dao.java
│ ├── specialentity/
│ │ └── RelationSource2.java
│ ├── to1_specialdao/
│ │ └── ToOneTarget2Dao.java
│ └── to1_specialentity/
│ └── ToOneTarget2.java
├── DaoTestEntityAnnotation/
│ ├── build.gradle
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── org/
│ │ └── greenrobot/
│ │ └── greendao/
│ │ └── test/
│ │ └── entityannotation/
│ │ ├── CustomerOrderTest.java
│ │ ├── CustomerTest.java
│ │ ├── NotNullThingTest.java
│ │ ├── OrderTest.java
│ │ └── TypesInInnerClassTest.java
│ └── main/
│ ├── AndroidManifest.xml
│ └── java/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ └── test/
│ └── entityannotation/
│ ├── Customer.java
│ ├── NotNullThing.java
│ ├── Order.java
│ └── TypesInInnerClass.java
├── DaoTestGenerator/
│ ├── build.gradle
│ └── src/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ └── generator/
│ └── gentest/
│ └── TestDaoGenerator.java
└── DaoTestPerformance/
├── build.gradle
└── src/
├── androidTest/
│ └── java/
│ └── org/
│ └── greenrobot/
│ └── greendao/
│ └── performance/
│ ├── Benchmark.java
│ ├── IndexedStringPerformanceTest.java
│ ├── LoockupPerformanceTest.java
│ ├── PerformanceTest.java
│ ├── PerformanceTestNotNull.java
│ ├── PerformanceTestNotNullIdentityScope.java
│ ├── ReflectionPerformanceTest.java
│ ├── StringGenerator.java
│ └── target/
│ ├── ArrayUtils.java
│ ├── LongHashMapAmarena2DZechner.java
│ ├── LongHashMapJDBM.java
│ └── LongSparseArray.java
└── main/
└── AndroidManifest.xml
Showing preview only (225K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2724 symbols across 228 files)
FILE: DaoCore/src/main/java/org/greenrobot/greendao/AbstractDao.java
class AbstractDao (line 62) | public abstract class AbstractDao<T, K> {
method AbstractDao (line 76) | public AbstractDao(DaoConfig config) {
method AbstractDao (line 80) | @SuppressWarnings("unchecked")
method getSession (line 96) | public AbstractDaoSession getSession() {
method getStatements (line 100) | TableStatements getStatements() {
method getTablename (line 104) | public String getTablename() {
method getProperties (line 108) | public Property[] getProperties() {
method getPkProperty (line 112) | public Property getPkProperty() {
method getAllColumns (line 116) | public String[] getAllColumns() {
method getPkColumns (line 120) | public String[] getPkColumns() {
method getNonPkColumns (line 124) | public String[] getNonPkColumns() {
method load (line 134) | public T load(K key) {
method loadByRowId (line 151) | public T loadByRowId(long rowId) {
method loadUniqueAndCloseCursor (line 157) | protected T loadUniqueAndCloseCursor(Cursor cursor) {
method loadUnique (line 165) | protected T loadUnique(Cursor cursor) {
method loadAll (line 176) | public List<T> loadAll() {
method detach (line 182) | public boolean detach(T entity) {
method detachAll (line 195) | public void detachAll() {
method loadAllAndCloseCursor (line 201) | protected List<T> loadAllAndCloseCursor(Cursor cursor) {
method insertInTx (line 214) | public void insertInTx(Iterable<T> entities) {
method insertInTx (line 223) | public void insertInTx(T... entities) {
method insertInTx (line 235) | public void insertInTx(Iterable<T> entities, boolean setPrimaryKey) {
method insertOrReplaceInTx (line 248) | public void insertOrReplaceInTx(Iterable<T> entities, boolean setPrima...
method insertOrReplaceInTx (line 258) | public void insertOrReplaceInTx(Iterable<T> entities) {
method insertOrReplaceInTx (line 267) | public void insertOrReplaceInTx(T... entities) {
method executeInsertInTx (line 271) | private void executeInsertInTx(DatabaseStatement stmt, Iterable<T> ent...
method insert (line 318) | public long insert(T entity) {
method insertWithoutSettingPk (line 330) | public long insertWithoutSettingPk(T entity) {
method insertOrReplace (line 339) | public long insertOrReplace(T entity) {
method executeInsert (line 343) | private long executeInsert(T entity, DatabaseStatement stmt, boolean s...
method insertInsideTx (line 363) | private long insertInsideTx(T entity, DatabaseStatement stmt) {
method updateKeyAfterInsertAndAttach (line 376) | protected void updateKeyAfterInsertAndAttach(T entity, long rowId, boo...
method save (line 393) | public void save(T entity) {
method saveInTx (line 406) | public void saveInTx(T... entities) {
method saveInTx (line 415) | public void saveInTx(Iterable<T> entities) {
method loadAllFromCursor (line 452) | protected List<T> loadAllFromCursor(Cursor cursor) {
method loadAllUnlockOnWindowBounds (line 495) | private void loadAllUnlockOnWindowBounds(Cursor cursor, CursorWindow w...
method moveToNextUnlocked (line 518) | private CursorWindow moveToNextUnlocked(Cursor cursor) {
method loadCurrent (line 532) | final protected T loadCurrent(Cursor cursor, int offset, boolean lock) {
method loadCurrentOther (line 585) | final protected <O> O loadCurrentOther(AbstractDao<O, ?> dao, Cursor c...
method queryRaw (line 590) | public List<T> queryRaw(String where, String... selectionArg) {
method queryRawCreate (line 599) | public Query<T> queryRawCreate(String where, Object... selectionArg) {
method queryRawCreateListArgs (line 608) | public Query<T> queryRawCreateListArgs(String where, Collection<Object...
method deleteAll (line 612) | public void deleteAll() {
method delete (line 623) | public void delete(T entity) {
method deleteByKey (line 630) | public void deleteByKey(K key) {
method deleteByKeyInsideSynchronized (line 654) | private void deleteByKeyInsideSynchronized(K key, DatabaseStatement st...
method deleteInTxInternal (line 665) | private void deleteInTxInternal(Iterable<T> entities, Iterable<K> keys) {
method deleteInTx (line 714) | public void deleteInTx(Iterable<T> entities) {
method deleteInTx (line 723) | public void deleteInTx(T... entities) {
method deleteByKeyInTx (line 732) | public void deleteByKeyInTx(Iterable<K> keys) {
method deleteByKeyInTx (line 741) | public void deleteByKeyInTx(K... keys) {
method refresh (line 746) | public void refresh(T entity) {
method update (line 767) | public void update(T entity) {
method queryBuilder (line 792) | public QueryBuilder<T> queryBuilder() {
method updateInsideSynchronized (line 796) | protected void updateInsideSynchronized(T entity, DatabaseStatement st...
method updateInsideSynchronized (line 812) | protected void updateInsideSynchronized(T entity, SQLiteStatement stmt...
method attachEntity (line 834) | protected final void attachEntity(K key, T entity, boolean lock) {
method attachEntity (line 851) | protected void attachEntity(T entity) {
method updateInTx (line 859) | public void updateInTx(Iterable<T> entities) {
method updateInTx (line 911) | public void updateInTx(T... entities) {
method assertSinglePk (line 915) | protected void assertSinglePk() {
method count (line 921) | public long count() {
method getKeyVerified (line 926) | protected K getKeyVerified(T entity) {
method rxPlain (line 945) | @Experimental
method rx (line 959) | @Experimental
method getDatabase (line 968) | public Database getDatabase() {
method readEntity (line 973) | abstract protected T readEntity(Cursor cursor, int offset);
method readKey (line 977) | abstract protected K readKey(Cursor cursor, int offset);
method readEntity (line 980) | abstract protected void readEntity(Cursor cursor, T entity, int offset);
method bindValues (line 983) | abstract protected void bindValues(DatabaseStatement stmt, T entity);
method bindValues (line 989) | protected abstract void bindValues(SQLiteStatement stmt, T entity);
method updateKeyAfterInsert (line 995) | abstract protected K updateKeyAfterInsert(T entity, long rowId);
method getKey (line 1001) | abstract protected K getKey(T entity);
method hasKey (line 1007) | abstract protected boolean hasKey(T entity);
method isEntityUpdateable (line 1010) | abstract protected boolean isEntityUpdateable();
FILE: DaoCore/src/main/java/org/greenrobot/greendao/AbstractDaoMaster.java
class AbstractDaoMaster (line 31) | public abstract class AbstractDaoMaster {
method AbstractDaoMaster (line 36) | public AbstractDaoMaster(Database db, int schemaVersion) {
method registerDaoClass (line 43) | protected void registerDaoClass(Class<? extends AbstractDao<?, ?>> dao...
method getSchemaVersion (line 48) | public int getSchemaVersion() {
method getDatabase (line 53) | public Database getDatabase() {
method newSession (line 57) | public abstract AbstractDaoSession newSession();
method newSession (line 59) | public abstract AbstractDaoSession newSession(IdentityScopeType type);
FILE: DaoCore/src/main/java/org/greenrobot/greendao/AbstractDaoSession.java
class AbstractDaoSession (line 52) | public class AbstractDaoSession {
method AbstractDaoSession (line 59) | public AbstractDaoSession(Database db) {
method registerDao (line 64) | protected <T> void registerDao(Class<T> entityClass, AbstractDao<T, ?>...
method insert (line 69) | public <T> long insert(T entity) {
method insertOrReplace (line 76) | public <T> long insertOrReplace(T entity) {
method refresh (line 83) | public <T> void refresh(T entity) {
method update (line 90) | public <T> void update(T entity) {
method delete (line 97) | public <T> void delete(T entity) {
method deleteAll (line 104) | public <T> void deleteAll(Class<T> entityClass) {
method load (line 111) | public <T, K> T load(Class<T> entityClass, K key) {
method loadAll (line 118) | public <T, K> List<T> loadAll(Class<T> entityClass) {
method queryRaw (line 125) | public <T, K> List<T> queryRaw(Class<T> entityClass, String where, Str...
method queryBuilder (line 132) | public <T> QueryBuilder<T> queryBuilder(Class<T> entityClass) {
method getDao (line 138) | public AbstractDao<?, ?> getDao(Class<? extends Object> entityClass) {
method runInTx (line 149) | public void runInTx(Runnable runnable) {
method callInTx (line 163) | public <V> V callInTx(Callable<V> callable) throws Exception {
method callInTxNoException (line 178) | public <V> V callInTxNoException(Callable<V> callable) {
method getDatabase (line 195) | public Database getDatabase() {
method getAllDaos (line 200) | public Collection<AbstractDao<?, ?>> getAllDaos() {
method startAsyncSession (line 207) | public AsyncSession startAsyncSession() {
method rxTxPlain (line 217) | @Experimental
method rxTx (line 231) | @Experimental
FILE: DaoCore/src/main/java/org/greenrobot/greendao/DaoException.java
class DaoException (line 26) | public class DaoException extends SQLException {
method DaoException (line 30) | public DaoException() {
method DaoException (line 33) | public DaoException(String error) {
method DaoException (line 37) | public DaoException(String error, Throwable cause) {
method DaoException (line 42) | public DaoException(Throwable th) {
method safeInitCause (line 46) | protected void safeInitCause(Throwable cause) {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/DaoLog.java
class DaoLog (line 27) | public class DaoLog {
method isLoggable (line 37) | public static boolean isLoggable(int level) {
method getStackTraceString (line 41) | public static String getStackTraceString(Throwable th) {
method println (line 45) | public static int println(int level, String msg) {
method v (line 49) | public static int v(String msg) {
method v (line 53) | public static int v(String msg, Throwable th) {
method d (line 57) | public static int d(String msg) {
method d (line 61) | public static int d(String msg, Throwable th) {
method i (line 65) | public static int i(String msg) {
method i (line 69) | public static int i(String msg, Throwable th) {
method w (line 73) | public static int w(String msg) {
method w (line 77) | public static int w(String msg, Throwable th) {
method w (line 81) | public static int w(Throwable th) {
method e (line 85) | public static int e(String msg) {
method e (line 89) | public static int e(String msg, Throwable th) {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/DbUtils.java
class DbUtils (line 33) | public class DbUtils {
method vacuum (line 35) | public static void vacuum(Database db) {
method executeSqlScript (line 44) | public static int executeSqlScript(Context context, Database db, Strin...
method executeSqlScript (line 56) | public static int executeSqlScript(Context context, Database db, Strin...
method executeSqlStatementsInTx (line 71) | public static int executeSqlStatementsInTx(Database db, String[] state...
method executeSqlStatements (line 82) | public static int executeSqlStatements(Database db, String[] statement...
method copyAllBytes (line 99) | public static int copyAllBytes(InputStream in, OutputStream out) throw...
method readAllBytes (line 113) | public static byte[] readAllBytes(InputStream in) throws IOException {
method readAsset (line 119) | public static byte[] readAsset(Context context, String filename) throw...
method logTableDump (line 128) | public static void logTableDump(SQLiteDatabase db, String tablename) {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/InternalQueryDaoAccess.java
class InternalQueryDaoAccess (line 25) | public final class InternalQueryDaoAccess<T> {
method InternalQueryDaoAccess (line 28) | public InternalQueryDaoAccess(AbstractDao<T, ?> abstractDao) {
method loadCurrent (line 32) | public T loadCurrent(Cursor cursor, int offset, boolean lock) {
method loadAllAndCloseCursor (line 36) | public List<T> loadAllAndCloseCursor(Cursor cursor) {
method loadUniqueAndCloseCursor (line 40) | public T loadUniqueAndCloseCursor(Cursor cursor) {
method getStatements (line 44) | public TableStatements getStatements() {
method getStatements (line 48) | public static <T2> TableStatements getStatements(AbstractDao<T2, ?> da...
FILE: DaoCore/src/main/java/org/greenrobot/greendao/InternalUnitTestDaoAccess.java
class InternalUnitTestDaoAccess (line 27) | public class InternalUnitTestDaoAccess<T, K> {
method InternalUnitTestDaoAccess (line 30) | public InternalUnitTestDaoAccess(Database db, Class<AbstractDao<T, K>>...
method getKey (line 38) | public K getKey(T entity) {
method getProperties (line 42) | public Property[] getProperties() {
method isEntityUpdateable (line 46) | public boolean isEntityUpdateable() {
method readEntity (line 50) | public T readEntity(Cursor cursor, int offset) {
method readKey (line 54) | public K readKey(Cursor cursor, int offset) {
method getDao (line 58) | public AbstractDao<T, K> getDao() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/Property.java
class Property (line 30) | public class Property {
method Property (line 37) | public Property(int ordinal, Class<?> type, String name, boolean prima...
method eq (line 46) | public WhereCondition eq(Object value) {
method notEq (line 51) | public WhereCondition notEq(Object value) {
method like (line 56) | public WhereCondition like(String value) {
method between (line 61) | public WhereCondition between(Object value1, Object value2) {
method in (line 67) | public WhereCondition in(Object... inValues) {
method in (line 74) | public WhereCondition in(Collection<?> inValues) {
method notIn (line 79) | public WhereCondition notIn(Object... notInValues) {
method notIn (line 86) | public WhereCondition notIn(Collection<?> notInValues) {
method gt (line 91) | public WhereCondition gt(Object value) {
method lt (line 96) | public WhereCondition lt(Object value) {
method ge (line 101) | public WhereCondition ge(Object value) {
method le (line 106) | public WhereCondition le(Object value) {
method isNull (line 111) | public WhereCondition isNull() {
method isNotNull (line 116) | public WhereCondition isNotNull() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncDaoException.java
class AsyncDaoException (line 26) | public class AsyncDaoException extends DaoException {
method AsyncDaoException (line 32) | public AsyncDaoException(AsyncOperation failedOperation, Throwable cau...
method getFailedOperation (line 37) | public AsyncOperation getFailedOperation() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncOperation.java
class AsyncOperation (line 30) | public class AsyncOperation {
type OperationType (line 31) | public enum OperationType {
method AsyncOperation (line 66) | @SuppressWarnings("unchecked")
method getThrowable (line 77) | public Throwable getThrowable() {
method setThrowable (line 81) | public void setThrowable(Throwable throwable) {
method getType (line 85) | public OperationType getType() {
method getParameter (line 89) | public Object getParameter() {
method getResult (line 100) | public synchronized Object getResult() {
method isMergeTx (line 111) | public boolean isMergeTx() {
method getDatabase (line 115) | Database getDatabase() {
method isMergeableWith (line 123) | boolean isMergeableWith(AsyncOperation other) {
method getTimeStarted (line 127) | public long getTimeStarted() {
method getTimeCompleted (line 131) | public long getTimeCompleted() {
method getDuration (line 135) | public long getDuration() {
method isFailed (line 143) | public boolean isFailed() {
method isCompleted (line 147) | public boolean isCompleted() {
method waitForCompletion (line 157) | public synchronized Object waitForCompletion() {
method waitForCompletion (line 174) | public synchronized boolean waitForCompletion(int maxMillis) {
method setCompleted (line 186) | synchronized void setCompleted() {
method isCompletedSucessfully (line 191) | public boolean isCompletedSucessfully() {
method getMergedOperationsCount (line 199) | public int getMergedOperationsCount() {
method getSequenceNumber (line 207) | public int getSequenceNumber() {
method reset (line 212) | void reset() {
method getCreatorStacktrace (line 225) | public Exception getCreatorStacktrace() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncOperationExecutor.java
class AsyncOperationExecutor (line 34) | class AsyncOperationExecutor implements Runnable, Handler.Callback {
method AsyncOperationExecutor (line 51) | AsyncOperationExecutor() {
method enqueue (line 57) | public void enqueue(AsyncOperation operation) {
method getMaxOperationCountToMerge (line 69) | public int getMaxOperationCountToMerge() {
method setMaxOperationCountToMerge (line 73) | public void setMaxOperationCountToMerge(int maxOperationCountToMerge) {
method getWaitForMergeMillis (line 77) | public int getWaitForMergeMillis() {
method setWaitForMergeMillis (line 81) | public void setWaitForMergeMillis(int waitForMergeMillis) {
method getListener (line 85) | public AsyncOperationListener getListener() {
method setListener (line 89) | public void setListener(AsyncOperationListener listener) {
method getListenerMainThread (line 93) | public AsyncOperationListener getListenerMainThread() {
method setListenerMainThread (line 97) | public void setListenerMainThread(AsyncOperationListener listenerMainT...
method isCompleted (line 101) | public synchronized boolean isCompleted() {
method waitForCompletion (line 109) | public synchronized void waitForCompletion() {
method waitForCompletion (line 125) | public synchronized boolean waitForCompletion(int maxMillis) {
method run (line 136) | @Override
method mergeTxAndExecute (line 179) | private void mergeTxAndExecute(AsyncOperation operation1, AsyncOperati...
method handleOperationCompleted (line 236) | private void handleOperationCompleted(AsyncOperation operation) {
method executeOperationAndPostCompleted (line 258) | private void executeOperationAndPostCompleted(AsyncOperation operation) {
method executeOperation (line 263) | @SuppressWarnings({"unchecked", "rawtypes"})
method executeTransactionRunnable (line 344) | private void executeTransactionRunnable(AsyncOperation operation) {
method executeTransactionCallable (line 355) | @SuppressWarnings("unchecked")
method handleMessage (line 367) | @Override
FILE: DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncOperationListener.java
type AsyncOperationListener (line 19) | public interface AsyncOperationListener {
method onAsyncOperationCompleted (line 24) | void onAsyncOperationCompleted(AsyncOperation operation);
FILE: DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncSession.java
class AsyncSession (line 39) | public class AsyncSession {
method AsyncSession (line 44) | public AsyncSession(AbstractDaoSession daoSession) {
method getMaxOperationCountToMerge (line 49) | public int getMaxOperationCountToMerge() {
method setMaxOperationCountToMerge (line 53) | public void setMaxOperationCountToMerge(int maxOperationCountToMerge) {
method getWaitForMergeMillis (line 57) | public int getWaitForMergeMillis() {
method setWaitForMergeMillis (line 61) | public void setWaitForMergeMillis(int waitForMergeMillis) {
method getListener (line 65) | public AsyncOperationListener getListener() {
method setListener (line 69) | public void setListener(AsyncOperationListener listener) {
method getListenerMainThread (line 73) | public AsyncOperationListener getListenerMainThread() {
method setListenerMainThread (line 77) | public void setListenerMainThread(AsyncOperationListener listenerMainT...
method isCompleted (line 81) | public boolean isCompleted() {
method waitForCompletion (line 89) | public void waitForCompletion() {
method waitForCompletion (line 99) | public boolean waitForCompletion(int maxMillis) {
method insert (line 104) | public AsyncOperation insert(Object entity) {
method insert (line 109) | public AsyncOperation insert(Object entity, int flags) {
method insertInTx (line 114) | public <E> AsyncOperation insertInTx(Class<E> entityClass, E... entiti...
method insertInTx (line 119) | public <E> AsyncOperation insertInTx(Class<E> entityClass, int flags, ...
method insertInTx (line 124) | public <E> AsyncOperation insertInTx(Class<E> entityClass, Iterable<E>...
method insertInTx (line 129) | public <E> AsyncOperation insertInTx(Class<E> entityClass, Iterable<E>...
method insertOrReplace (line 134) | public AsyncOperation insertOrReplace(Object entity) {
method insertOrReplace (line 139) | public AsyncOperation insertOrReplace(Object entity, int flags) {
method insertOrReplaceInTx (line 144) | public <E> AsyncOperation insertOrReplaceInTx(Class<E> entityClass, E....
method insertOrReplaceInTx (line 149) | public <E> AsyncOperation insertOrReplaceInTx(Class<E> entityClass, in...
method insertOrReplaceInTx (line 154) | public <E> AsyncOperation insertOrReplaceInTx(Class<E> entityClass, It...
method insertOrReplaceInTx (line 159) | public <E> AsyncOperation insertOrReplaceInTx(Class<E> entityClass, It...
method update (line 164) | public AsyncOperation update(Object entity) {
method update (line 169) | public AsyncOperation update(Object entity, int flags) {
method updateInTx (line 174) | public <E> AsyncOperation updateInTx(Class<E> entityClass, E... entiti...
method updateInTx (line 179) | public <E> AsyncOperation updateInTx(Class<E> entityClass, int flags, ...
method updateInTx (line 184) | public <E> AsyncOperation updateInTx(Class<E> entityClass, Iterable<E>...
method updateInTx (line 189) | public <E> AsyncOperation updateInTx(Class<E> entityClass, Iterable<E>...
method delete (line 194) | public AsyncOperation delete(Object entity) {
method delete (line 199) | public AsyncOperation delete(Object entity, int flags) {
method deleteByKey (line 204) | public AsyncOperation deleteByKey(Object key) {
method deleteByKey (line 209) | public AsyncOperation deleteByKey(Object key, int flags) {
method deleteInTx (line 214) | public <E> AsyncOperation deleteInTx(Class<E> entityClass, E... entiti...
method deleteInTx (line 219) | public <E> AsyncOperation deleteInTx(Class<E> entityClass, int flags, ...
method deleteInTx (line 224) | public <E> AsyncOperation deleteInTx(Class<E> entityClass, Iterable<E>...
method deleteInTx (line 229) | public <E> AsyncOperation deleteInTx(Class<E> entityClass, Iterable<E>...
method deleteAll (line 234) | public <E> AsyncOperation deleteAll(Class<E> entityClass) {
method deleteAll (line 239) | public <E> AsyncOperation deleteAll(Class<E> entityClass, int flags) {
method runInTx (line 244) | public AsyncOperation runInTx(Runnable runnable) {
method runInTx (line 249) | public AsyncOperation runInTx(Runnable runnable, int flags) {
method callInTx (line 254) | public AsyncOperation callInTx(Callable<?> callable) {
method callInTx (line 259) | public AsyncOperation callInTx(Callable<?> callable, int flags) {
method queryList (line 264) | public AsyncOperation queryList(Query<?> query) {
method queryList (line 269) | public AsyncOperation queryList(Query<?> query, int flags) {
method queryUnique (line 274) | public AsyncOperation queryUnique(Query<?> query) {
method queryUnique (line 279) | public AsyncOperation queryUnique(Query<?> query, int flags) {
method load (line 284) | public AsyncOperation load(Class<?> entityClass, Object key) {
method load (line 289) | public AsyncOperation load(Class<?> entityClass, Object key, int flags) {
method loadAll (line 294) | public AsyncOperation loadAll(Class<?> entityClass) {
method loadAll (line 299) | public AsyncOperation loadAll(Class<?> entityClass, int flags) {
method count (line 304) | public AsyncOperation count(Class<?> entityClass) {
method count (line 309) | public AsyncOperation count(Class<?> entityClass, int flags) {
method refresh (line 314) | public AsyncOperation refresh(Object entity) {
method refresh (line 319) | public AsyncOperation refresh(Object entity, int flags) {
method enqueueDatabaseOperation (line 323) | private AsyncOperation enqueueDatabaseOperation(OperationType type, Ob...
method enqueueEntityOperation (line 330) | private AsyncOperation enqueueEntityOperation(OperationType type, Obje...
method enqueEntityOperation (line 334) | private <E> AsyncOperation enqueEntityOperation(OperationType type, Cl...
method getSessionFlags (line 342) | public int getSessionFlags() {
method setSessionFlags (line 347) | public void setSessionFlags(int sessionFlags) {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/Database.java
type Database (line 24) | public interface Database {
method rawQuery (line 25) | Cursor rawQuery(String sql, String[] selectionArgs);
method execSQL (line 27) | void execSQL(String sql) throws SQLException;
method beginTransaction (line 29) | void beginTransaction();
method endTransaction (line 31) | void endTransaction();
method inTransaction (line 33) | boolean inTransaction();
method setTransactionSuccessful (line 35) | void setTransactionSuccessful();
method execSQL (line 37) | void execSQL(String sql, Object[] bindArgs) throws SQLException;
method compileStatement (line 39) | DatabaseStatement compileStatement(String sql);
method isDbLockedByCurrentThread (line 41) | boolean isDbLockedByCurrentThread();
method isOpen (line 43) | boolean isOpen();
method close (line 45) | void close();
method getRawDatabase (line 47) | Object getRawDatabase();
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/DatabaseOpenHelper.java
class DatabaseOpenHelper (line 33) | public abstract class DatabaseOpenHelper extends SQLiteOpenHelper {
method DatabaseOpenHelper (line 42) | public DatabaseOpenHelper(Context context, String name, int version) {
method DatabaseOpenHelper (line 46) | public DatabaseOpenHelper(Context context, String name, CursorFactory ...
method DatabaseOpenHelper (line 53) | @SuppressLint("NewApi")
method setLoadSQLCipherNativeLibs (line 64) | public void setLoadSQLCipherNativeLibs(boolean loadSQLCipherNativeLibs) {
method getWritableDb (line 72) | public Database getWritableDb() {
method getReadableDb (line 80) | public Database getReadableDb() {
method wrap (line 84) | protected Database wrap(SQLiteDatabase sqLiteDatabase) {
method onCreate (line 91) | @Override
method onCreate (line 99) | public void onCreate(Database db) {
method onUpgrade (line 106) | @Override
method onUpgrade (line 114) | public void onUpgrade(Database db, int oldVersion, int newVersion) {
method onOpen (line 121) | @Override
method onOpen (line 129) | public void onOpen(Database db) {
type EncryptedHelper (line 133) | interface EncryptedHelper {
method getEncryptedReadableDb (line 134) | Database getEncryptedReadableDb(String password);
method getEncryptedReadableDb (line 135) | Database getEncryptedReadableDb(char[] password);
method getEncryptedWritableDb (line 136) | Database getEncryptedWritableDb(String password);
method getEncryptedWritableDb (line 137) | Database getEncryptedWritableDb(char[] password);
method checkEncryptedHelper (line 140) | private EncryptedHelper checkEncryptedHelper() {
method getEncryptedWritableDb (line 173) | public Database getEncryptedWritableDb(String password) {
method getEncryptedWritableDb (line 184) | public Database getEncryptedWritableDb(char[] password) {
method getEncryptedReadableDb (line 195) | public Database getEncryptedReadableDb(String password) {
method getEncryptedReadableDb (line 206) | public Database getEncryptedReadableDb(char[] password) {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/DatabaseStatement.java
type DatabaseStatement (line 19) | public interface DatabaseStatement {
method execute (line 20) | void execute();
method simpleQueryForLong (line 22) | long simpleQueryForLong();
method bindNull (line 24) | void bindNull(int index);
method executeInsert (line 26) | long executeInsert();
method bindString (line 28) | void bindString(int index, String value);
method bindBlob (line 30) | void bindBlob(int index, byte[] value);
method bindLong (line 32) | void bindLong(int index, long value);
method clearBindings (line 34) | void clearBindings();
method bindDouble (line 36) | void bindDouble(int index, double value);
method close (line 38) | void close();
method getRawStatement (line 40) | Object getRawStatement();
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/EncryptedDatabase.java
class EncryptedDatabase (line 23) | public class EncryptedDatabase implements Database {
method EncryptedDatabase (line 26) | public EncryptedDatabase(SQLiteDatabase delegate) {
method rawQuery (line 30) | @Override
method execSQL (line 35) | @Override
method beginTransaction (line 40) | @Override
method endTransaction (line 45) | @Override
method inTransaction (line 50) | @Override
method setTransactionSuccessful (line 55) | @Override
method execSQL (line 60) | @Override
method compileStatement (line 65) | @Override
method isDbLockedByCurrentThread (line 70) | @Override
method isOpen (line 75) | @Override
method close (line 80) | @Override
method getRawDatabase (line 85) | @Override
method getSQLiteDatabase (line 90) | public SQLiteDatabase getSQLiteDatabase() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/EncryptedDatabaseStatement.java
class EncryptedDatabaseStatement (line 22) | public class EncryptedDatabaseStatement implements DatabaseStatement {
method EncryptedDatabaseStatement (line 25) | public EncryptedDatabaseStatement(SQLiteStatement delegate) {
method execute (line 29) | @Override
method simpleQueryForLong (line 34) | @Override
method bindNull (line 39) | @Override
method executeInsert (line 44) | @Override
method bindString (line 49) | @Override
method bindBlob (line 54) | @Override
method bindLong (line 59) | @Override
method clearBindings (line 64) | @Override
method bindDouble (line 69) | @Override
method close (line 74) | @Override
method getRawStatement (line 79) | @Override
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/SqlCipherEncryptedHelper.java
class SqlCipherEncryptedHelper (line 8) | class SqlCipherEncryptedHelper extends SQLiteOpenHelper implements Datab...
method SqlCipherEncryptedHelper (line 12) | public SqlCipherEncryptedHelper(DatabaseOpenHelper delegate, Context c...
method wrap (line 20) | private Database wrap(SQLiteDatabase sqLiteDatabase) {
method onCreate (line 24) | @Override
method onUpgrade (line 29) | @Override
method onOpen (line 34) | @Override
method getEncryptedReadableDb (line 39) | @Override
method getEncryptedReadableDb (line 44) | @Override
method getEncryptedWritableDb (line 49) | @Override
method getEncryptedWritableDb (line 54) | @Override
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/StandardDatabase.java
class StandardDatabase (line 23) | public class StandardDatabase implements Database {
method StandardDatabase (line 26) | public StandardDatabase(SQLiteDatabase delegate) {
method rawQuery (line 30) | @Override
method execSQL (line 35) | @Override
method beginTransaction (line 40) | @Override
method endTransaction (line 45) | @Override
method inTransaction (line 50) | @Override
method setTransactionSuccessful (line 55) | @Override
method execSQL (line 60) | @Override
method compileStatement (line 65) | @Override
method isDbLockedByCurrentThread (line 70) | @Override
method isOpen (line 75) | @Override
method close (line 80) | @Override
method getRawDatabase (line 85) | @Override
method getSQLiteDatabase (line 90) | public SQLiteDatabase getSQLiteDatabase() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/database/StandardDatabaseStatement.java
class StandardDatabaseStatement (line 21) | public class StandardDatabaseStatement implements DatabaseStatement {
method StandardDatabaseStatement (line 24) | public StandardDatabaseStatement(SQLiteStatement delegate) {
method execute (line 28) | @Override
method simpleQueryForLong (line 33) | @Override
method bindNull (line 38) | @Override
method executeInsert (line 43) | @Override
method bindString (line 48) | @Override
method bindBlob (line 53) | @Override
method bindLong (line 58) | @Override
method clearBindings (line 63) | @Override
method bindDouble (line 68) | @Override
method close (line 73) | @Override
method getRawStatement (line 78) | @Override
FILE: DaoCore/src/main/java/org/greenrobot/greendao/identityscope/IdentityScope.java
type IdentityScope (line 29) | public interface IdentityScope<K, T> {
method get (line 31) | T get(K key);
method put (line 33) | void put(K key, T entity);
method getNoLock (line 35) | T getNoLock(K key);
method putNoLock (line 37) | void putNoLock(K key, T entity);
method detach (line 39) | boolean detach(K key, T entity);
method remove (line 41) | void remove(K key);
method remove (line 43) | void remove(Iterable<K> key);
method clear (line 45) | void clear();
method lock (line 47) | void lock();
method unlock (line 49) | void unlock();
method reserveRoom (line 51) | void reserveRoom(int count);
FILE: DaoCore/src/main/java/org/greenrobot/greendao/identityscope/IdentityScopeLong.java
class IdentityScopeLong (line 31) | public class IdentityScopeLong<T> implements IdentityScope<Long, T> {
method IdentityScopeLong (line 35) | public IdentityScopeLong() {
method get (line 40) | @Override
method getNoLock (line 45) | @Override
method get2 (line 50) | public T get2(long key) {
method get2NoLock (line 65) | public T get2NoLock(long key) {
method put (line 74) | @Override
method putNoLock (line 79) | @Override
method put2 (line 84) | public void put2(long key, T entity) {
method put2NoLock (line 93) | public void put2NoLock(long key, T entity) {
method detach (line 97) | @Override
method remove (line 112) | @Override
method remove (line 122) | @Override
method clear (line 134) | @Override
method lock (line 144) | @Override
method unlock (line 149) | @Override
method reserveRoom (line 154) | @Override
FILE: DaoCore/src/main/java/org/greenrobot/greendao/identityscope/IdentityScopeObject.java
class IdentityScopeObject (line 30) | public class IdentityScopeObject<K, T> implements IdentityScope<K, T> {
method IdentityScopeObject (line 34) | public IdentityScopeObject() {
method get (line 39) | @Override
method getNoLock (line 55) | @Override
method put (line 65) | @Override
method putNoLock (line 75) | @Override
method detach (line 80) | @Override
method remove (line 95) | @Override
method remove (line 105) | @Override
method clear (line 117) | @Override
method lock (line 127) | @Override
method unlock (line 132) | @Override
method reserveRoom (line 137) | @Override
FILE: DaoCore/src/main/java/org/greenrobot/greendao/identityscope/IdentityScopeType.java
type IdentityScopeType (line 18) | public enum IdentityScopeType {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/internal/DaoConfig.java
class DaoConfig (line 36) | public final class DaoConfig implements Cloneable {
method DaoConfig (line 53) | public DaoConfig(Database db, Class<? extends AbstractDao<?, ?>> daoCl...
method reflectProperties (line 98) | private static Property[] reflectProperties(Class<? extends AbstractDa...
method DaoConfig (line 126) | public DaoConfig(DaoConfig source) {
method clone (line 139) | @Override
method getIdentityScope (line 144) | public IdentityScope<?, ?> getIdentityScope() {
method clearIdentityScope (line 151) | public void clearIdentityScope() {
method setIdentityScope (line 158) | public void setIdentityScope(IdentityScope<?, ?> identityScope) {
method initIdentityScope (line 162) | @SuppressWarnings("rawtypes")
FILE: DaoCore/src/main/java/org/greenrobot/greendao/internal/FastCursor.java
class FastCursor (line 28) | final public class FastCursor implements Cursor {
method FastCursor (line 34) | public FastCursor(CursorWindow window) {
method getCount (line 39) | @Override
method getPosition (line 44) | @Override
method move (line 49) | @Override
method moveToPosition (line 54) | @Override
method moveToFirst (line 64) | @Override
method moveToLast (line 70) | @Override
method moveToNext (line 80) | @Override
method moveToPrevious (line 90) | @Override
method isFirst (line 100) | @Override
method isLast (line 105) | @Override
method isBeforeFirst (line 110) | @Override
method isAfterLast (line 115) | @Override
method getColumnIndex (line 120) | @Override
method getColumnIndexOrThrow (line 125) | @Override
method getColumnName (line 130) | @Override
method getColumnNames (line 135) | @Override
method getColumnCount (line 140) | @Override
method getBlob (line 145) | @Override
method getString (line 150) | @Override
method copyStringToBuffer (line 155) | @Override
method getShort (line 160) | @Override
method getInt (line 165) | @Override
method getLong (line 170) | @Override
method getFloat (line 175) | @Override
method getDouble (line 180) | @Override
method isNull (line 185) | @SuppressWarnings("deprecation")
method deactivate (line 191) | @Override
method requery (line 196) | @Override
method close (line 201) | @Override
method isClosed (line 206) | @Override
method registerContentObserver (line 211) | @Override
method unregisterContentObserver (line 216) | @Override
method registerDataSetObserver (line 221) | @Override
method unregisterDataSetObserver (line 226) | @Override
method setNotificationUri (line 231) | @Override
method getWantsAllOnMoveCalls (line 236) | @Override
method getExtras (line 241) | @Override
method respond (line 246) | @Override
method getType (line 252) | public int getType(int columnIndex) {
method getNotificationUri (line 257) | public Uri getNotificationUri() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/internal/LongHashMap.java
class LongHashMap (line 30) | public final class LongHashMap<T> {
class Entry (line 31) | final static class Entry<T> {
method Entry (line 36) | Entry(long key, T value, Entry<T> next) {
method LongHashMap (line 48) | public LongHashMap() {
method LongHashMap (line 52) | @SuppressWarnings("unchecked")
method containsKey (line 59) | public boolean containsKey(long key) {
method get (line 70) | public T get(long key) {
method put (line 80) | public T put(long key, T value) {
method remove (line 98) | public T remove(long key) {
method clear (line 119) | public void clear() {
method size (line 124) | public int size() {
method setCapacity (line 128) | public void setCapacity(int newCapacity) {
method reserveRoom (line 150) | public void reserveRoom(int entryCount) {
method logStats (line 154) | public void logStats() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/internal/SqlUtils.java
class SqlUtils (line 22) | public class SqlUtils {
method appendProperty (line 25) | public static StringBuilder appendProperty(StringBuilder builder, Stri...
method appendColumn (line 33) | public static StringBuilder appendColumn(StringBuilder builder, String...
method appendColumn (line 38) | public static StringBuilder appendColumn(StringBuilder builder, String...
method appendColumns (line 43) | public static StringBuilder appendColumns(StringBuilder builder, Strin...
method appendColumns (line 54) | public static StringBuilder appendColumns(StringBuilder builder, Strin...
method appendPlaceholders (line 65) | public static StringBuilder appendPlaceholders(StringBuilder builder, ...
method appendColumnsEqualPlaceholders (line 76) | public static StringBuilder appendColumnsEqualPlaceholders(StringBuild...
method appendColumnsEqValue (line 86) | public static StringBuilder appendColumnsEqValue(StringBuilder builder...
method createSqlInsert (line 96) | public static String createSqlInsert(String insertInto, String tablena...
method createSqlSelect (line 107) | public static String createSqlSelect(String tablename, String tableAli...
method createSqlSelectCountStar (line 119) | public static String createSqlSelectCountStar(String tablename, String...
method createSqlDelete (line 129) | public static String createSqlDelete(String tablename, String[] column...
method createSqlUpdate (line 140) | public static String createSqlUpdate(String tablename, String[] update...
method createSqlCount (line 150) | public static String createSqlCount(String tablename) {
method escapeBlobArgument (line 154) | public static String escapeBlobArgument(byte[] bytes) {
method toHex (line 158) | public static String toHex(byte[] bytes) {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/internal/TableStatements.java
class TableStatements (line 25) | public class TableStatements {
method TableStatements (line 42) | public TableStatements(Database db, String tablename, String[] allColu...
method getInsertStatement (line 49) | public DatabaseStatement getInsertStatement() {
method getInsertOrReplaceStatement (line 65) | public DatabaseStatement getInsertOrReplaceStatement() {
method getDeleteStatement (line 81) | public DatabaseStatement getDeleteStatement() {
method getUpdateStatement (line 97) | public DatabaseStatement getUpdateStatement() {
method getCountStatement (line 113) | public DatabaseStatement getCountStatement() {
method getSelectAll (line 122) | public String getSelectAll() {
method getSelectKeys (line 130) | public String getSelectKeys() {
method getSelectByKey (line 138) | public String getSelectByKey() {
method getSelectByRowId (line 148) | public String getSelectByRowId() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/AbstractQuery.java
class AbstractQuery (line 35) | abstract class AbstractQuery<T> {
method toStringArray (line 42) | protected static String[] toStringArray(Object[] values) {
method AbstractQuery (line 56) | protected AbstractQuery(AbstractDao<T, ?> dao, String sql, String[] pa...
method setParameter (line 71) | public AbstractQuery<T> setParameter(int index, Object parameter) {
method setParameter (line 84) | public AbstractQuery<T> setParameter(int index, Date parameter) {
method setParameter (line 92) | public AbstractQuery<T> setParameter(int index, Boolean parameter) {
method checkThread (line 97) | protected void checkThread() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/AbstractQueryData.java
class AbstractQueryData (line 27) | abstract class AbstractQueryData<T, Q extends AbstractQuery<T>> {
method AbstractQueryData (line 33) | AbstractQueryData(AbstractDao<T, ?> dao, String sql, String[] initialV...
method forCurrentThread (line 44) | Q forCurrentThread(Q query) {
method forCurrentThread (line 56) | Q forCurrentThread() {
method createQuery (line 75) | abstract protected Q createQuery();
method gc (line 77) | void gc() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/AbstractQueryWithLimit.java
class AbstractQueryWithLimit (line 27) | abstract class AbstractQueryWithLimit<T> extends AbstractQuery<T> {
method AbstractQueryWithLimit (line 31) | protected AbstractQueryWithLimit(AbstractDao<T, ?> dao, String sql, St...
method setParameter (line 42) | public AbstractQueryWithLimit<T> setParameter(int index, Object parame...
method setLimit (line 54) | public void setLimit(int limit) {
method setOffset (line 67) | public void setOffset(int offset) {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/CloseableListIterator.java
type CloseableListIterator (line 29) | public interface CloseableListIterator<T> extends ListIterator<T>, Close...
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/CountQuery.java
class CountQuery (line 25) | public class CountQuery<T> extends AbstractQuery<T> {
class QueryData (line 27) | private final static class QueryData<T2> extends AbstractQueryData<T2,...
method QueryData (line 29) | private QueryData(AbstractDao<T2, ?> dao, String sql, String[] initi...
method createQuery (line 33) | @Override
method create (line 39) | static <T2> CountQuery<T2> create(AbstractDao<T2, ?> dao, String sql, ...
method CountQuery (line 46) | private CountQuery(QueryData<T> queryData, AbstractDao<T, ?> dao, Stri...
method forCurrentThread (line 51) | public CountQuery<T> forCurrentThread() {
method count (line 56) | public long count() {
method setParameter (line 74) | @Override
method setParameter (line 79) | @Override
method setParameter (line 84) | @Override
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/CursorQuery.java
class CursorQuery (line 31) | public class CursorQuery<T> extends AbstractQueryWithLimit<T> {
class QueryData (line 32) | private final static class QueryData<T2> extends AbstractQueryData<T2,...
method QueryData (line 36) | QueryData(AbstractDao dao, String sql, String[] initialValues, int l...
method createQuery (line 42) | @Override
method internalCreate (line 50) | public static <T2> CursorQuery<T2> internalCreate(AbstractDao<T2, ?> d...
method create (line 54) | static <T2> CursorQuery<T2> create(AbstractDao<T2, ?> dao, String sql,...
method CursorQuery (line 63) | private CursorQuery(QueryData<T> queryData, AbstractDao<T, ?> dao, Str...
method forCurrentThread (line 69) | public CursorQuery forCurrentThread() {
method query (line 74) | public Cursor query() {
method setParameter (line 80) | @Override
method setParameter (line 85) | @Override
method setParameter (line 90) | @Override
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/DeleteQuery.java
class DeleteQuery (line 30) | public class DeleteQuery<T> extends AbstractQuery<T> {
class QueryData (line 31) | private final static class QueryData<T2> extends AbstractQueryData<T2,...
method QueryData (line 33) | private QueryData(AbstractDao<T2, ?> dao, String sql, String[] initi...
method createQuery (line 37) | @Override
method create (line 43) | static <T2> DeleteQuery<T2> create(AbstractDao<T2, ?> dao, String sql,...
method DeleteQuery (line 50) | private DeleteQuery(QueryData<T> queryData, AbstractDao<T, ?> dao, Str...
method forCurrentThread (line 55) | public DeleteQuery<T> forCurrentThread() {
method executeDeleteWithoutDetachingEntities (line 65) | public void executeDeleteWithoutDetachingEntities() {
method setParameter (line 84) | @Override
method setParameter (line 89) | @Override
method setParameter (line 94) | @Override
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/Join.java
class Join (line 25) | public class Join<SRC, DST> {
method Join (line 35) | public Join(String sourceTablePrefix, Property sourceJoinProperty,
method where (line 51) | public Join<SRC, DST> where(WhereCondition cond, WhereCondition... con...
method whereOr (line 60) | public Join<SRC, DST> whereOr(WhereCondition cond1, WhereCondition con...
method or (line 70) | public WhereCondition or(WhereCondition cond1, WhereCondition cond2, W...
method and (line 79) | public WhereCondition and(WhereCondition cond1, WhereCondition cond2, ...
method getTablePrefix (line 88) | public String getTablePrefix() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/LazyList.java
class LazyList (line 45) | public class LazyList<E> implements List<E>, Closeable {
class LazyIterator (line 46) | protected class LazyIterator implements CloseableListIterator<E> {
method LazyIterator (line 50) | public LazyIterator(int startLocation, boolean closeWhenDone) {
method add (line 55) | @Override
method hasPrevious (line 60) | @Override
method nextIndex (line 66) | @Override
method previous (line 71) | @Override
method previousIndex (line 85) | @Override
method set (line 90) | @Override
method hasNext (line 95) | @Override
method next (line 100) | @Override
method remove (line 113) | @Override
method close (line 118) | @Override
method LazyList (line 132) | LazyList(InternalQueryDaoAccess<E> daoAccess, Cursor cursor, boolean c...
method loadRemaining (line 152) | public void loadRemaining() {
method checkCached (line 160) | protected void checkCached() {
method peek (line 167) | public E peek(int location) {
method close (line 175) | @Override
method isClosed (line 181) | public boolean isClosed() {
method getLoadedCount (line 185) | public int getLoadedCount() {
method isLoadedCompletely (line 189) | public boolean isLoadedCompletely() {
method add (line 193) | @Override
method add (line 198) | @Override
method addAll (line 203) | @Override
method addAll (line 208) | @Override
method clear (line 213) | @Override
method contains (line 218) | @Override
method containsAll (line 224) | @Override
method get (line 230) | @Override
method loadEntity (line 263) | protected E loadEntity(int location) {
method indexOf (line 275) | @Override
method isEmpty (line 281) | @Override
method iterator (line 286) | @Override
method lastIndexOf (line 291) | @Override
method listIterator (line 297) | @Override
method listIteratorAutoClose (line 303) | public CloseableListIterator<E> listIteratorAutoClose() {
method listIterator (line 307) | @Override
method remove (line 312) | @Override
method remove (line 317) | @Override
method removeAll (line 322) | @Override
method retainAll (line 327) | @Override
method set (line 332) | @Override
method size (line 337) | @Override
method subList (line 342) | @Override
method toArray (line 351) | @Override
method toArray (line 357) | @Override
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/Query.java
class Query (line 37) | public class Query<T> extends AbstractQueryWithLimit<T> {
class QueryData (line 38) | private final static class QueryData<T2> extends AbstractQueryData<T2,...
method QueryData (line 42) | QueryData(AbstractDao<T2, ?> dao, String sql, String[] initialValues...
method createQuery (line 48) | @Override
method internalCreate (line 56) | public static <T2> Query<T2> internalCreate(AbstractDao<T2, ?> dao, St...
method create (line 60) | static <T2> Query<T2> create(AbstractDao<T2, ?> dao, String sql, Objec...
method Query (line 72) | private Query(QueryData<T> queryData, AbstractDao<T, ?> dao, String sq...
method forCurrentThread (line 81) | public Query<T> forCurrentThread() {
method list (line 86) | public List<T> list() {
method listLazy (line 97) | public LazyList<T> listLazy() {
method listLazyUncached (line 107) | public LazyList<T> listLazyUncached() {
method listIterator (line 117) | public CloseableListIterator<T> listIterator() {
method unique (line 127) | public T unique() {
method uniqueOrThrow (line 139) | public T uniqueOrThrow() {
method setParameter (line 147) | @Override
method setParameter (line 152) | @Override
method setParameter (line 157) | @Override
method __internalRxPlain (line 169) | @Internal
method __InternalRx (line 184) | @Internal
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/QueryBuilder.java
class QueryBuilder (line 48) | public class QueryBuilder<T> {
method internalCreate (line 72) | public static <T2> QueryBuilder<T2> internalCreate(AbstractDao<T2, ?> ...
method QueryBuilder (line 76) | protected QueryBuilder(AbstractDao<T, ?> dao) {
method QueryBuilder (line 80) | protected QueryBuilder(AbstractDao<T, ?> dao, String tablePrefix) {
method checkOrderBuilder (line 89) | private void checkOrderBuilder() {
method distinct (line 98) | public QueryBuilder<T> distinct() {
method preferLocalizedStringOrder (line 110) | public QueryBuilder<T> preferLocalizedStringOrder() {
method stringOrderCollation (line 124) | public QueryBuilder<T> stringOrderCollation(String stringOrderCollatio...
method where (line 134) | public QueryBuilder<T> where(WhereCondition cond, WhereCondition... co...
method whereOr (line 143) | public QueryBuilder<T> whereOr(WhereCondition cond1, WhereCondition co...
method or (line 153) | public WhereCondition or(WhereCondition cond1, WhereCondition cond2, W...
method and (line 162) | public WhereCondition and(WhereCondition cond1, WhereCondition cond2, ...
method join (line 170) | public <J> Join<T, J> join(Class<J> destinationEntityClass, Property d...
method join (line 178) | public <J> Join<T, J> join(Property sourceProperty, Class<J> destinati...
method join (line 188) | public <J> Join<T, J> join(Property sourceProperty, Class<J> destinati...
method join (line 199) | public <J> Join<T, J> join(Join<?, T> sourceJoin, Property sourcePrope...
method addJoin (line 205) | private <J> Join<T, J> addJoin(String sourceTablePrefix, Property sour...
method orderAsc (line 215) | public QueryBuilder<T> orderAsc(Property... properties) {
method orderDesc (line 221) | public QueryBuilder<T> orderDesc(Property... properties) {
method orderAscOrDesc (line 226) | private void orderAscOrDesc(String ascOrDescWithLeadingSpace, Property...
method orderCustom (line 238) | public QueryBuilder<T> orderCustom(Property property, String customOrd...
method orderRaw (line 249) | public QueryBuilder<T> orderRaw(String rawOrder) {
method append (line 255) | protected StringBuilder append(StringBuilder builder, Property propert...
method limit (line 263) | public QueryBuilder<T> limit(int limit) {
method offset (line 272) | public QueryBuilder<T> offset(int offset) {
method build (line 281) | public Query<T> build() {
method buildCursor (line 296) | public CursorQuery buildCursor() {
method createSelectBuilder (line 307) | private StringBuilder createSelectBuilder() {
method checkAddLimit (line 319) | private int checkAddLimit(StringBuilder builder) {
method checkAddOffset (line 329) | private int checkAddOffset(StringBuilder builder) {
method buildDelete (line 346) | public DeleteQuery<T> buildDelete() {
method buildCount (line 371) | public CountQuery<T> buildCount() {
method checkLog (line 383) | private void checkLog(String sql) {
method appendJoinsAndWheres (line 392) | private void appendJoinsAndWheres(StringBuilder builder, String tableP...
method list (line 424) | public List<T> list() {
method rx (line 431) | @Experimental
method rxPlain (line 439) | @Experimental
method listLazy (line 449) | public LazyList<T> listLazy() {
method listLazyUncached (line 458) | public LazyList<T> listLazyUncached() {
method listIterator (line 467) | public CloseableListIterator<T> listIterator() {
method unique (line 476) | public T unique() {
method uniqueOrThrow (line 486) | public T uniqueOrThrow() {
method count (line 495) | public long count() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/WhereCollector.java
class WhereCollector (line 27) | class WhereCollector<T> {
method WhereCollector (line 33) | WhereCollector(AbstractDao<T, ?> dao, String tablePrefix) {
method add (line 39) | void add(WhereCondition cond, WhereCondition... condMore) {
method combineWhereConditions (line 48) | WhereCondition combineWhereConditions(String combineOp, WhereCondition...
method addCondition (line 65) | void addCondition(StringBuilder builder, List<Object> values, WhereCon...
method checkCondition (line 71) | void checkCondition(WhereCondition whereCondition) {
method checkProperty (line 77) | void checkProperty(Property property) {
method appendWhereClause (line 93) | void appendWhereClause(StringBuilder builder, String tablePrefixOrNull...
method isEmpty (line 105) | boolean isEmpty() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/query/WhereCondition.java
type WhereCondition (line 29) | public interface WhereCondition {
method appendTo (line 31) | void appendTo(StringBuilder builder, String tableAlias);
method appendValuesTo (line 33) | void appendValuesTo(List<Object> values);
class AbstractCondition (line 35) | abstract class AbstractCondition implements WhereCondition {
method AbstractCondition (line 41) | public AbstractCondition() {
method AbstractCondition (line 47) | public AbstractCondition(Object value) {
method AbstractCondition (line 53) | public AbstractCondition(Object[] values) {
method appendValuesTo (line 59) | @Override
class PropertyCondition (line 71) | class PropertyCondition extends AbstractCondition {
method checkValueForType (line 73) | private static Object checkValueForType(Property property, Object va...
method checkValuesForType (line 110) | private static Object[] checkValuesForType(Property property, Object...
method PropertyCondition (line 120) | public PropertyCondition(Property property, String op) {
method PropertyCondition (line 125) | public PropertyCondition(Property property, String op, Object value) {
method PropertyCondition (line 131) | public PropertyCondition(Property property, String op, Object[] valu...
method appendTo (line 137) | @Override
class StringCondition (line 143) | class StringCondition extends AbstractCondition {
method StringCondition (line 147) | public StringCondition(String string) {
method StringCondition (line 151) | public StringCondition(String string, Object value) {
method StringCondition (line 156) | public StringCondition(String string, Object... values) {
method appendTo (line 161) | @Override
FILE: DaoCore/src/main/java/org/greenrobot/greendao/rx/RxBase.java
class RxBase (line 30) | @Internal
method RxBase (line 38) | RxBase() {
method RxBase (line 46) | @Experimental
method getScheduler (line 54) | @Experimental
method wrap (line 59) | protected <R> Observable<R> wrap(Callable<R> callable) {
method wrap (line 63) | protected <R> Observable<R> wrap(Observable<R> observable) {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/rx/RxDao.java
class RxDao (line 42) | @Experimental
method RxDao (line 50) | @Experimental
method RxDao (line 59) | @Experimental
method loadAll (line 68) | @Experimental
method load (line 81) | @Experimental
method refresh (line 95) | @Experimental
method insert (line 110) | @Experimental
method insertInTx (line 125) | @Experimental
method insertInTx (line 140) | @Experimental
method insertOrReplace (line 155) | @Experimental
method insertOrReplaceInTx (line 170) | @Experimental
method insertOrReplaceInTx (line 185) | @Experimental
method save (line 200) | @Experimental
method saveInTx (line 215) | @Experimental
method saveInTx (line 230) | @Experimental
method update (line 245) | @Experimental
method updateInTx (line 260) | @Experimental
method updateInTx (line 275) | @Experimental
method delete (line 290) | @Experimental
method deleteByKey (line 304) | @Experimental
method deleteAll (line 318) | @Experimental
method deleteInTx (line 332) | @Experimental
method deleteInTx (line 346) | @Experimental
method deleteByKeyInTx (line 360) | @Experimental
method deleteByKeyInTx (line 374) | @Experimental
method count (line 388) | @Experimental
method getDao (line 401) | @Experimental
FILE: DaoCore/src/main/java/org/greenrobot/greendao/rx/RxQuery.java
class RxQuery (line 35) | @Experimental
method RxQuery (line 40) | public RxQuery(Query<T> query) {
method RxQuery (line 44) | public RxQuery(Query<T> query, Scheduler scheduler) {
method list (line 52) | @Experimental
method unique (line 65) | @Experimental
method oneByOne (line 82) | public Observable<T> oneByOne() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/rx/RxTransaction.java
class RxTransaction (line 30) | @Experimental
method RxTransaction (line 34) | public RxTransaction(AbstractDaoSession daoSession) {
method RxTransaction (line 38) | public RxTransaction(AbstractDaoSession daoSession, Scheduler schedule...
method run (line 46) | @Experimental
method call (line 60) | @Experimental
method getDaoSession (line 73) | @Experimental
FILE: DaoCore/src/main/java/org/greenrobot/greendao/rx/RxUtils.java
class RxUtils (line 26) | @Internal
method fromCallable (line 29) | @Internal
FILE: DaoCore/src/main/java/org/greenrobot/greendao/test/AbstractDaoSessionTest.java
class AbstractDaoSessionTest (line 35) | public abstract class AbstractDaoSessionTest<T extends AbstractDaoMaster...
method AbstractDaoSessionTest (line 42) | public AbstractDaoSessionTest(Class<T> daoMasterClass) {
method AbstractDaoSessionTest (line 46) | public AbstractDaoSessionTest(Class<T> daoMasterClass, boolean inMemor...
method setUp (line 51) | @SuppressWarnings("unchecked")
FILE: DaoCore/src/main/java/org/greenrobot/greendao/test/AbstractDaoTest.java
class AbstractDaoTest (line 41) | public abstract class AbstractDaoTest<D extends AbstractDao<T, K>, T, K>...
method AbstractDaoTest (line 49) | public AbstractDaoTest(Class<D> daoClass) {
method AbstractDaoTest (line 53) | public AbstractDaoTest(Class<D> daoClass, boolean inMemory) {
method setIdentityScopeBeforeSetUp (line 58) | public void setIdentityScopeBeforeSetUp(IdentityScope<K, T> identitySc...
method setUp (line 62) | @SuppressWarnings("unchecked")
method setUpTableForDao (line 75) | protected void setUpTableForDao() throws Exception {
method clearIdentityScopeIfAny (line 84) | protected void clearIdentityScopeIfAny() {
method logTableDump (line 93) | protected void logTableDump() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/test/AbstractDaoTestLongPk.java
class AbstractDaoTestLongPk (line 29) | public abstract class AbstractDaoTestLongPk<D extends AbstractDao<T, Lon...
method AbstractDaoTestLongPk (line 31) | public AbstractDaoTestLongPk(Class<D> daoClass) {
method createRandomPk (line 36) | protected Long createRandomPk() {
method testAssignPk (line 40) | public void testAssignPk() {
FILE: DaoCore/src/main/java/org/greenrobot/greendao/test/AbstractDaoTestSinglePk.java
class AbstractDaoTestSinglePk (line 40) | public abstract class AbstractDaoTestSinglePk<D extends AbstractDao<T, K...
method AbstractDaoTestSinglePk (line 45) | public AbstractDaoTestSinglePk(Class<D> daoClass) {
method setUp (line 50) | @Override
method testInsertAndLoad (line 67) | public void testInsertAndLoad() {
method testInsertInTx (line 77) | public void testInsertInTx() {
method testCount (line 87) | public void testCount() {
method testInsertTwice (line 96) | public void testInsertTwice() {
method testInsertOrReplaceTwice (line 108) | public void testInsertOrReplaceTwice() {
method testInsertOrReplaceInTx (line 117) | public void testInsertOrReplaceInTx() {
method testDelete (line 133) | public void testDelete() {
method testDeleteAll (line 143) | public void testDeleteAll() {
method testDeleteInTx (line 159) | public void testDeleteInTx() {
method testDeleteByKeyInTx (line 180) | public void testDeleteByKeyInTx() {
method testRowId (line 200) | public void testRowId() {
method testLoadAll (line 208) | public void testLoadAll() {
method testQuery (line 220) | public void testQuery() {
method testUpdate (line 232) | public void testUpdate() {
method testReadWithOffset (line 240) | public void testReadWithOffset() {
method testLoadPkWithOffset (line 254) | public void testLoadPkWithOffset() {
method testLoadPk (line 258) | public void testLoadPk() {
method testSave (line 262) | public void testSave() {
method testSaveInTx (line 275) | public void testSaveInTx() {
method runLoadPkTest (line 294) | protected void runLoadPkTest(int offset) {
method queryWithDummyColumnsInFront (line 308) | protected Cursor queryWithDummyColumnsInFront(int dummyCount, String v...
method checkKeyIsNullable (line 340) | protected boolean checkKeyIsNullable() {
method nextPk (line 349) | protected K nextPk() {
method createEntityWithRandomPk (line 359) | protected T createEntityWithRandomPk() {
method createRandomPk (line 364) | protected abstract K createRandomPk();
method createEntity (line 370) | protected abstract T createEntity(K key);
FILE: DaoCore/src/main/java/org/greenrobot/greendao/test/AbstractDaoTestStringPk.java
class AbstractDaoTestStringPk (line 30) | public abstract class AbstractDaoTestStringPk<D extends AbstractDao<T, S...
method AbstractDaoTestStringPk (line 33) | public AbstractDaoTestStringPk(Class<D> daoClass) {
method createRandomPk (line 37) | @Override
FILE: DaoCore/src/main/java/org/greenrobot/greendao/test/DbTest.java
class DbTest (line 41) | public abstract class DbTest extends AndroidTestCase {
method DbTest (line 51) | public DbTest() {
method DbTest (line 55) | public DbTest(boolean inMemory) {
method setUp (line 60) | @Override
method createApplication (line 67) | public <T extends Application> T createApplication(Class<T> appClass) {
method terminateApplication (line 81) | public void terminateApplication() {
method getApplication (line 88) | public <T extends Application> T getApplication() {
method createDatabase (line 94) | protected Database createDatabase() {
method tearDown (line 106) | @Override
method logTableDump (line 119) | protected void logTableDump(String tablename) {
FILE: DaoGenerator/src-test/org/greenrobot/greendao/generator/SimpleDaoGeneratorTest.java
class SimpleDaoGeneratorTest (line 29) | public class SimpleDaoGeneratorTest {
method testMinimalSchema (line 31) | @Test
method testDbName (line 54) | @Test
method testInterfacesError (line 63) | @Test(expected = RuntimeException.class)
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/ContentProvider.java
class ContentProvider (line 23) | @SuppressWarnings("unused")
method ContentProvider (line 33) | public ContentProvider(Schema schema, List<Entity> entities) {
method getAuthority (line 38) | public String getAuthority() {
method setAuthority (line 42) | public void setAuthority(String authority) {
method getBasePath (line 46) | public String getBasePath() {
method setBasePath (line 50) | public void setBasePath(String basePath) {
method getClassName (line 54) | public String getClassName() {
method setClassName (line 58) | public void setClassName(String className) {
method getJavaPackage (line 62) | public String getJavaPackage() {
method setJavaPackage (line 66) | public void setJavaPackage(String javaPackage) {
method isReadOnly (line 70) | public boolean isReadOnly() {
method readOnly (line 74) | public void readOnly() {
method getEntities (line 78) | public List<Entity> getEntities() {
method init2ndPass (line 82) | public void init2ndPass() {
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/DaoGenerator.java
class DaoGenerator (line 40) | public class DaoGenerator {
method DaoGenerator (line 53) | public DaoGenerator() throws IOException {
method getConfiguration (line 71) | private Configuration getConfiguration(String probingTemplate) throws ...
method compilePattern (line 96) | private Pattern compilePattern(String sectionName) {
method generateAll (line 103) | public void generateAll(Schema schema, String outDir) throws Exception {
method generateAll (line 108) | public void generateAll(Schema schema, String outDir, String outDirEnt...
method toFileForceExists (line 152) | protected File toFileForceExists(String filename) throws IOException {
method generate (line 161) | private void generate(Template template, File outDirFile, String javaP...
method generate (line 166) | private void generate(Template template, File outDirFile, String javaP...
method checkKeepSections (line 199) | private void checkKeepSections(File file, Map<String, Object> root) {
method toJavaFilename (line 226) | protected File toJavaFilename(File outDirFile, String javaPackage, Str...
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/DaoUtil.java
class DaoUtil (line 29) | public class DaoUtil {
method dbName (line 30) | public static String dbName(String javaName) {
method getClassnameFromFullyQualified (line 43) | public static String getClassnameFromFullyQualified(String clazz) {
method capFirst (line 52) | public static String capFirst(String string) {
method getPackageFromFullyQualified (line 56) | public static String getPackageFromFullyQualified(String clazz) {
method readAllBytes (line 65) | public static byte[] readAllBytes(InputStream in) throws IOException {
method readAllBytes (line 71) | public static byte[] readAllBytes(File file) throws IOException {
method readAllBytes (line 80) | public static byte[] readAllBytes(String filename) throws IOException {
method copyAllBytes (line 94) | public static int copyAllBytes(InputStream in, OutputStream out) throw...
method checkConvertToJavaDoc (line 108) | public static String checkConvertToJavaDoc(String javaDoc, String inde...
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/Entity.java
class Entity (line 42) | @SuppressWarnings("unused")
method Entity (line 82) | Entity(Schema schema, String className) {
method addBooleanProperty (line 101) | public PropertyBuilder addBooleanProperty(String propertyName) {
method addByteProperty (line 105) | public PropertyBuilder addByteProperty(String propertyName) {
method addShortProperty (line 109) | public PropertyBuilder addShortProperty(String propertyName) {
method addIntProperty (line 113) | public PropertyBuilder addIntProperty(String propertyName) {
method addLongProperty (line 117) | public PropertyBuilder addLongProperty(String propertyName) {
method addFloatProperty (line 121) | public PropertyBuilder addFloatProperty(String propertyName) {
method addDoubleProperty (line 125) | public PropertyBuilder addDoubleProperty(String propertyName) {
method addByteArrayProperty (line 129) | public PropertyBuilder addByteArrayProperty(String propertyName) {
method addStringProperty (line 133) | public PropertyBuilder addStringProperty(String propertyName) {
method addDateProperty (line 137) | public PropertyBuilder addDateProperty(String propertyName) {
method addProperty (line 141) | public PropertyBuilder addProperty(PropertyType propertyType, String p...
method addIdProperty (line 151) | public PropertyBuilder addIdProperty() {
method addToMany (line 158) | public ToMany addToMany(Entity target, Property targetProperty) {
method addToMany (line 167) | public ToMany addToMany(Entity target, Property targetProperty, String...
method addToMany (line 177) | public ToMany addToMany(Property sourceProperty, Entity target, Proper...
method addToMany (line 183) | public ToMany addToMany(Property[] sourceProperties, Entity target, Pr...
method addToMany (line 194) | public ToManyWithJoinEntity addToMany(Entity target, Entity joinEntity...
method addToOne (line 205) | public ToOne addToOne(Entity target, Property fkProperty) {
method addToOne (line 217) | public ToOne addToOne(Entity target, Property fkProperty, String name) {
method addToOneWithoutProperty (line 223) | public ToOne addToOneWithoutProperty(String name, Entity target, Strin...
method addToOneWithoutProperty (line 227) | public ToOne addToOneWithoutProperty(String name, Entity target, Strin...
method addIncomingToMany (line 245) | protected void addIncomingToMany(ToMany toMany) {
method addContentProvider (line 249) | public ContentProvider addContentProvider() {
method addIndex (line 258) | public Entity addIndex(Index index) {
method addImport (line 263) | public Entity addImport(String additionalImport) {
method useProtobuf (line 269) | Entity useProtobuf() {
method isProtobuf (line 274) | public boolean isProtobuf() {
method getSchema (line 278) | public Schema getSchema() {
method getDbName (line 282) | public String getDbName() {
method setTableName (line 286) | @Deprecated
method setDbName (line 294) | public void setDbName(String dbName) {
method getClassName (line 299) | public String getClassName() {
method getProperties (line 303) | public List<Property> getProperties() {
method getPropertiesColumns (line 307) | public List<Property> getPropertiesColumns() {
method getJavaPackage (line 311) | public String getJavaPackage() {
method setJavaPackage (line 315) | public void setJavaPackage(String javaPackage) {
method getJavaPackageDao (line 319) | public String getJavaPackageDao() {
method setJavaPackageDao (line 323) | public void setJavaPackageDao(String javaPackageDao) {
method getClassNameDao (line 327) | public String getClassNameDao() {
method setClassNameDao (line 331) | public void setClassNameDao(String classNameDao) {
method getClassNameTest (line 335) | public String getClassNameTest() {
method setClassNameTest (line 339) | public void setClassNameTest(String classNameTest) {
method getJavaPackageTest (line 343) | public String getJavaPackageTest() {
method setJavaPackageTest (line 347) | public void setJavaPackageTest(String javaPackageTest) {
method getPropertiesPk (line 352) | public List<Property> getPropertiesPk() {
method getPropertiesNonPk (line 357) | public List<Property> getPropertiesNonPk() {
method getPkProperty (line 362) | public Property getPkProperty() {
method getIndexes (line 366) | public List<Index> getIndexes() {
method getPkType (line 371) | public String getPkType() {
method isConstructors (line 375) | public boolean isConstructors() {
method setConstructors (line 380) | public void setConstructors(boolean constructors) {
method isSkipGeneration (line 384) | public boolean isSkipGeneration() {
method setSkipGeneration (line 392) | public void setSkipGeneration(boolean skipGeneration) {
method setSkipTableCreation (line 396) | @Deprecated
method setSkipCreationInDb (line 405) | public void setSkipCreationInDb(boolean skipCreationInDb) {
method isSkipCreationInDb (line 409) | public boolean isSkipCreationInDb() {
method isSkipGenerationTest (line 413) | public boolean isSkipGenerationTest() {
method setSkipGenerationTest (line 417) | public void setSkipGenerationTest(boolean skipGenerationTest) {
method getToOneRelations (line 421) | public List<ToOne> getToOneRelations() {
method getToManyRelations (line 425) | public List<ToManyBase> getToManyRelations() {
method getIncomingToManyRelations (line 429) | public List<ToManyBase> getIncomingToManyRelations() {
method setActive (line 437) | public void setActive(Boolean active) {
method getActive (line 441) | public Boolean getActive() {
method getHasKeepSections (line 445) | public Boolean getHasKeepSections() {
method getAdditionalImportsEntity (line 449) | public Collection<String> getAdditionalImportsEntity() {
method getAdditionalImportsDao (line 453) | public Collection<String> getAdditionalImportsDao() {
method setHasKeepSections (line 457) | public void setHasKeepSections(Boolean hasKeepSections) {
method getInterfacesToImplement (line 461) | public List<String> getInterfacesToImplement() {
method getContentProviders (line 465) | public List<ContentProvider> getContentProviders() {
method implementsInterface (line 469) | public void implementsInterface(String... interfaces) {
method implementsSerializable (line 478) | public void implementsSerializable() {
method getSuperclass (line 482) | public String getSuperclass() {
method setSuperclass (line 486) | public void setSuperclass(String classToExtend) {
method getJavaDoc (line 490) | public String getJavaDoc() {
method setJavaDoc (line 494) | public void setJavaDoc(String javaDoc) {
method getCodeBeforeClass (line 498) | public String getCodeBeforeClass() {
method setCodeBeforeClass (line 502) | public void setCodeBeforeClass(String codeBeforeClass) {
method init2ndPass (line 506) | void init2ndPass() {
method init2ndPassNamesWithDefaults (line 575) | protected void init2ndPassNamesWithDefaults() {
method init2ndPassIndexNamesWithDefaults (line 606) | protected void init2ndPassIndexNamesWithDefaults() {
method init3rdPass (line 625) | void init3rdPass() {
method init3rdPassRelations (line 634) | private void init3rdPassRelations() {
method init3rdPassAdditionalImports (line 660) | private void init3rdPassAdditionalImports() {
method checkAdditionalImportsEntityTargetEntity (line 708) | private void checkAdditionalImportsEntityTargetEntity(Entity targetEnt...
method checkAdditionalImportsDaoTargetEntity (line 717) | private void checkAdditionalImportsDaoTargetEntity(Entity targetEntity) {
method validatePropertyExists (line 723) | public void validatePropertyExists(Property property) {
method getMultiIndexes (line 729) | public List<Index> getMultiIndexes() {
method isNonDefaultDbName (line 733) | public boolean isNonDefaultDbName() {
method toString (line 737) | @Override
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/Index.java
class Index (line 21) | @SuppressWarnings("unused")
method getName (line 27) | public String getName() {
method setName (line 31) | public Index setName(String name) {
method makeUnique (line 37) | public Index makeUnique() {
method isUnique (line 42) | public boolean isUnique() {
method isNonDefaultName (line 46) | public boolean isNonDefaultName() {
method setDefaultName (line 51) | void setDefaultName(String name) {
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/Property.java
class Property (line 22) | @SuppressWarnings("unused")
class PropertyBuilder (line 25) | public static class PropertyBuilder {
method PropertyBuilder (line 28) | public PropertyBuilder(Schema schema, Entity entity, PropertyType pr...
method columnName (line 32) | @Deprecated
method dbName (line 40) | public PropertyBuilder dbName(String dbName) {
method columnType (line 46) | @Deprecated
method dbType (line 54) | public PropertyBuilder dbType(String dbType) {
method primaryKey (line 59) | public PropertyBuilder primaryKey() {
method primaryKeyAsc (line 64) | public PropertyBuilder primaryKeyAsc() {
method primaryKeyDesc (line 70) | public PropertyBuilder primaryKeyDesc() {
method autoincrement (line 76) | public PropertyBuilder autoincrement() {
method unique (line 85) | public PropertyBuilder unique() {
method notNull (line 90) | public PropertyBuilder notNull() {
method nonPrimitiveType (line 95) | public PropertyBuilder nonPrimitiveType() {
method index (line 103) | public PropertyBuilder index() {
method indexAsc (line 110) | public PropertyBuilder indexAsc(String indexNameOrNull, boolean isUn...
method indexDesc (line 121) | public PropertyBuilder indexDesc(String indexNameOrNull, boolean isU...
method customType (line 132) | public PropertyBuilder customType(String customType, String converte...
method codeBeforeField (line 140) | public PropertyBuilder codeBeforeField(String code) {
method codeBeforeGetter (line 145) | public PropertyBuilder codeBeforeGetter(String code) {
method codeBeforeSetter (line 150) | public PropertyBuilder codeBeforeSetter(String code) {
method codeBeforeGetterAndSetter (line 155) | public PropertyBuilder codeBeforeGetterAndSetter(String code) {
method javaDocField (line 161) | public PropertyBuilder javaDocField(String javaDoc) {
method checkConvertToJavaDoc (line 166) | private String checkConvertToJavaDoc(String javaDoc) {
method javaDocGetter (line 170) | public PropertyBuilder javaDocGetter(String javaDoc) {
method javaDocSetter (line 175) | public PropertyBuilder javaDocSetter(String javaDoc) {
method javaDocGetterAndSetter (line 180) | public PropertyBuilder javaDocGetterAndSetter(String javaDoc) {
method getProperty (line 187) | public Property getProperty() {
method Property (line 238) | public Property(Schema schema, Entity entity, PropertyType propertyTyp...
method getPropertyName (line 245) | public String getPropertyName() {
method getPropertyType (line 249) | public PropertyType getPropertyType() {
method setPropertyType (line 253) | public void setPropertyType(PropertyType propertyType) {
method getDbName (line 257) | public String getDbName() {
method isNonDefaultDbName (line 261) | public boolean isNonDefaultDbName() {
method getDbType (line 265) | public String getDbType() {
method isPrimaryKey (line 269) | public boolean isPrimaryKey() {
method isPkAsc (line 273) | public boolean isPkAsc() {
method isPkDesc (line 277) | public boolean isPkDesc() {
method isAutoincrement (line 281) | public boolean isAutoincrement() {
method getConstraints (line 285) | public String getConstraints() {
method isUnique (line 289) | public boolean isUnique() {
method isNotNull (line 293) | public boolean isNotNull() {
method isNonPrimitiveType (line 297) | public boolean isNonPrimitiveType() {
method getJavaType (line 301) | public String getJavaType() {
method getJavaTypeInEntity (line 305) | public String getJavaTypeInEntity() {
method getOrdinal (line 313) | public int getOrdinal() {
method setOrdinal (line 317) | void setOrdinal(int ordinal) {
method getCustomType (line 321) | public String getCustomType() {
method getCustomTypeClassName (line 325) | public String getCustomTypeClassName() {
method getConverter (line 329) | public String getConverter() {
method getConverterClassName (line 333) | public String getConverterClassName() {
method getCodeBeforeField (line 337) | public String getCodeBeforeField() {
method getCodeBeforeGetter (line 341) | public String getCodeBeforeGetter() {
method getCodeBeforeSetter (line 345) | public String getCodeBeforeSetter() {
method getJavaDocField (line 349) | public String getJavaDocField() {
method getJavaDocGetter (line 353) | public String getJavaDocGetter() {
method getJavaDocSetter (line 357) | public String getJavaDocSetter() {
method getDatabaseValueExpression (line 361) | public String getDatabaseValueExpression() {
method getDatabaseValueExpressionNotNull (line 365) | public String getDatabaseValueExpressionNotNull() {
method getDatabaseValueExpression (line 373) | public String getDatabaseValueExpression(String entityValue) {
method getEntityValueExpression (line 396) | public String getEntityValueExpression(String databaseValue) {
method getEntity (line 418) | public Entity getEntity() {
method getIndex (line 422) | public Index getIndex() {
method setIndex (line 426) | public void setIndex(Index index) {
method init2ndPass (line 430) | void init2ndPass() {
method initConstraint (line 450) | private void initConstraint() {
method init3ndPass (line 478) | void init3ndPass() {
method toString (line 482) | @Override
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/PropertyOrderList.java
class PropertyOrderList (line 24) | public class PropertyOrderList {
method PropertyOrderList (line 28) | public PropertyOrderList() {
method addProperty (line 33) | public void addProperty(Property property) {
method addPropertyAsc (line 38) | public void addPropertyAsc(Property property) {
method addPropertyDesc (line 43) | public void addPropertyDesc(Property property) {
method addOrderRaw (line 48) | @SuppressWarnings("unused")
method getProperties (line 54) | public List<Property> getProperties() {
method getPropertiesOrder (line 58) | public List<String> getPropertiesOrder() {
method getCommaSeparatedString (line 62) | public String getCommaSeparatedString(String tablePrefixOrNull) {
method isEmpty (line 84) | public boolean isEmpty() {
method getOrderSpec (line 88) | public String getOrderSpec() {
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/PropertyType.java
type PropertyType (line 26) | public enum PropertyType {
method PropertyType (line 33) | PropertyType(boolean scalar) {
method isScalar (line 38) | public boolean isScalar() {
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/Query.java
class Query (line 25) | public class Query {
method Query (line 32) | public Query(String name) {
method addEqualsParam (line 37) | public QueryParam addEqualsParam(Property column) {
method addParam (line 41) | public QueryParam addParam(Property column, String operator) {
method distinct (line 47) | public void distinct() {
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/QueryParam.java
class QueryParam (line 22) | public class QueryParam {
method QueryParam (line 26) | public QueryParam(Property column, String operator) {
method getColumn (line 31) | public Property getColumn() {
method getOperator (line 35) | public String getOperator() {
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/Schema.java
class Schema (line 31) | @SuppressWarnings("unused")
method Schema (line 48) | public Schema(String name, int version, String defaultJavaPackage) {
method Schema (line 57) | public Schema(int version, String defaultJavaPackage) {
method enableKeepSectionsByDefault (line 61) | public void enableKeepSectionsByDefault() {
method enableActiveEntitiesByDefault (line 65) | public void enableActiveEntitiesByDefault() {
method initTypeMappings (line 69) | private void initTypeMappings() {
method addEntity (line 111) | public Entity addEntity(String className) {
method addProtobufEntity (line 121) | public Entity addProtobufEntity(String className) {
method mapToDbType (line 127) | public String mapToDbType(PropertyType propertyType) {
method mapToJavaTypeNullable (line 131) | public String mapToJavaTypeNullable(PropertyType propertyType) {
method mapToJavaTypeNotNull (line 135) | public String mapToJavaTypeNotNull(PropertyType propertyType) {
method mapType (line 139) | private String mapType(Map<PropertyType, String> map, PropertyType pro...
method getVersion (line 147) | public int getVersion() {
method getDefaultJavaPackage (line 151) | public String getDefaultJavaPackage() {
method getDefaultJavaPackageDao (line 155) | public String getDefaultJavaPackageDao() {
method setDefaultJavaPackageDao (line 159) | public void setDefaultJavaPackageDao(String defaultJavaPackageDao) {
method getDefaultJavaPackageTest (line 163) | public String getDefaultJavaPackageTest() {
method setDefaultJavaPackageTest (line 167) | public void setDefaultJavaPackageTest(String defaultJavaPackageTest) {
method getEntities (line 171) | public List<Entity> getEntities() {
method isHasKeepSectionsByDefault (line 175) | public boolean isHasKeepSectionsByDefault() {
method isUseActiveEntitiesByDefault (line 179) | public boolean isUseActiveEntitiesByDefault() {
method getName (line 183) | public String getName() {
method getPrefix (line 187) | public String getPrefix() {
method init2ndPass (line 191) | void init2ndPass() {
method init3rdPass (line 203) | void init3rdPass() {
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/ToMany.java
class ToMany (line 24) | @SuppressWarnings("unused")
method ToMany (line 29) | public ToMany(Schema schema, Entity sourceEntity, Property[] sourcePro...
method getSourceProperties (line 36) | public Property[] getSourceProperties() {
method setSourceProperties (line 40) | public void setSourceProperties(Property[] sourceProperties) {
method getTargetProperties (line 44) | public Property[] getTargetProperties() {
method init2ndPass (line 48) | void init2ndPass() {
method init3rdPass (line 78) | void init3rdPass() {
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/ToManyBase.java
class ToManyBase (line 22) | @SuppressWarnings("unused")
method ToManyBase (line 31) | public ToManyBase(Schema schema, Entity sourceEntity, Entity targetEnt...
method getSourceEntity (line 38) | public Entity getSourceEntity() {
method getTargetEntity (line 42) | public Entity getTargetEntity() {
method getName (line 46) | public String getName() {
method setName (line 54) | public void setName(String name) {
method orderAsc (line 59) | public void orderAsc(Property... properties) {
method orderDesc (line 67) | public void orderDesc(Property... properties) {
method getOrder (line 74) | public String getOrder() {
method getOrderSpec (line 84) | public String getOrderSpec() {
method init2ndPass (line 92) | void init2ndPass() {
method init3rdPass (line 100) | void init3rdPass() {
method toString (line 103) | @Override
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/ToManyWithJoinEntity.java
class ToManyWithJoinEntity (line 24) | @SuppressWarnings("unused")
method ToManyWithJoinEntity (line 30) | public ToManyWithJoinEntity(Schema schema, Entity sourceEntity, Entity...
method getJoinEntity (line 38) | public Entity getJoinEntity() {
method getSourceProperty (line 42) | public Property getSourceProperty() {
method getTargetProperty (line 46) | public Property getTargetProperty() {
method init3rdPass (line 50) | void init3rdPass() {
FILE: DaoGenerator/src/org/greenrobot/greendao/generator/ToOne.java
class ToOne (line 22) | @SuppressWarnings("unused")
method ToOne (line 33) | public ToOne(Schema schema, Entity sourceEntity, Entity targetEntity, ...
method getSourceEntity (line 43) | public Entity getSourceEntity() {
method getTargetEntity (line 47) | public Entity getTargetEntity() {
method getFkProperties (line 51) | public Property[] getFkProperties() {
method getResolvedKeyJavaType (line 55) | public String[] getResolvedKeyJavaType() {
method getResolvedKeyUseEquals (line 59) | public boolean[] getResolvedKeyUseEquals() {
method getName (line 63) | public String getName() {
method setName (line 71) | public void setName(String name) {
method isUseFkProperty (line 75) | public boolean isUseFkProperty() {
method init2ndPass (line 79) | void init2ndPass() {
method init3ndPass (line 89) | void init3ndPass() {
method checkUseEquals (line 111) | protected boolean checkUseEquals(PropertyType propertyType) {
method toString (line 129) | @Override
FILE: examples/DaoExample/src/androidTest/java/org/greenrobot/greendao/example/NoteTest.java
class NoteTest (line 20) | public class NoteTest extends AbstractDaoTestLongPk<NoteDao, Note> {
method NoteTest (line 22) | public NoteTest() {
method createEntity (line 26) | @Override
FILE: examples/DaoExample/src/main/java/org/greenrobot/greendao/example/App.java
class App (line 8) | public class App extends Application {
method onCreate (line 12) | @Override
method getDaoSession (line 28) | public DaoSession getDaoSession() {
class ExampleOpenHelper (line 32) | public static class ExampleOpenHelper extends DaoMaster.OpenHelper {
method ExampleOpenHelper (line 34) | public ExampleOpenHelper(Context context, String name) {
method onCreate (line 38) | @Override
FILE: examples/DaoExample/src/main/java/org/greenrobot/greendao/example/Note.java
class Note (line 13) | @Entity(indexes = {
method Note (line 29) | @Generated(hash = 1272611929)
method Note (line 33) | public Note(Long id) {
method Note (line 37) | @Generated(hash = 1686394253)
method getId (line 46) | public Long getId() {
method setId (line 50) | public void setId(Long id) {
method getText (line 54) | @NotNull
method setText (line 60) | public void setText(@NotNull String text) {
method getComment (line 64) | public String getComment() {
method setComment (line 68) | public void setComment(String comment) {
method getDate (line 72) | public java.util.Date getDate() {
method setDate (line 76) | public void setDate(java.util.Date date) {
method getType (line 80) | public NoteType getType() {
method setType (line 84) | public void setType(NoteType type) {
FILE: examples/DaoExample/src/main/java/org/greenrobot/greendao/example/NoteActivity.java
class NoteActivity (line 36) | public class NoteActivity extends AppCompatActivity {
method onCreate (line 45) | @Override
method updateNotes (line 61) | private void updateNotes() {
method setUpViews (line 66) | protected void setUpViews() {
method onAddButtonClick (line 103) | public void onAddButtonClick(View view) {
method addNote (line 107) | private void addNote() {
method onNoteClick (line 126) | @Override
FILE: examples/DaoExample/src/main/java/org/greenrobot/greendao/example/NoteType.java
type NoteType (line 3) | public enum NoteType {
FILE: examples/DaoExample/src/main/java/org/greenrobot/greendao/example/NoteTypeConverter.java
class NoteTypeConverter (line 5) | public class NoteTypeConverter implements PropertyConverter<NoteType, St...
method convertToEntityProperty (line 6) | @Override
method convertToDatabaseValue (line 11) | @Override
FILE: examples/DaoExample/src/main/java/org/greenrobot/greendao/example/NotesAdapter.java
class NotesAdapter (line 14) | public class NotesAdapter extends RecyclerView.Adapter<NotesAdapter.Note...
type NoteClickListener (line 19) | public interface NoteClickListener {
method onNoteClick (line 20) | void onNoteClick(int position);
class NoteViewHolder (line 23) | static class NoteViewHolder extends RecyclerView.ViewHolder {
method NoteViewHolder (line 28) | public NoteViewHolder(View itemView, final NoteClickListener clickLi...
method NotesAdapter (line 40) | public NotesAdapter(NoteClickListener clickListener) {
method setNotes (line 45) | public void setNotes(@NonNull List<Note> notes) {
method getNote (line 50) | public Note getNote(int position) {
method onCreateViewHolder (line 54) | @NonNull
method onBindViewHolder (line 62) | @Override
method getItemCount (line 69) | @Override
FILE: examples/RxDaoExample/src/main/java/org/greenrobot/greendao/rxexample/App.java
class App (line 8) | public class App extends Application {
method onCreate (line 12) | @Override
method getDaoSession (line 28) | public DaoSession getDaoSession() {
class ExampleOpenHelper (line 32) | public static class ExampleOpenHelper extends DaoMaster.OpenHelper {
method ExampleOpenHelper (line 34) | public ExampleOpenHelper(Context context, String name) {
method onCreate (line 38) | @Override
FILE: examples/RxDaoExample/src/main/java/org/greenrobot/greendao/rxexample/MainActivity.java
class MainActivity (line 22) | public class MainActivity extends AppCompatActivity {
method onCreate (line 31) | @Override
method updateNotes (line 47) | private void updateNotes() {
method setUpViews (line 53) | protected void setUpViews() {
method onAddButtonClick (line 77) | public void onAddButtonClick(View view) {
method addNote (line 81) | private void addNote() {
method onNoteClick (line 98) | @Override
FILE: examples/RxDaoExample/src/main/java/org/greenrobot/greendao/rxexample/Note.java
class Note (line 13) | @Entity(indexes = {
method Note (line 29) | @Generated(hash = 1272611929)
method Note (line 33) | public Note(Long id) {
method Note (line 37) | @Generated(hash = 1686394253)
method getId (line 46) | public Long getId() {
method setId (line 50) | public void setId(Long id) {
method getText (line 54) | @NotNull
method setText (line 60) | public void setText(@NotNull String text) {
method getComment (line 64) | public String getComment() {
method setComment (line 68) | public void setComment(String comment) {
method getDate (line 72) | public java.util.Date getDate() {
method setDate (line 76) | public void setDate(java.util.Date date) {
method getType (line 80) | public NoteType getType() {
method setType (line 84) | public void setType(NoteType type) {
FILE: examples/RxDaoExample/src/main/java/org/greenrobot/greendao/rxexample/NoteType.java
type NoteType (line 3) | public enum NoteType {
FILE: examples/RxDaoExample/src/main/java/org/greenrobot/greendao/rxexample/NoteTypeConverter.java
class NoteTypeConverter (line 5) | public class NoteTypeConverter implements PropertyConverter<NoteType, St...
method convertToEntityProperty (line 6) | @Override
method convertToDatabaseValue (line 11) | @Override
FILE: examples/RxDaoExample/src/main/java/org/greenrobot/greendao/rxexample/NotesAdapter.java
class NotesAdapter (line 14) | public class NotesAdapter extends RecyclerView.Adapter<NotesAdapter.Note...
type NoteClickListener (line 19) | public interface NoteClickListener {
method onNoteClick (line 20) | void onNoteClick(int position);
class NoteViewHolder (line 23) | static class NoteViewHolder extends RecyclerView.ViewHolder {
method NoteViewHolder (line 28) | public NoteViewHolder(View itemView, final NoteClickListener clickLi...
method NotesAdapter (line 40) | public NotesAdapter(NoteClickListener clickListener) {
method setNotes (line 45) | public void setNotes(@NonNull List<Note> notes) {
method getNote (line 50) | public Note getNote(int position) {
method onCreateViewHolder (line 54) | @NonNull
method onBindViewHolder (line 62) | @Override
method getItemCount (line 69) | @Override
FILE: greendao-api/src/main/java/org/greenrobot/greendao/converter/PropertyConverter.java
type PropertyConverter (line 28) | public interface PropertyConverter<P, D> {
method convertToEntityProperty (line 29) | P convertToEntityProperty(D databaseValue);
method convertToDatabaseValue (line 31) | D convertToDatabaseValue(P entityProperty);
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/DaoSessionConcurrentTest.java
class DaoSessionConcurrentTest (line 32) | public class DaoSessionConcurrentTest extends AbstractDaoSessionTest<Dao...
class TestThread (line 33) | class TestThread extends Thread {
method TestThread (line 36) | public TestThread(Runnable runnable) {
method run (line 40) | @Override
method DaoSessionConcurrentTest (line 62) | public DaoSessionConcurrentTest() {
method setUp (line 66) | @Override
method initThreads (line 72) | protected void initThreads(Runnable... runnables) throws InterruptedEx...
method testConcurrentInsertDuringTx (line 82) | public void testConcurrentInsertDuringTx() throws InterruptedException {
method testConcurrentUpdateDuringTx (line 131) | public void testConcurrentUpdateDuringTx() throws InterruptedException {
method testConcurrentDeleteDuringTx (line 169) | public void testConcurrentDeleteDuringTx() throws InterruptedException {
method testConcurrentQueryDuringTx (line 208) | public void testConcurrentQueryDuringTx() throws InterruptedException {
method testConcurrentLockAndQueryDuringTx (line 231) | public void testConcurrentLockAndQueryDuringTx() throws InterruptedExc...
method testConcurrentDeleteQueryDuringTx (line 254) | public void testConcurrentDeleteQueryDuringTx() throws InterruptedExce...
method testConcurrentResolveToMany (line 277) | public void testConcurrentResolveToMany() throws InterruptedException {
method testConcurrentResolveToOne (line 299) | public void testConcurrentResolveToOne() throws InterruptedException {
method _testThreadLocalSpeed (line 325) | public void _testThreadLocalSpeed() {
method doTx (line 345) | protected void doTx(final Runnable runnableInsideTx) {
method createEntity (line 361) | protected TestEntity createEntity(Long key) {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/DaoSessionConcurrentWALTest.java
class DaoSessionConcurrentWALTest (line 30) | public class DaoSessionConcurrentWALTest extends DaoSessionConcurrentTest {
method createDatabase (line 32) | @Override
method testConcurrentLockAndQueryDuringTxWAL (line 40) | public void testConcurrentLockAndQueryDuringTxWAL() throws Interrupted...
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/DaoSessionTest.java
class DaoSessionTest (line 26) | public class DaoSessionTest extends AbstractDaoSessionTest<DaoMaster, Da...
method DaoSessionTest (line 28) | public DaoSessionTest() {
method testInsertAndLoad (line 32) | public void testInsertAndLoad() {
method testIdentity (line 41) | public void testIdentity() {
method testIdentityPerSession (line 50) | public void testIdentityPerSession() {
method testSessionReset (line 58) | public void testSessionReset() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/DbTestTest.java
class DbTestTest (line 25) | public class DbTestTest extends DbTest {
class MyApp (line 26) | public static class MyApp extends Application {
method onCreate (line 33) | @Override
method onTerminate (line 40) | @Override
method setUp (line 48) | @Override
method tearDown (line 55) | @Override
method testCreateApplication (line 61) | public void testCreateApplication() {
method testTerminateApplication (line 71) | public void testTerminateApplication() {
method testGetApplicationBeforeCreate (line 81) | public void testGetApplicationBeforeCreate() {
method testGetApplication (line 90) | public void testGetApplication() {
method testGetApplicationAfterTerminate (line 103) | public void testGetApplicationAfterTerminate() {
method testMultipleApplications (line 115) | public void testMultipleApplications() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/DbUtilsTest.java
class DbUtilsTest (line 29) | public class DbUtilsTest extends DbTest {
method testExecuteSqlScript (line 30) | public void testExecuteSqlScript() throws IOException {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/DeadlockPreventionTest.java
class DeadlockPreventionTest (line 35) | public class DeadlockPreventionTest extends AbstractDaoSessionTest<DaoMa...
method DeadlockPreventionTest (line 40) | public DeadlockPreventionTest() {
method _testLoadAll (line 45) | public void _testLoadAll() throws InterruptedException {
method dumpStacktrace (line 92) | private void dumpStacktrace(String name, Thread thread) {
class LoadThread (line 99) | private class LoadThread extends Thread {
method run (line 100) | @Override
class InsertThread (line 111) | private class InsertThread extends Thread {
method run (line 114) | @Override
class InsertBatchThread (line 132) | private class InsertBatchThread extends Thread {
method run (line 135) | @Override
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/IndexTest.java
class IndexTest (line 31) | public class IndexTest extends AbstractDaoTest<SqliteMasterDao, SqliteMa...
method IndexTest (line 33) | public IndexTest() {
method testIndexesCreated (line 37) | public void testIndexesCreated() {
method testIndexCreateIfNotExists (line 56) | public void testIndexCreateIfNotExists() {
method getIndexes (line 64) | private List<SqliteMaster> getIndexes() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/LongHashMapTest.java
class LongHashMapTest (line 26) | public class LongHashMapTest extends TestCase {
method LongHashMapTest (line 32) | public LongHashMapTest() {
method testLongHashMapSimple (line 36) | public void testLongHashMapSimple() {
method testLongHashMapRandom (line 59) | public void testLongHashMapRandom() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/async/AbstractAsyncTest.java
class AbstractAsyncTest (line 31) | public abstract class AbstractAsyncTest extends AbstractDaoSessionTest<D...
method AbstractAsyncTest (line 37) | public AbstractAsyncTest() {
method setUp (line 41) | @Override
method assertWaitForCompletion1Sec (line 49) | public void assertWaitForCompletion1Sec() {
method onAsyncOperationCompleted (line 54) | @Override
method assertSingleOperationCompleted (line 59) | protected void assertSingleOperationCompleted(AsyncOperation operation) {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/async/BasicAsyncTest.java
class BasicAsyncTest (line 29) | public class BasicAsyncTest extends AbstractAsyncTest {
method testSequenceNumber (line 34) | public void testSequenceNumber() {
method testWaitForCompletionNoOps (line 41) | public void testWaitForCompletionNoOps() {
method testAsyncInsert (line 47) | public void testAsyncInsert() {
method testAsyncUpdate (line 59) | public void testAsyncUpdate() {
method testOperationGetResult (line 74) | public void testOperationGetResult() {
method testOperationGetResultException (line 90) | public void testOperationGetResultException() {
method testAsyncException (line 105) | public void testAsyncException() {
method testAsyncExceptionCreator (line 116) | public void testAsyncExceptionCreator() {
method testAsyncOperationWaitMillis (line 139) | public void testAsyncOperationWaitMillis() {
method testAsyncOperationWait (line 145) | public void testAsyncOperationWait() {
method testAsyncRunInTx (line 151) | public void testAsyncRunInTx() {
method testAsynCallInTx (line 165) | public void testAsynCallInTx() {
method testListenerMainThread (line 179) | public void testListenerMainThread() throws InterruptedException {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/async/MergeTxAsyncTest.java
class MergeTxAsyncTest (line 24) | public class MergeTxAsyncTest extends AbstractAsyncTest {
method testMergeInsertAndUpdate (line 26) | public void testMergeInsertAndUpdate() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/contentprovider/SimpleEntityContentProviderTest.java
class SimpleEntityContentProviderTest (line 31) | @Suppress
method SimpleEntityContentProviderTest (line 35) | public SimpleEntityContentProviderTest() {
method setUp (line 39) | @Override
method testQuery (line 45) | public void testQuery() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/encrypted/EncryptedDataFileTest.java
class EncryptedDataFileTest (line 28) | public class EncryptedDataFileTest extends EncryptionSimpleEntityTest {
method createDatabase (line 32) | @Override
method testFileisEncrypted (line 41) | public void testFileisEncrypted() throws IOException {
method testEncryptedDbUsed (line 60) | public void testEncryptedDbUsed() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/encrypted/EncryptedDatabaseOpenHelperTest.java
class EncryptedDatabaseOpenHelperTest (line 31) | public class EncryptedDatabaseOpenHelperTest extends ApplicationTestCase {
method EncryptedDatabaseOpenHelperTest (line 33) | public EncryptedDatabaseOpenHelperTest() {
method testEncryptedDevOpenHelper (line 37) | public void testEncryptedDevOpenHelper() {
method testEncryptedOpenHelper (line 43) | public void testEncryptedOpenHelper() {
method assertDbEncryptedAndFunctional (line 54) | private void assertDbEncryptedAndFunctional(Database db) {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/encrypted/EncryptedDbUtils.java
class EncryptedDbUtils (line 37) | public class EncryptedDbUtils {
method createDatabase (line 40) | public static Database createDatabase(Context context, String dbName, ...
method queryString (line 57) | public static String queryString(Database db, String sql) {
method assertEncryptedDbUsed (line 67) | public static void assertEncryptedDbUsed(Database db) {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/encrypted/EncryptionSimpleEntityTest.java
class EncryptionSimpleEntityTest (line 30) | public class EncryptionSimpleEntityTest extends SimpleEntityTest {
method createDatabase (line 31) | @Override
method testInsertTwice (line 36) | @Override
method testEncryptedDbUsed (line 46) | public void testEncryptedDbUsed() {
method testOrderAscString (line 50) | public void testOrderAscString() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/AbcdefEntityTest.java
class AbcdefEntityTest (line 25) | public class AbcdefEntityTest extends AbstractDaoTestLongPk<AbcdefEntity...
method AbcdefEntityTest (line 27) | public AbcdefEntityTest() {
method createEntity (line 31) | @Override
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/AnActiveEntityMultithreadingTest.java
class AnActiveEntityMultithreadingTest (line 32) | public class AnActiveEntityMultithreadingTest extends AbstractDaoSession...
method AnActiveEntityMultithreadingTest (line 42) | public AnActiveEntityMultithreadingTest() {
method setUp (line 46) | @Override
method testAlwaysAttachedWithInsertDelete (line 52) | public void testAlwaysAttachedWithInsertDelete() throws Exception {
method testAlwaysAttachedWithDetach (line 56) | public void testAlwaysAttachedWithDetach() throws Exception {
method doTestAlwaysAttached (line 60) | private void doTestAlwaysAttached(Thread thread) throws Exception {
method countDownAndAwaitLatch (line 93) | private void countDownAndAwaitLatch() {
class InsertDeleteThread (line 102) | class InsertDeleteThread extends Thread {
method run (line 103) | @Override
class DetachThread (line 116) | class DetachThread extends Thread {
method run (line 117) | @Override
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/AnActiveEntityTest.java
class AnActiveEntityTest (line 28) | public class AnActiveEntityTest extends AbstractDaoSessionTest<DaoMaster...
method AnActiveEntityTest (line 32) | public AnActiveEntityTest() {
method setUp (line 36) | @Override
method testThrowWhenDetached (line 42) | public void testThrowWhenDetached() {
method testActiveUpdate (line 64) | public void testActiveUpdate() {
method testActiveRefresh (line 77) | public void testActiveRefresh() {
method testActiveDelete (line 89) | public void testActiveDelete() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/AutoincrementEntityTest.java
class AutoincrementEntityTest (line 27) | public class AutoincrementEntityTest extends AbstractDaoSessionTest<DaoM...
method AutoincrementEntityTest (line 29) | public AutoincrementEntityTest() {
method testAutoincrement (line 33) | public void testAutoincrement() {
method testNoAutoincrement (line 45) | public void testNoAutoincrement() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/CustomTypeEntityTest.java
class CustomTypeEntityTest (line 28) | public class CustomTypeEntityTest extends AbstractDaoTestLongPk<CustomTy...
method CustomTypeEntityTest (line 30) | public CustomTypeEntityTest() {
method createEntity (line 34) | @Override
method testCustomTypeValue (line 44) | public void testCustomTypeValue() {
method testCustomTypeValueNull (line 54) | public void testCustomTypeValueNull() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/DateEntityTest.java
class DateEntityTest (line 27) | public class DateEntityTest extends AbstractDaoTestLongPk<DateEntityDao,...
method DateEntityTest (line 29) | public DateEntityTest() {
method createEntity (line 33) | @Override
method testValues (line 41) | public void testValues() {
method testValues2 (line 51) | public void testValues2() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/ExtendsImplementsEntityTest.java
class ExtendsImplementsEntityTest (line 29) | public class ExtendsImplementsEntityTest extends
method ExtendsImplementsEntityTest (line 32) | public ExtendsImplementsEntityTest() {
method createEntity (line 36) | @Override
method testInheritance (line 43) | public void testInheritance() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/IndexedStringEntityTest.java
class IndexedStringEntityTest (line 26) | public class IndexedStringEntityTest extends AbstractDaoTestLongPk<Index...
method IndexedStringEntityTest (line 28) | public IndexedStringEntityTest() {
method createEntity (line 32) | @Override
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/JoinManyToDateEntityTest.java
class JoinManyToDateEntityTest (line 26) | public class JoinManyToDateEntityTest extends AbstractDaoTestLongPk<Join...
method JoinManyToDateEntityTest (line 28) | public JoinManyToDateEntityTest() {
method createEntity (line 32) | @Override
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/RelationEntityTest.java
class RelationEntityTest (line 32) | public class RelationEntityTest extends AbstractDaoTestLongPk<RelationEn...
method RelationEntityTest (line 39) | public RelationEntityTest() {
method setUp (line 44) | @Override
method createEntity (line 53) | @Override
method testToOne (line 60) | public void testToOne() {
method testToOneSelf (line 66) | public void testToOneSelf() {
method testToOneClearKey (line 81) | public void testToOneClearKey() {
method testToOneClearEntity (line 88) | public void testToOneClearEntity() {
method testToOneUpdateKey (line 95) | public void testToOneUpdateKey() {
method testToOneUpdateEntity (line 111) | public void testToOneUpdateEntity() {
method testToOneLoadDeep (line 127) | public void testToOneLoadDeep() {
method testToOneNoMatch (line 133) | public void testToOneNoMatch() {
method testToOneNoMatchLoadDeep (line 142) | public void testToOneNoMatchLoadDeep() {
method testToOneLoadDeepNull (line 153) | public void testToOneLoadDeepNull() {
method testQueryDeep (line 163) | public void testQueryDeep() {
method insertEntityWithRelations (line 171) | protected RelationEntity insertEntityWithRelations(Long testEntityId) {
method assertTestEntity (line 194) | protected void assertTestEntity(RelationEntity entity) {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/RelationEntityTestIdentityScope.java
class RelationEntityTestIdentityScope (line 30) | public class RelationEntityTestIdentityScope extends RelationEntityTest {
method setUp (line 32) | @Override
method testToOneLoadDeepIdentityScope (line 38) | public void testToOneLoadDeepIdentityScope() {
method testToQueryDeepIdentityScope (line 49) | public void testToQueryDeepIdentityScope() {
method testLoadDeepIdentityScope (line 62) | public void testLoadDeepIdentityScope() {
method testQueryDeepIdentityScope (line 71) | public void testQueryDeepIdentityScope() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/SimpleEntityNotNullTest.java
class SimpleEntityNotNullTest (line 27) | public class SimpleEntityNotNullTest extends AbstractDaoTestLongPk<Simpl...
method SimpleEntityNotNullTest (line 29) | public SimpleEntityNotNullTest() {
method createEntity (line 33) | @Override
method testValues (line 38) | public void testValues() {
method assertEqualProperties (line 45) | protected static void assertEqualProperties(SimpleEntityNotNull entity...
method testUpdateValues (line 61) | public void testUpdateValues() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/SimpleEntityTest.java
class SimpleEntityTest (line 27) | public class SimpleEntityTest extends AbstractDaoTestLongPk<SimpleEntity...
method SimpleEntityTest (line 29) | public SimpleEntityTest() {
method createEntity (line 33) | @Override
method testValuesNull (line 40) | public void testValuesNull() {
method testValues (line 50) | public void testValues() {
method testUpdateValues (line 59) | public void testUpdateValues() {
method testUpdateValuesToNull (line 70) | public void testUpdateValuesToNull() {
method assertValues (line 83) | protected void assertValues(SimpleEntity reloaded) {
method setValues (line 97) | protected void setValues(SimpleEntity entity) {
method setValuesToNull (line 110) | protected void setValuesToNull(SimpleEntity entity) {
method assertValuesNull (line 122) | protected void assertValuesNull(SimpleEntity reloaded) {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/SpecialNamesEntityTest.java
class SpecialNamesEntityTest (line 25) | public class SpecialNamesEntityTest extends AbstractDaoTestLongPk<Specia...
method SpecialNamesEntityTest (line 27) | public SpecialNamesEntityTest() {
method createEntity (line 31) | @Override
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/SqliteMasterTest.java
class SqliteMasterTest (line 29) | public class SqliteMasterTest extends AbstractDaoTest<SqliteMasterDao, S...
method SqliteMasterTest (line 31) | public SqliteMasterTest() {
method testLoadAll (line 35) | public void testLoadAll() {
method testQueryRaw (line 42) | public void testQueryRaw() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/StringKeyValueEntityIdentityScopeTest.java
class StringKeyValueEntityIdentityScopeTest (line 24) | public class StringKeyValueEntityIdentityScopeTest extends StringKeyValu...
method setUp (line 25) | @Override
method testLoadIdScope (line 31) | public void testLoadIdScope() {
method testLoadIdScope_load (line 41) | public void testLoadIdScope_load() {
method testDetach (line 52) | public void testDetach() {
method testDetachOther (line 65) | public void testDetachOther() {
method testLoadAllScope (line 76) | public void testLoadAllScope() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/StringKeyValueEntityTest.java
class StringKeyValueEntityTest (line 26) | public class StringKeyValueEntityTest extends AbstractDaoTestStringPk<St...
method StringKeyValueEntityTest (line 28) | public StringKeyValueEntityTest() {
method createEntity (line 32) | @Override
method testInsertWithoutPK (line 42) | public void testInsertWithoutPK() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/TestEntityIdentityScopeTest.java
class TestEntityIdentityScopeTest (line 24) | public class TestEntityIdentityScopeTest extends TestEntityTest {
method setUp (line 25) | @Override
method testLoadIdScope (line 31) | public void testLoadIdScope() {
method testDetach (line 41) | public void testDetach() {
method testDetachAll (line 54) | public void testDetachAll() {
method testDetachOther (line 65) | public void testDetachOther() {
method testLoadAllScope (line 76) | public void testLoadAllScope() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/TestEntityTest.java
class TestEntityTest (line 26) | public class TestEntityTest extends AbstractDaoTestLongPk<TestEntityDao,...
method TestEntityTest (line 28) | public TestEntityTest() {
method createEntity (line 32) | @Override
method testRefresh (line 40) | public void testRefresh() {
method testRefreshIllegal (line 52) | public void testRefreshIllegal() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/TestEntityTestBase.java
class TestEntityTestBase (line 28) | public abstract class TestEntityTestBase extends AbstractDaoTest<TestEnt...
method TestEntityTestBase (line 30) | public TestEntityTestBase() {
method createEntity (line 34) | protected TestEntity createEntity(int simpleInteger, String simpleStri...
method insert (line 43) | protected ArrayList<TestEntity> insert(int count) {
method getSimpleString (line 53) | protected String getSimpleString(int i) {
method getSimpleInteger (line 57) | protected int getSimpleInteger(int i) {
method assertIds (line 61) | protected void assertIds(List<TestEntity> list, List<TestEntity> list2) {
method assertIds (line 69) | protected void assertIds(TestEntity entity, TestEntity entity2) {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/ToManyEntityTest.java
class ToManyEntityTest (line 37) | public class ToManyEntityTest extends AbstractDaoSessionTest<DaoMaster, ...
method ToManyEntityTest (line 42) | public ToManyEntityTest() {
method setUp (line 46) | @Override
method testToManyBasics (line 53) | public void testToManyBasics() {
method runTestToManyBasics (line 62) | public void runTestToManyBasics(long id, int count) {
method testGetToManyTwice (line 70) | public void testGetToManyTwice() {
method testResetToMany (line 79) | public void testResetToMany() {
method testChangeResetToMany (line 90) | public void testChangeResetToMany() {
method testToManyOrder (line 111) | public void testToManyOrder() {
method testJoinProperty (line 124) | public void testJoinProperty() {
method testTwoJoinProperty (line 146) | public void testTwoJoinProperty() {
method testToManyWithJoin (line 168) | public void testToManyWithJoin() {
method assertSameEntities (line 195) | private void assertSameEntities(ToManyTargetEntity[] targetEntities, L...
method prepareToMany (line 210) | private ToManyTargetEntity[] prepareToMany(long id, int count) {
method insertTargetEntities (line 216) | private ToManyTargetEntity[] insertTargetEntities(Long toManyId, int c...
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/ToManyTargetEntityTest.java
class ToManyTargetEntityTest (line 25) | public class ToManyTargetEntityTest extends AbstractDaoTestLongPk<ToMany...
method ToManyTargetEntityTest (line 27) | public ToManyTargetEntityTest() {
method createEntity (line 31) | @Override
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/TransactionTest.java
class TransactionTest (line 9) | public class TransactionTest extends TestEntityTestBase {
method testUpdateTxFailed (line 10) | public void testUpdateTxFailed() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/TreeEntityTest.java
class TreeEntityTest (line 27) | public class TreeEntityTest extends AbstractDaoSessionTest<DaoMaster, Da...
method TreeEntityTest (line 31) | public TreeEntityTest() {
method setUp (line 35) | @Override
method testNavigateTreeFromLeaf (line 41) | public void testNavigateTreeFromLeaf() {
method testNavigateTreeFromMiddle (line 59) | public void testNavigateTreeFromMiddle() {
method testNavigateTreeFromRoot (line 75) | public void testNavigateTreeFromRoot() {
method createTree (line 100) | private void createTree() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/CountQueryTest.java
class CountQueryTest (line 31) | public class CountQueryTest extends TestEntityTestBase {
method setUp (line 32) | @Override
method testCountQuerySimple (line 39) | public void testCountQuerySimple() {
method testCountQueryTwoParameters (line 55) | public void testCountQueryTwoParameters() {
method testCountQueryTwoParametersOr (line 79) | public void testCountQueryTwoParametersOr() {
method testCountQueryChangeParameter (line 100) | public void testCountQueryChangeParameter() {
method testBuildQueryAndCountQuery (line 114) | public void testBuildQueryAndCountQuery() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/CountQueryThreadLocalTest.java
class CountQueryThreadLocalTest (line 28) | public class CountQueryThreadLocalTest extends TestEntityTestBase {
method testGetForCurrentThread_SameInstance (line 31) | public void testGetForCurrentThread_SameInstance() {
method testGetForCurrentThread_ParametersAreReset (line 36) | public void testGetForCurrentThread_ParametersAreReset() {
method testGetForCurrentThread_TwoThreads (line 46) | public void testGetForCurrentThread_TwoThreads() throws InterruptedExc...
method testThrowOutsideOwnerThread (line 56) | public void testThrowOutsideOwnerThread() throws InterruptedException {
method createQueryFromOtherThread (line 70) | private void createQueryFromOtherThread() throws InterruptedException {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/CursorQueryTest.java
class CursorQueryTest (line 28) | public class CursorQueryTest extends TestEntityTestBase {
method setUp (line 29) | @Override
method testCursorQuerySimple (line 36) | public void testCursorQuerySimple() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/DeleteQueryTest.java
class DeleteQueryTest (line 32) | public class DeleteQueryTest extends TestEntityTestBase {
method setUp (line 33) | @Override
method testDeleteQuerySimple (line 40) | public void testDeleteQuerySimple() {
method testDeleteQueryOr (line 56) | public void testDeleteQueryOr() {
method testDeleteQueryExecutingMultipleTimes (line 72) | public void testDeleteQueryExecutingMultipleTimes() {
method testDeleteQueryChangeParameter (line 90) | public void testDeleteQueryChangeParameter() {
method testBuildQueryAndDeleteQuery (line 106) | public void testBuildQueryAndDeleteQuery() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/DeleteQueryThreadLocalTest.java
class DeleteQueryThreadLocalTest (line 28) | public class DeleteQueryThreadLocalTest extends TestEntityTestBase {
method testGetForCurrentThread_SameInstance (line 31) | public void testGetForCurrentThread_SameInstance() {
method testGetForCurrentThread_ParametersAreReset (line 36) | public void testGetForCurrentThread_ParametersAreReset() {
method testGetForCurrentThread_TwoThreads (line 48) | public void testGetForCurrentThread_TwoThreads() throws InterruptedExc...
method testThrowOutsideOwnerThread (line 58) | public void testThrowOutsideOwnerThread() throws InterruptedException {
method createQueryFromOtherThread (line 72) | private void createQueryFromOtherThread() throws InterruptedException {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/JoinTest.java
class JoinTest (line 37) | public class JoinTest extends AbstractDaoSessionTest<DaoMaster, DaoSessi...
method JoinTest (line 42) | public JoinTest() {
method setUp (line 46) | @Override
method testJoinSimple (line 55) | public void testJoinSimple() {
method testJoinSimpleParameterValue (line 62) | public void testJoinSimpleParameterValue() {
method testJoinMixedParameterValues (line 73) | public void testJoinMixedParameterValues() {
method testJoinOfJoin (line 93) | public void testJoinOfJoin() {
method testJoinDelete (line 115) | public void testJoinDelete() {
method testJoinCount (line 130) | public void testJoinCount() {
method prepareData (line 140) | private void prepareData() {
method createQueryBuilder (line 160) | private QueryBuilder<RelationEntity> createQueryBuilder(int simpleIntW...
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/LazyListTest.java
class LazyListTest (line 32) | public class LazyListTest extends TestEntityTestBase {
method testSizeAndGetAndPeak (line 34) | public void testSizeAndGetAndPeak() {
method testGetAll100 (line 51) | public void testGetAll100() {
method testGetAll100Uncached (line 58) | public void testGetAll100Uncached() {
method testSublist (line 67) | public void testSublist() {
method testSublistUncached (line 73) | public void testSublistUncached() {
method testIterator (line 84) | public void testIterator() {
method testIteratorUncached (line 91) | public void testIteratorUncached() {
method testIterator (line 100) | protected void testIterator(ArrayList<TestEntity> list, LazyList<TestE...
method testEmpty (line 140) | public void testEmpty() {
method testUncached (line 155) | public void testUncached() {
method testClose (line 180) | public void testClose() {
method testAutoClose (line 194) | public void testAutoClose() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/QueryBuilderAndOrTest.java
class QueryBuilderAndOrTest (line 30) | public class QueryBuilderAndOrTest extends AbstractDaoTest<AbcdefEntityD...
method QueryBuilderAndOrTest (line 32) | public QueryBuilderAndOrTest() {
method insert (line 38) | protected ArrayList<AbcdefEntity> insert(int count) {
method testSimpleQuery (line 50) | public void testSimpleQuery() {
method testOr (line 64) | public void testOr() {
method testOr3 (line 79) | public void testOr3() {
method testOrNested (line 95) | public void testOrNested() {
method testOrNestedNested (line 112) | public void testOrNestedNested() {
method testAnd (line 131) | public void testAnd() {
method testOrAnd (line 145) | public void testOrAnd() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/QueryBuilderOrderTest.java
class QueryBuilderOrderTest (line 30) | public class QueryBuilderOrderTest extends TestEntityTestBase {
method setUp (line 31) | @Override
method testOrderAsc (line 38) | public void testOrderAsc() {
method testOrderDesc (line 49) | public void testOrderDesc() {
method testOrderUpperLowercase (line 60) | public void testOrderUpperLowercase() {
method testOrderUmlauts (line 81) | public void testOrderUmlauts() {
method testOrderCustom (line 98) | public void testOrderCustom() {
method testOrderCustom_stringOrderCollation (line 112) | public void testOrderCustom_stringOrderCollation() {
method testOrderRaw (line 132) | public void testOrderRaw() {
method addEntity (line 143) | private TestEntity addEntity(List<TestEntity> list, String simpleStrin...
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/QueryBuilderSimpleTest.java
class QueryBuilderSimpleTest (line 33) | public class QueryBuilderSimpleTest extends TestEntityTestBase {
method setUp (line 34) | @Override
method testEqInteger (line 41) | public void testEqInteger() {
method testEqString (line 53) | public void testEqString() {
method testIn (line 65) | public void testIn() {
method testNotIn (line 88) | public void testNotIn() {
method testEqStringAndInteger (line 105) | public void testEqStringAndInteger() {
method testNotEqString (line 118) | public void testNotEqString() {
method testEqDate (line 133) | public void testEqDate() {
method testEqBoolean (line 152) | public void testEqBoolean() {
method testEqByteArray (line 177) | public void testEqByteArray() {
method testIsNullIsNotNull (line 201) | public void testIsNullIsNotNull() {
method testBuildTwice (line 218) | public void testBuildTwice() {
method testLike (line 232) | public void testLike() {
method testDistinct (line 254) | public void testDistinct() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/QueryForThreadTest.java
class QueryForThreadTest (line 37) | public class QueryForThreadTest extends TestEntityTestBase {
method testGetForCurrentThread_SameInstance (line 44) | public void testGetForCurrentThread_SameInstance() {
method testGetForCurrentThread_ParametersAreReset (line 49) | public void testGetForCurrentThread_ParametersAreReset() {
method testGetForCurrentThread_ManyThreadsDontLeak (line 60) | public void testGetForCurrentThread_ManyThreadsDontLeak() throws Excep...
method testBuildQueryDoesntLeak (line 96) | public void testBuildQueryDoesntLeak() {
method testGetForCurrentThread_TwoThreads (line 103) | public void testGetForCurrentThread_TwoThreads() throws InterruptedExc...
method testThrowOutsideOwnerThread (line 120) | public void testThrowOutsideOwnerThread() throws InterruptedException {
method createQueryFromOtherThread (line 172) | private void createQueryFromOtherThread() throws InterruptedException {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/QueryLimitOffsetTest.java
class QueryLimitOffsetTest (line 29) | public class QueryLimitOffsetTest extends TestEntityTestBase {
method setUp (line 31) | @Override
method testQueryBuilderLimit (line 38) | public void testQueryBuilderLimit() {
method testQueryBuilderOffsetAndLimit (line 48) | public void testQueryBuilderOffsetAndLimit() {
method testQueryBuilderOffsetAndLimitWithWhere (line 58) | public void testQueryBuilderOffsetAndLimitWithWhere() {
method testQueryOffsetAndLimit (line 69) | public void testQueryOffsetAndLimit() {
method testQueryBuilderOffsetWithoutLimit (line 84) | public void testQueryBuilderOffsetWithoutLimit() {
method testQueryLimitAndSetParameter (line 93) | public void testQueryLimitAndSetParameter() {
method testQueryUnsetLimit (line 103) | public void testQueryUnsetLimit() {
method testQueryUnsetOffset (line 113) | public void testQueryUnsetOffset() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/QuerySpecialNamesTest.java
class QuerySpecialNamesTest (line 27) | public class QuerySpecialNamesTest extends AbstractDaoTest<SpecialNamesE...
method QuerySpecialNamesTest (line 29) | public QuerySpecialNamesTest() {
method setUp (line 33) | @Override
method testWhereWithSpecialNames (line 40) | public void testWhereWithSpecialNames() {
method testWhereWithSpecialNamesWithValues (line 56) | public void testWhereWithSpecialNamesWithValues() {
method testOrderWithSpecialNames (line 72) | public void testOrderWithSpecialNames() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/RawQueryTest.java
class RawQueryTest (line 31) | public class RawQueryTest extends TestEntityTestBase {
method setUp (line 32) | @Override
method testRawQueryEmptySql (line 39) | public void testRawQueryEmptySql() {
method testRawQueryEqualsString (line 46) | public void testRawQueryEqualsString() {
method testRawQueryCreate_setParameterInQuery (line 59) | public void testRawQueryCreate_setParameterInQuery() {
method testRawQueryLazyList (line 74) | public void testRawQueryLazyList() {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/rx/RxDaoTest.java
class RxDaoTest (line 32) | @SuppressWarnings("unchecked")
method RxDaoTest (line 37) | public RxDaoTest() {
method setUp (line 41) | @Override
method testScheduler (line 47) | public void testScheduler() {
method testNoScheduler (line 53) | public void testNoScheduler() {
method testLoadAll (line 60) | public void testLoadAll() {
method testLoad (line 84) | public void testLoad() {
method testLoad_noResult (line 92) | public void testLoad_noResult() {
method testRefresh (line 99) | public void testRefresh() {
method testInsert (line 106) | public void testInsert() {
method testInsertInTx (line 118) | public void testInsertInTx() {
method testInsertInTxList (line 133) | public void testInsertInTxList() {
method testInsertOrReplace (line 151) | public void testInsertOrReplace() {
method testInsertOrReplaceInTx (line 159) | public void testInsertOrReplaceInTx() {
method testInsertOrReplaceInTxList (line 168) | public void testInsertOrReplaceInTxList() {
method testSave (line 181) | public void testSave() {
method testSaveInTx (line 189) | public void testSaveInTx() {
method testSaveInTxList (line 198) | public void testSaveInTxList() {
method testUpdate (line 211) | public void testUpdate() {
method testUpdateInTx (line 223) | public void testUpdateInTx() {
method testUpdateInTxList (line 233) | public void testUpdateInTxList() {
method assertUpdatedEntity (line 247) | private void assertUpdatedEntity(TestEntity foo, Observable<TestEntity...
method assertUpdatedEntities (line 258) | private void assertUpdatedEntities(TestEntity foo, TestEntity bar, Obs...
method assertUpdatedEntities (line 271) | private void assertUpdatedEntities(List<TestEntity> entities, Observab...
method testDelete (line 287) | public void testDelete() {
method testDeleteByKey (line 292) | public void testDeleteByKey() {
method testDeleteAll (line 297) | public void testDeleteAll() {
method testDeleteInTx (line 303) | public void testDeleteInTx() {
method testDeleteInTxList (line 309) | public void testDeleteInTxList() {
method testDeleteByKeyInTx (line 320) | public void testDeleteByKeyInTx() {
method testDeleteByKeyInTxList (line 326) | public void testDeleteByKeyInTxList() {
method assertDeleted (line 337) | private void assertDeleted(Observable<Void> observable) {
method testCount (line 344) | public void testCount() {
method insertEntity (line 352) | protected TestEntity insertEntity(String simpleStringNotNull) {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/rx/RxQueryTest.java
class RxQueryTest (line 38) | public class RxQueryTest extends AbstractDaoSessionTest<DaoMaster, DaoSe...
method RxQueryTest (line 43) | public RxQueryTest() {
method setUp (line 47) | @Override
method testList (line 54) | public void testList() {
method _testListSetParameters (line 63) | public void _testListSetParameters() {
method testUnique (line 75) | public void testUnique() {
method testOneByOne (line 83) | public void testOneByOne() {
method testOneByOneUnsubscribe (line 93) | public void testOneByOneUnsubscribe() {
method insertEntities (line 109) | protected List<TestEntity> insertEntities(int count) {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/rx/RxTestHelper.java
class RxTestHelper (line 30) | public class RxTestHelper {
method awaitTestSubscriber (line 31) | static <T> TestSubscriber<T> awaitTestSubscriber(Observable<T> observa...
method insertEntity (line 40) | static TestEntity insertEntity(TestEntityDao dao, String simpleStringN...
method createEntity (line 46) | static TestEntity createEntity(String simpleStringNotNull) {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/rx/RxTransactionTest.java
class RxTransactionTest (line 33) | public class RxTransactionTest extends AbstractDaoSessionTest<DaoMaster,...
method RxTransactionTest (line 37) | public RxTransactionTest() {
method setUp (line 41) | @Override
method testRun (line 47) | public void testRun() {
method testCall (line 60) | public void testCall() {
method testCallPlain (line 64) | public void testCallPlain() {
method testCall (line 70) | public void testCall(RxTransaction rxTx) {
method assertTxExecuted (line 84) | private <T> TestSubscriber<T> assertTxExecuted(Observable<T> observabl...
method insertEntity (line 96) | protected TestEntity insertEntity(String simpleStringNotNull) {
FILE: tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest2/entity/KeepEntityTest.java
class KeepEntityTest (line 26) | public class KeepEntityTest extends AbstractDaoTestLongPk<KeepEntityDao,...
method KeepEntityTest (line 28) | public KeepEntityTest() {
method createEntity (line 32) | @Override
method testKeepSectionAvailable (line 39) | public void testKeepSectionAvailable() {
FILE: tests/DaoTest/src/main/assets/minimal-entity.sql
type MINIMAL_ENTITY (line 1) | CREATE TABLE MINIMAL_ENTITY (_id INTEGER PRIMARY KEY)
FILE: tests/DaoTest/src/test/java/org/greenrobot/greendao/unittest/DaoMaster.java
class DaoMaster (line 19) | public class DaoMaster extends AbstractDaoMaster {
method createAllTables (line 23) | public static void createAllTables(Database db, boolean ifNotExists) {
method dropAllTables (line 28) | public static void dropAllTables(Database db, boolean ifExists) {
method newDevSession (line 36) | public static DaoSession newDevSession(Context context, String name) {
method DaoMaster (line 42) | public DaoMaster(SQLiteDatabase db) {
method DaoMaster (line 46) | public DaoMaster(Database db) {
method newSession (line 51) | public DaoSession newSession() {
method newSession (line 55) | public DaoSession newSession(IdentityScopeType type) {
class OpenHelper (line 62) | public static abstract class OpenHelper extends DatabaseOpenHelper {
method OpenHelper (line 63) | public OpenHelper(Context context, String name) {
method OpenHelper (line 67) | public OpenHelper(Context context, String name, CursorFactory factor...
method onCreate (line 71) | @Override
class DevOpenHelper (line 79) | public static class DevOpenHelper extends OpenHelper {
method DevOpenHelper (line 80) | public DevOpenHelper(Context context, String name) {
method DevOpenHelper (line 84) | public DevOpenHelper(Context context, String name, CursorFactory fac...
method onUpgrade (line 88) | @Override
FILE: tests/DaoTest/src/test/java/org/greenrobot/greendao/unittest/DaoSession.java
class DaoSession (line 22) | public class DaoSession extends AbstractDaoSession {
method DaoSession (line 28) | public DaoSession(Database db, IdentityScopeType type, Map<Class<? ext...
method clear (line 40) | public void clear() {
method getMinimalEntityDao (line 44) | public MinimalEntityDao getMinimalEntityDao() {
FILE: tests/DaoTest/src/test/java/org/greenrobot/greendao/unittest/MinimalEntity.java
class MinimalEntity (line 10) | @Entity
method MinimalEntity (line 16) | @Generated
method MinimalEntity (line 20) | @Generated
method getId (line 25) | public Long getId() {
method setId (line 29) | public void setId(Long id) {
FILE: tests/DaoTest/src/test/java/org/greenrobot/greendao/unittest/MinimalEntityDao.java
class MinimalEntityDao (line 16) | public class MinimalEntityDao extends AbstractDao<MinimalEntity, Long> {
class Properties (line 24) | public static class Properties {
method MinimalEntityDao (line 29) | public MinimalEntityDao(DaoConfig config) {
method MinimalEntityDao (line 33) | public MinimalEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 38) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 45) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 50) | @Override
method bindValues (line 60) | @Override
method readKey (line 70) | @Override
method readEntity (line 75) | @Override
method readEntity (line 83) | @Override
method updateKeyAfterInsert (line 88) | @Override
method getKey (line 94) | @Override
method hasKey (line 103) | @Override
method isEntityUpdateable (line 108) | @Override
FILE: tests/DaoTest/src/test/java/org/greenrobot/greendao/unittest/MinimalEntityTest.java
class MinimalEntityTest (line 19) | @RunWith(RobolectricTestRunner.class)
method setUp (line 26) | @Before
method testBasics (line 34) | @Test
method testQueryForCurrentThread (line 48) | @Test
FILE: tests/DaoTest/src/test/java/org/greenrobot/greendao/unittest/OptionalDepedenciesTest.java
class OptionalDepedenciesTest (line 28) | public class OptionalDepedenciesTest {
method testOptionalDependenciesAbsentRx (line 29) | @Test(expected = ClassNotFoundException.class)
method testOptionalDependenciesAbsentSQLCipher (line 34) | @Test(expected = ClassNotFoundException.class)
method testMockitoMocks (line 40) | @Test
method testMockitoMocksFailForRx (line 61) | @Test(expected = NoClassDefFoundError.class)
method testMockitoMocksFailForSQLCipher (line 66) | @Test(expected = NoClassDefFoundError.class)
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/AbcdefEntity.java
class AbcdefEntity (line 10) | @Entity
method AbcdefEntity (line 27) | @Generated
method AbcdefEntity (line 31) | public AbcdefEntity(Long id) {
method AbcdefEntity (line 35) | @Generated
method getId (line 51) | public Long getId() {
method setId (line 55) | public void setId(Long id) {
method getA (line 59) | public Integer getA() {
method setA (line 63) | public void setA(Integer a) {
method getB (line 67) | public Integer getB() {
method setB (line 71) | public void setB(Integer b) {
method getC (line 75) | public Integer getC() {
method setC (line 79) | public void setC(Integer c) {
method getD (line 83) | public Integer getD() {
method setD (line 87) | public void setD(Integer d) {
method getE (line 91) | public Integer getE() {
method setE (line 95) | public void setE(Integer e) {
method getF (line 99) | public Integer getF() {
method setF (line 103) | public void setF(Integer f) {
method getG (line 107) | public Integer getG() {
method setG (line 111) | public void setG(Integer g) {
method getH (line 115) | public Integer getH() {
method setH (line 119) | public void setH(Integer h) {
method getJ (line 123) | public Integer getJ() {
method setJ (line 127) | public void setJ(Integer j) {
method getI (line 131) | public Integer getI() {
method setI (line 135) | public void setI(Integer i) {
method getK (line 139) | public Integer getK() {
method setK (line 143) | public void setK(Integer k) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/AbcdefEntityDao.java
class AbcdefEntityDao (line 16) | public class AbcdefEntityDao extends AbstractDao<AbcdefEntity, Long> {
class Properties (line 24) | public static class Properties {
method AbcdefEntityDao (line 40) | public AbcdefEntityDao(DaoConfig config) {
method AbcdefEntityDao (line 44) | public AbcdefEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 49) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 67) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 72) | @Override
method bindValues (line 137) | @Override
method readKey (line 202) | @Override
method readEntity (line 207) | @Override
method readEntity (line 226) | @Override
method updateKeyAfterInsert (line 242) | @Override
method getKey (line 248) | @Override
method hasKey (line 257) | @Override
method isEntityUpdateable (line 262) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/AnActiveEntity.java
class AnActiveEntity (line 13) | @Entity(active = true)
method AnActiveEntity (line 28) | @Generated
method AnActiveEntity (line 32) | public AnActiveEntity(Long id) {
method AnActiveEntity (line 36) | @Generated
method __setDaoSession (line 43) | @Generated
method getId (line 49) | public Long getId() {
method setId (line 53) | public void setId(Long id) {
method getText (line 57) | public String getText() {
method setText (line 61) | public void setText(String text) {
method delete (line 69) | @Generated
method update (line 79) | @Generated
method refresh (line 89) | @Generated
method __throwIfDetached (line 95) | @Generated
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/AnActiveEntityDao.java
class AnActiveEntityDao (line 16) | public class AnActiveEntityDao extends AbstractDao<AnActiveEntity, Long> {
class Properties (line 24) | public static class Properties {
method AnActiveEntityDao (line 32) | public AnActiveEntityDao(DaoConfig config) {
method AnActiveEntityDao (line 36) | public AnActiveEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 42) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 50) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 55) | @Override
method bindValues (line 70) | @Override
method attachEntity (line 85) | @Override
method readKey (line 91) | @Override
method readEntity (line 96) | @Override
method readEntity (line 105) | @Override
method updateKeyAfterInsert (line 111) | @Override
method getKey (line 117) | @Override
method hasKey (line 126) | @Override
method isEntityUpdateable (line 131) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/AutoincrementEntity.java
class AutoincrementEntity (line 10) | @Entity
method AutoincrementEntity (line 16) | @Generated
method AutoincrementEntity (line 20) | @Generated
method getId (line 25) | public Long getId() {
method setId (line 29) | public void setId(Long id) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/AutoincrementEntityDao.java
class AutoincrementEntityDao (line 16) | public class AutoincrementEntityDao extends AbstractDao<AutoincrementEnt...
class Properties (line 24) | public static class Properties {
method AutoincrementEntityDao (line 29) | public AutoincrementEntityDao(DaoConfig config) {
method AutoincrementEntityDao (line 33) | public AutoincrementEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 38) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 45) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 50) | @Override
method bindValues (line 60) | @Override
method readKey (line 70) | @Override
method readEntity (line 75) | @Override
method readEntity (line 83) | @Override
method updateKeyAfterInsert (line 88) | @Override
method getKey (line 94) | @Override
method hasKey (line 103) | @Override
method isEntityUpdateable (line 108) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/CustomTypeEntity.java
class CustomTypeEntity (line 12) | @Entity
method CustomTypeEntity (line 21) | @Generated
method CustomTypeEntity (line 25) | public CustomTypeEntity(Long id) {
method CustomTypeEntity (line 29) | @Generated
method getId (line 35) | public Long getId() {
method setId (line 39) | public void setId(Long id) {
method getMyCustomTimestamp (line 43) | public MyTimestamp getMyCustomTimestamp() {
method setMyCustomTimestamp (line 47) | public void setMyCustomTimestamp(MyTimestamp myCustomTimestamp) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/CustomTypeEntityDao.java
class CustomTypeEntityDao (line 19) | public class CustomTypeEntityDao extends AbstractDao<CustomTypeEntity, L...
class Properties (line 27) | public static class Properties {
method CustomTypeEntityDao (line 34) | public CustomTypeEntityDao(DaoConfig config) {
method CustomTypeEntityDao (line 38) | public CustomTypeEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 43) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 51) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 56) | @Override
method bindValues (line 71) | @Override
method readKey (line 86) | @Override
method readEntity (line 91) | @Override
method readEntity (line 100) | @Override
method updateKeyAfterInsert (line 106) | @Override
method getKey (line 112) | @Override
method hasKey (line 121) | @Override
method isEntityUpdateable (line 126) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/DaoMaster.java
class DaoMaster (line 19) | public class DaoMaster extends AbstractDaoMaster {
method createAllTables (line 23) | public static void createAllTables(Database db, boolean ifNotExists) {
method dropAllTables (line 44) | public static void dropAllTables(Database db, boolean ifExists) {
method newDevSession (line 68) | public static DaoSession newDevSession(Context context, String name) {
method DaoMaster (line 74) | public DaoMaster(SQLiteDatabase db) {
method DaoMaster (line 78) | public DaoMaster(Database db) {
method newSession (line 100) | public DaoSession newSession() {
method newSession (line 104) | public DaoSession newSession(IdentityScopeType type) {
class OpenHelper (line 111) | public static abstract class OpenHelper extends DatabaseOpenHelper {
method OpenHelper (line 112) | public OpenHelper(Context context, String name) {
method OpenHelper (line 116) | public OpenHelper(Context context, String name, CursorFactory factor...
method onCreate (line 120) | @Override
class DevOpenHelper (line 128) | public static class DevOpenHelper extends OpenHelper {
method DevOpenHelper (line 129) | public DevOpenHelper(Context context, String name) {
method DevOpenHelper (line 133) | public DevOpenHelper(Context context, String name, CursorFactory fac...
method onUpgrade (line 137) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/DaoSession.java
class DaoSession (line 56) | public class DaoSession extends AbstractDaoSession {
method DaoSession (line 96) | public DaoSession(Database db, IdentityScopeType type, Map<Class<? ext...
method clear (line 193) | public void clear() {
method getSimpleEntityDao (line 214) | public SimpleEntityDao getSimpleEntityDao() {
method getSimpleEntityNotNullDao (line 218) | public SimpleEntityNotNullDao getSimpleEntityNotNullDao() {
method getTestEntityDao (line 222) | public TestEntityDao getTestEntityDao() {
method getRelationEntityDao (line 226) | public RelationEntityDao getRelationEntityDao() {
method getDateEntityDao (line 230) | public DateEntityDao getDateEntityDao() {
method getSpecialNamesEntityDao (line 234) | public SpecialNamesEntityDao getSpecialNamesEntityDao() {
method getAbcdefEntityDao (line 238) | public AbcdefEntityDao getAbcdefEntityDao() {
method getToManyTargetEntityDao (line 242) | public ToManyTargetEntityDao getToManyTargetEntityDao() {
method getToManyEntityDao (line 246) | public ToManyEntityDao getToManyEntityDao() {
method getJoinManyToDateEntityDao (line 250) | public JoinManyToDateEntityDao getJoinManyToDateEntityDao() {
method getTreeEntityDao (line 254) | public TreeEntityDao getTreeEntityDao() {
method getAnActiveEntityDao (line 258) | public AnActiveEntityDao getAnActiveEntityDao() {
method getExtendsImplementsEntityDao (line 262) | public ExtendsImplementsEntityDao getExtendsImplementsEntityDao() {
method getStringKeyValueEntityDao (line 266) | public StringKeyValueEntityDao getStringKeyValueEntityDao() {
method getAutoincrementEntityDao (line 270) | public AutoincrementEntityDao getAutoincrementEntityDao() {
method getSqliteMasterDao (line 274) | public SqliteMasterDao getSqliteMasterDao() {
method getCustomTypeEntityDao (line 278) | public CustomTypeEntityDao getCustomTypeEntityDao() {
method getIndexedStringEntityDao (line 282) | public IndexedStringEntityDao getIndexedStringEntityDao() {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/DateEntity.java
class DateEntity (line 12) | @Entity
method DateEntity (line 24) | @Generated
method DateEntity (line 28) | public DateEntity(Long id) {
method DateEntity (line 32) | @Generated
method getId (line 39) | public Long getId() {
method setId (line 43) | public void setId(Long id) {
method getDate (line 49) | public java.util.Date getDate() {
method setDate (line 55) | public void setDate(java.util.Date date) {
method getDateNotNull (line 59) | @NotNull
method setDateNotNull (line 65) | public void setDateNotNull(@NotNull java.util.Date dateNotNull) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/DateEntityDao.java
class DateEntityDao (line 19) | public class DateEntityDao extends AbstractDao<DateEntity, Long> {
class Properties (line 27) | public static class Properties {
method DateEntityDao (line 35) | public DateEntityDao(DaoConfig config) {
method DateEntityDao (line 39) | public DateEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 44) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 53) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 58) | @Override
method bindValues (line 74) | @Override
method readKey (line 90) | @Override
method readEntity (line 95) | @Override
method readEntity (line 105) | @Override
method updateKeyAfterInsert (line 112) | @Override
method getKey (line 118) | @Override
method hasKey (line 127) | @Override
method isEntityUpdateable (line 132) | @Override
method _queryToManyEntity_DateEntityList (line 138) | public List<DateEntity> _queryToManyEntity_DateEntityList(Long idToMan...
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/ExtendsImplementsEntity.java
class ExtendsImplementsEntity (line 10) | @Entity
method ExtendsImplementsEntity (line 17) | @Generated
method ExtendsImplementsEntity (line 21) | public ExtendsImplementsEntity(Long id) {
method ExtendsImplementsEntity (line 25) | @Generated
method getId (line 31) | public Long getId() {
method setId (line 35) | public void setId(Long id) {
method getText (line 39) | public String getText() {
method setText (line 43) | public void setText(String text) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/ExtendsImplementsEntityDao.java
class ExtendsImplementsEntityDao (line 16) | public class ExtendsImplementsEntityDao extends AbstractDao<ExtendsImple...
class Properties (line 24) | public static class Properties {
method ExtendsImplementsEntityDao (line 30) | public ExtendsImplementsEntityDao(DaoConfig config) {
method ExtendsImplementsEntityDao (line 34) | public ExtendsImplementsEntityDao(DaoConfig config, DaoSession daoSess...
method createTable (line 39) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 47) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 52) | @Override
method bindValues (line 67) | @Override
method readKey (line 82) | @Override
method readEntity (line 87) | @Override
method readEntity (line 96) | @Override
method updateKeyAfterInsert (line 102) | @Override
method getKey (line 108) | @Override
method hasKey (line 117) | @Override
method isEntityUpdateable (line 122) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/IndexedStringEntity.java
class IndexedStringEntity (line 10) | @Entity
method IndexedStringEntity (line 19) | @Generated
method IndexedStringEntity (line 23) | public IndexedStringEntity(Long id) {
method IndexedStringEntity (line 27) | @Generated
method getId (line 33) | public Long getId() {
method setId (line 37) | public void setId(Long id) {
method getIndexedString (line 41) | public String getIndexedString() {
method setIndexedString (line 45) | public void setIndexedString(String indexedString) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/IndexedStringEntityDao.java
class IndexedStringEntityDao (line 16) | public class IndexedStringEntityDao extends AbstractDao<IndexedStringEnt...
class Properties (line 24) | public static class Properties {
method IndexedStringEntityDao (line 30) | public IndexedStringEntityDao(DaoConfig config) {
method IndexedStringEntityDao (line 34) | public IndexedStringEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 39) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 50) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 55) | @Override
method bindValues (line 70) | @Override
method readKey (line 85) | @Override
method readEntity (line 90) | @Override
method readEntity (line 99) | @Override
method updateKeyAfterInsert (line 105) | @Override
method getKey (line 111) | @Override
method hasKey (line 120) | @Override
method isEntityUpdateable (line 125) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/JoinManyToDateEntity.java
class JoinManyToDateEntity (line 10) | @Entity
method JoinManyToDateEntity (line 18) | @Generated
method JoinManyToDateEntity (line 22) | public JoinManyToDateEntity(Long id) {
method JoinManyToDateEntity (line 26) | @Generated
method getId (line 33) | public Long getId() {
method setId (line 37) | public void setId(Long id) {
method getIdToMany (line 41) | public Long getIdToMany() {
method setIdToMany (line 45) | public void setIdToMany(Long idToMany) {
method getIdDate (line 49) | public Long getIdDate() {
method setIdDate (line 53) | public void setIdDate(Long idDate) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/JoinManyToDateEntityDao.java
class JoinManyToDateEntityDao (line 16) | public class JoinManyToDateEntityDao extends AbstractDao<JoinManyToDateE...
class Properties (line 24) | public static class Properties {
method JoinManyToDateEntityDao (line 31) | public JoinManyToDateEntityDao(DaoConfig config) {
method JoinManyToDateEntityDao (line 35) | public JoinManyToDateEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 40) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 49) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 54) | @Override
method bindValues (line 74) | @Override
method readKey (line 94) | @Override
method readEntity (line 99) | @Override
method readEntity (line 109) | @Override
method updateKeyAfterInsert (line 116) | @Override
method getKey (line 122) | @Override
method hasKey (line 131) | @Override
method isEntityUpdateable (line 136) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/RelationEntity.java
class RelationEntity (line 13) | @Entity(active = true)
method RelationEntity (line 56) | @Generated
method RelationEntity (line 60) | public RelationEntity(Long id) {
method RelationEntity (line 64) | @Generated
method __setDaoSession (line 74) | @Generated
method getId (line 80) | public Long getId() {
method setId (line 84) | public void setId(Long id) {
method getParentId (line 88) | public Long getParentId() {
method setParentId (line 92) | public void setParentId(Long parentId) {
method getTestId (line 96) | public Long getTestId() {
method setTestId (line 100) | public void setTestId(Long testId) {
method getTestIdNotNull (line 104) | public long getTestIdNotNull() {
method setTestIdNotNull (line 108) | public void setTestIdNotNull(long testIdNotNull) {
method getSimpleString (line 112) | public String getSimpleString() {
method setSimpleString (line 116) | public void setSimpleString(String simpleString) {
method getParent (line 121) | @Generated
method setParent (line 136) | @Generated
method getTestEntity (line 146) | @Generated
method setTestEntity (line 161) | @Generated
method getTestNotNull (line 171) | @Generated
method setTestNotNull (line 186) | @Generated
method getTestWithoutProperty (line 199) | @Generated
method peakTestWithoutProperty (line 211) | @Generated
method setTestWithoutProperty (line 216) | @Generated
method delete (line 228) | @Generated
method update (line 238) | @Generated
method refresh (line 248) | @Generated
method __throwIfDetached (line 254) | @Generated
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/RelationEntityDao.java
class RelationEntityDao (line 19) | public class RelationEntityDao extends AbstractDao<RelationEntity, Long> {
class Properties (line 27) | public static class Properties {
method RelationEntityDao (line 39) | public RelationEntityDao(DaoConfig config) {
method RelationEntityDao (line 43) | public RelationEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 49) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 61) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 66) | @Override
method bindValues (line 92) | @Override
method attachEntity (line 118) | @Override
method readKey (line 124) | @Override
method readEntity (line 129) | @Override
method readEntity (line 141) | @Override
method updateKeyAfterInsert (line 150) | @Override
method getKey (line 156) | @Override
method hasKey (line 165) | @Override
method isEntityUpdateable (line 170) | @Override
method getSelectDeep (line 177) | protected String getSelectDeep() {
method loadCurrentDeep (line 200) | protected RelationEntity loadCurrentDeep(Cursor cursor, boolean lock) {
method loadDeep (line 224) | public RelationEntity loadDeep(Long key) {
method loadAllDeepFromCursor (line 252) | public List<RelationEntity> loadAllDeepFromCursor(Cursor cursor) {
method loadDeepAllAndCloseCursor (line 274) | protected List<RelationEntity> loadDeepAllAndCloseCursor(Cursor cursor) {
method queryDeep (line 284) | public List<RelationEntity> queryDeep(String where, String... selectio...
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/SimpleEntity.java
class SimpleEntity (line 10) | @Entity
method SimpleEntity (line 25) | @Generated
method SimpleEntity (line 29) | public SimpleEntity(Long id) {
method SimpleEntity (line 33) | @Generated
method getId (line 47) | public Long getId() {
method setId (line 51) | public void setId(Long id) {
method getSimpleBoolean (line 55) | public Boolean getSimpleBoolean() {
method setSimpleBoolean (line 59) | public void setSimpleBoolean(Boolean simpleBoolean) {
method getSimpleByte (line 63) | public Byte getSimpleByte() {
method setSimpleByte (line 67) | public void setSimpleByte(Byte simpleByte) {
method getSimpleShort (line 71) | public Short getSimpleShort() {
method setSimpleShort (line 75) | public void setSimpleShort(Short simpleShort) {
method getSimpleInt (line 79) | public Integer getSimpleInt() {
method setSimpleInt (line 83) | public void setSimpleInt(Integer simpleInt) {
method getSimpleLong (line 87) | public Long getSimpleLong() {
method setSimpleLong (line 91) | public void setSimpleLong(Long simpleLong) {
method getSimpleFloat (line 95) | public Float getSimpleFloat() {
method setSimpleFloat (line 99) | public void setSimpleFloat(Float simpleFloat) {
method getSimpleDouble (line 103) | public Double getSimpleDouble() {
method setSimpleDouble (line 107) | public void setSimpleDouble(Double simpleDouble) {
method getSimpleString (line 111) | public String getSimpleString() {
method setSimpleString (line 115) | public void setSimpleString(String simpleString) {
method getSimpleByteArray (line 119) | public byte[] getSimpleByteArray() {
method setSimpleByteArray (line 123) | public void setSimpleByteArray(byte[] simpleByteArray) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/SimpleEntityContentProvider.java
class SimpleEntityContentProvider (line 25) | public class SimpleEntityContentProvider extends ContentProvider {
method onCreate (line 55) | @Override
method getDatabase (line 64) | protected Database getDatabase() {
method insert (line 71) | @Override
method delete (line 76) | @Override
method update (line 81) | @Override
method query (line 87) | @Override
method getType (line 114) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/SimpleEntityDao.java
class SimpleEntityDao (line 16) | public class SimpleEntityDao extends AbstractDao<SimpleEntity, Long> {
class Properties (line 24) | public static class Properties {
method SimpleEntityDao (line 38) | public SimpleEntityDao(DaoConfig config) {
method SimpleEntityDao (line 42) | public SimpleEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 47) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 63) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 68) | @Override
method bindValues (line 123) | @Override
method readKey (line 178) | @Override
method readEntity (line 183) | @Override
method readEntity (line 200) | @Override
method updateKeyAfterInsert (line 214) | @Override
method getKey (line 220) | @Override
method hasKey (line 229) | @Override
method isEntityUpdateable (line 234) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/SimpleEntityNotNull.java
class SimpleEntityNotNull (line 10) | @Entity
method SimpleEntityNotNull (line 29) | @Generated
method SimpleEntityNotNull (line 33) | public SimpleEntityNotNull(long id) {
method SimpleEntityNotNull (line 37) | @Generated
method getId (line 51) | public long getId() {
method setId (line 55) | public void setId(long id) {
method getSimpleBoolean (line 59) | public boolean getSimpleBoolean() {
method setSimpleBoolean (line 63) | public void setSimpleBoolean(boolean simpleBoolean) {
method getSimpleByte (line 67) | public byte getSimpleByte() {
method setSimpleByte (line 71) | public void setSimpleByte(byte simpleByte) {
method getSimpleShort (line 75) | public short getSimpleShort() {
method setSimpleShort (line 79) | public void setSimpleShort(short simpleShort) {
method getSimpleInt (line 83) | public int getSimpleInt() {
method setSimpleInt (line 87) | public void setSimpleInt(int simpleInt) {
method getSimpleLong (line 91) | public long getSimpleLong() {
method setSimpleLong (line 95) | public void setSimpleLong(long simpleLong) {
method getSimpleFloat (line 99) | public float getSimpleFloat() {
method setSimpleFloat (line 103) | public void setSimpleFloat(float simpleFloat) {
method getSimpleDouble (line 107) | public double getSimpleDouble() {
method setSimpleDouble (line 111) | public void setSimpleDouble(double simpleDouble) {
method getSimpleString (line 115) | @NotNull
method setSimpleString (line 121) | public void setSimpleString(@NotNull String simpleString) {
method getSimpleByteArray (line 125) | @NotNull
method setSimpleByteArray (line 131) | public void setSimpleByteArray(@NotNull byte[] simpleByteArray) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/SimpleEntityNotNullDao.java
class SimpleEntityNotNullDao (line 16) | public class SimpleEntityNotNullDao extends AbstractDao<SimpleEntityNotN...
class Properties (line 24) | public static class Properties {
method SimpleEntityNotNullDao (line 38) | public SimpleEntityNotNullDao(DaoConfig config) {
method SimpleEntityNotNullDao (line 42) | public SimpleEntityNotNullDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 47) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 63) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 68) | @Override
method bindValues (line 83) | @Override
method readKey (line 98) | @Override
method readEntity (line 103) | @Override
method readEntity (line 120) | @Override
method updateKeyAfterInsert (line 134) | @Override
method getKey (line 140) | @Override
method hasKey (line 149) | @Override
method isEntityUpdateable (line 154) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/SpecialNamesEntity.java
class SpecialNamesEntity (line 10) | @Entity(nameInDb = "ORDER TRANSACTION GROUP BY")
method SpecialNamesEntity (line 25) | @Generated
method SpecialNamesEntity (line 29) | public SpecialNamesEntity(Long id) {
method SpecialNamesEntity (line 33) | @Generated
method getId (line 47) | public Long getId() {
method setId (line 51) | public void setId(Long id) {
method getCount (line 55) | public String getCount() {
method setCount (line 59) | public void setCount(String count) {
method getSelect (line 63) | public String getSelect() {
method setSelect (line 67) | public void setSelect(String select) {
method getSum (line 71) | public String getSum() {
method setSum (line 75) | public void setSum(String sum) {
method getAvg (line 79) | public String getAvg() {
method setAvg (line 83) | public void setAvg(String avg) {
method getJoin (line 87) | public String getJoin() {
method setJoin (line 91) | public void setJoin(String join) {
method getDistinct (line 95) | public String getDistinct() {
method setDistinct (line 99) | public void setDistinct(String distinct) {
method getOn (line 103) | public String getOn() {
method setOn (line 107) | public void setOn(String on) {
method getIndex (line 111) | public String getIndex() {
method setIndex (line 115) | public void setIndex(String index) {
method getOrder (line 119) | public Integer getOrder() {
method setOrder (line 123) | public void setOrder(Integer order) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/SpecialNamesEntityDao.java
class SpecialNamesEntityDao (line 16) | public class SpecialNamesEntityDao extends AbstractDao<SpecialNamesEntit...
class Properties (line 24) | public static class Properties {
method SpecialNamesEntityDao (line 38) | public SpecialNamesEntityDao(DaoConfig config) {
method SpecialNamesEntityDao (line 42) | public SpecialNamesEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 47) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 63) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 68) | @Override
method bindValues (line 123) | @Override
method readKey (line 178) | @Override
method readEntity (line 183) | @Override
method readEntity (line 200) | @Override
method updateKeyAfterInsert (line 214) | @Override
method getKey (line 220) | @Override
method hasKey (line 229) | @Override
method isEntityUpdateable (line 234) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/SqliteMaster.java
class SqliteMaster (line 13) | @Entity(createInDb = false)
method SqliteMaster (line 26) | @Generated
method SqliteMaster (line 30) | @Generated
method getType (line 39) | public String getType() {
method setType (line 43) | public void setType(String type) {
method getName (line 47) | public String getName() {
method setName (line 51) | public void setName(String name) {
method getTableName (line 55) | public String getTableName() {
method setTableName (line 59) | public void setTableName(String tableName) {
method getRootpage (line 63) | public Long getRootpage() {
method setRootpage (line 67) | public void setRootpage(Long rootpage) {
method getSql (line 71) | public String getSql() {
method setSql (line 75) | public void setSql(String sql) {
method toString (line 80) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/SqliteMasterDao.java
class SqliteMasterDao (line 16) | public class SqliteMasterDao extends AbstractDao<SqliteMaster, Void> {
class Properties (line 24) | public static class Properties {
method SqliteMasterDao (line 33) | public SqliteMasterDao(DaoConfig config) {
method SqliteMasterDao (line 37) | public SqliteMasterDao(DaoConfig config, DaoSession daoSession) {
method bindValues (line 41) | @Override
method bindValues (line 71) | @Override
method readKey (line 101) | @Override
method readEntity (line 106) | @Override
method readEntity (line 118) | @Override
method updateKeyAfterInsert (line 127) | @Override
method getKey (line 133) | @Override
method hasKey (line 138) | @Override
method isEntityUpdateable (line 144) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/StringKeyValueEntity.java
class StringKeyValueEntity (line 10) | @Entity
method StringKeyValueEntity (line 17) | @Generated
method StringKeyValueEntity (line 21) | public StringKeyValueEntity(String key) {
method StringKeyValueEntity (line 25) | @Generated
method getKey (line 31) | public String getKey() {
method setKey (line 35) | public void setKey(String key) {
method getValue (line 39) | public String getValue() {
method setValue (line 43) | public void setValue(String value) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/StringKeyValueEntityDao.java
class StringKeyValueEntityDao (line 16) | public class StringKeyValueEntityDao extends AbstractDao<StringKeyValueE...
class Properties (line 24) | public static class Properties {
method StringKeyValueEntityDao (line 30) | public StringKeyValueEntityDao(DaoConfig config) {
method StringKeyValueEntityDao (line 34) | public StringKeyValueEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 39) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 47) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 52) | @Override
method bindValues (line 67) | @Override
method readKey (line 82) | @Override
method readEntity (line 87) | @Override
method readEntity (line 96) | @Override
method updateKeyAfterInsert (line 102) | @Override
method getKey (line 107) | @Override
method hasKey (line 116) | @Override
method isEntityUpdateable (line 121) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/TestEntity.java
class TestEntity (line 12) | @Entity
method TestEntity (line 36) | @Generated
method TestEntity (line 40) | public TestEntity(Long id) {
method TestEntity (line 44) | @Generated
method getId (line 58) | public Long getId() {
method setId (line 62) | public void setId(Long id) {
method getSimpleInt (line 69) | public int getSimpleInt() {
method setSimpleInt (line 73) | public void setSimpleInt(int simpleInt) {
method getSimpleInteger (line 77) | public Integer getSimpleInteger() {
method setSimpleInteger (line 84) | public void setSimpleInteger(Integer simpleInteger) {
method getSimpleStringNotNull (line 91) | @NotNull
method setSimpleStringNotNull (line 100) | public void setSimpleStringNotNull(@NotNull String simpleStringNotNull) {
method getSimpleString (line 104) | public String getSimpleString() {
method setSimpleString (line 108) | public void setSimpleString(String simpleString) {
method getIndexedString (line 112) | public String getIndexedString() {
method setIndexedString (line 116) | public void setIndexedString(String indexedString) {
method getIndexedStringAscUnique (line 120) | public String getIndexedStringAscUnique() {
method setIndexedStringAscUnique (line 124) | public void setIndexedStringAscUnique(String indexedStringAscUnique) {
method getSimpleDate (line 128) | public java.util.Date getSimpleDate() {
method setSimpleDate (line 132) | public void setSimpleDate(java.util.Date simpleDate) {
method getSimpleBoolean (line 136) | public Boolean getSimpleBoolean() {
method setSimpleBoolean (line 140) | public void setSimpleBoolean(Boolean simpleBoolean) {
method getSimpleByteArray (line 144) | public byte[] getSimpleByteArray() {
method setSimpleByteArray (line 148) | public void setSimpleByteArray(byte[] simpleByteArray) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/TestEntityDao.java
class TestEntityDao (line 16) | public class TestEntityDao extends AbstractDao<TestEntity, Long> {
class Properties (line 24) | public static class Properties {
method TestEntityDao (line 38) | public TestEntityDao(DaoConfig config) {
method TestEntityDao (line 42) | public TestEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 47) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 68) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 73) | @Override
method bindValues (line 120) | @Override
method readKey (line 167) | @Override
method readEntity (line 172) | @Override
method readEntity (line 189) | @Override
method updateKeyAfterInsert (line 203) | @Override
method getKey (line 209) | @Override
method hasKey (line 218) | @Override
method isEntityUpdateable (line 223) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/TestInterface.java
type TestInterface (line 3) | public interface TestInterface {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/TestSuperclass.java
class TestSuperclass (line 3) | public class TestSuperclass {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/ToManyEntity.java
class ToManyEntity (line 14) | @Entity(active = true)
method ToManyEntity (line 58) | @Generated
method ToManyEntity (line 62) | public ToManyEntity(Long id) {
method ToManyEntity (line 66) | @Generated
method __setDaoSession (line 73) | @Generated
method getId (line 79) | public Long getId() {
method setId (line 83) | public void setId(Long id) {
method getSourceJoinProperty (line 87) | public String getSourceJoinProperty() {
method setSourceJoinProperty (line 91) | public void setSourceJoinProperty(String sourceJoinProperty) {
method getToManyTargetEntityList (line 96) | @Generated
method resetToManyTargetEntityList (line 112) | @Generated
method getToManyDescList (line 118) | @Generated
method resetToManyDescList (line 134) | @Generated
method getToManyByJoinProperty (line 140) | @Generated
method resetToManyByJoinProperty (line 156) | @Generated
method getToManyJoinTwo (line 162) | @Generated
method resetToManyJoinTwo (line 178) | @Generated
method getDateEntityList (line 184) | @Generated
method resetDateEntityList (line 200) | @Generated
method delete (line 209) | @Generated
method update (line 219) | @Generated
method refresh (line 229) | @Generated
method __throwIfDetached (line 235) | @Generated
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/ToManyEntityDao.java
class ToManyEntityDao (line 16) | public class ToManyEntityDao extends AbstractDao<ToManyEntity, Long> {
class Properties (line 24) | public static class Properties {
method ToManyEntityDao (line 32) | public ToManyEntityDao(DaoConfig config) {
method ToManyEntityDao (line 36) | public ToManyEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 42) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 50) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 55) | @Override
method bindValues (line 70) | @Override
method attachEntity (line 85) | @Override
method readKey (line 91) | @Override
method readEntity (line 96) | @Override
method readEntity (line 105) | @Override
method updateKeyAfterInsert (line 111) | @Override
method getKey (line 117) | @Override
method hasKey (line 126) | @Override
method isEntityUpdateable (line 131) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/ToManyTargetEntity.java
class ToManyTargetEntity (line 10) | @Entity
method ToManyTargetEntity (line 19) | @Generated
method ToManyTargetEntity (line 23) | public ToManyTargetEntity(Long id) {
method ToManyTargetEntity (line 27) | @Generated
method getToManyId (line 35) | public Long getToManyId() {
method setToManyId (line 39) | public void setToManyId(Long toManyId) {
method getToManyIdDesc (line 43) | public Long getToManyIdDesc() {
method setToManyIdDesc (line 47) | public void setToManyIdDesc(Long toManyIdDesc) {
method getId (line 51) | public Long getId() {
method setId (line 55) | public void setId(Long id) {
method getTargetJoinProperty (line 59) | public String getTargetJoinProperty() {
method setTargetJoinProperty (line 63) | public void setTargetJoinProperty(String targetJoinProperty) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/ToManyTargetEntityDao.java
class ToManyTargetEntityDao (line 19) | public class ToManyTargetEntityDao extends AbstractDao<ToManyTargetEntit...
class Properties (line 27) | public static class Properties {
method ToManyTargetEntityDao (line 39) | public ToManyTargetEntityDao(DaoConfig config) {
method ToManyTargetEntityDao (line 43) | public ToManyTargetEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 48) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 58) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 63) | @Override
method bindValues (line 88) | @Override
method readKey (line 113) | @Override
method readEntity (line 118) | @Override
method readEntity (line 129) | @Override
method updateKeyAfterInsert (line 137) | @Override
method getKey (line 143) | @Override
method hasKey (line 152) | @Override
method isEntityUpdateable (line 157) | @Override
method _queryToManyEntity_ToManyTargetEntityList (line 163) | public List<ToManyTargetEntity> _queryToManyEntity_ToManyTargetEntityL...
method _queryToManyEntity_ToManyDescList (line 178) | public List<ToManyTargetEntity> _queryToManyEntity_ToManyDescList(Long...
method _queryToManyEntity_ToManyByJoinProperty (line 193) | public List<ToManyTargetEntity> _queryToManyEntity_ToManyByJoinPropert...
method _queryToManyEntity_ToManyJoinTwo (line 208) | public List<ToManyTargetEntity> _queryToManyEntity_ToManyJoinTwo(Long ...
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/TreeEntity.java
class TreeEntity (line 14) | @Entity(active = true)
method TreeEntity (line 40) | @Generated
method TreeEntity (line 44) | public TreeEntity(Long id) {
method TreeEntity (line 48) | @Generated
method __setDaoSession (line 55) | @Generated
method getId (line 61) | public Long getId() {
method setId (line 65) | public void setId(Long id) {
method getParentId (line 69) | public Long getParentId() {
method setParentId (line 73) | public void setParentId(Long parentId) {
method getParent (line 78) | @Generated
method setParent (line 93) | @Generated
method getChildren (line 103) | @Generated
method resetChildren (line 119) | @Generated
method delete (line 128) | @Generated
method update (line 138) | @Generated
method refresh (line 148) | @Generated
method __throwIfDetached (line 154) | @Generated
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/TreeEntityDao.java
class TreeEntityDao (line 21) | public class TreeEntityDao extends AbstractDao<TreeEntity, Long> {
class Properties (line 29) | public static class Properties {
method TreeEntityDao (line 38) | public TreeEntityDao(DaoConfig config) {
method TreeEntityDao (line 42) | public TreeEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 48) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 56) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 61) | @Override
method bindValues (line 76) | @Override
method attachEntity (line 91) | @Override
method readKey (line 97) | @Override
method readEntity (line 102) | @Override
method readEntity (line 111) | @Override
method updateKeyAfterInsert (line 117) | @Override
method getKey (line 123) | @Override
method hasKey (line 132) | @Override
method isEntityUpdateable (line 137) | @Override
method _queryTreeEntity_Children (line 143) | public List<TreeEntity> _queryTreeEntity_Children(Long parentId) {
method getSelectDeep (line 158) | protected String getSelectDeep() {
method loadCurrentDeep (line 172) | protected TreeEntity loadCurrentDeep(Cursor cursor, boolean lock) {
method loadDeep (line 182) | public TreeEntity loadDeep(Long key) {
method loadAllDeepFromCursor (line 210) | public List<TreeEntity> loadAllDeepFromCursor(Cursor cursor) {
method loadDeepAllAndCloseCursor (line 232) | protected List<TreeEntity> loadDeepAllAndCloseCursor(Cursor cursor) {
method queryDeep (line 242) | public List<TreeEntity> queryDeep(String where, String... selectionArg) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/customtype/IntegerListConverter.java
class IntegerListConverter (line 27) | public class IntegerListConverter implements PropertyConverter<List<Inte...
method convertToEntityProperty (line 28) | @Override
method convertToDatabaseValue (line 45) | @Override
method getIntBE (line 58) | public int getIntBE(byte[] bytes, int index) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/customtype/MyTimestamp.java
class MyTimestamp (line 3) | public class MyTimestamp {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/customtype/MyTimestampConverter.java
class MyTimestampConverter (line 5) | public class MyTimestampConverter implements PropertyConverter<MyTimesta...
method convertToEntityProperty (line 6) | @Override
method convertToDatabaseValue (line 13) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest/entity/SimpleEntityNotNullHelper.java
class SimpleEntityNotNullHelper (line 23) | public class SimpleEntityNotNullHelper {
method createEntity (line 24) | public static SimpleEntityNotNull createEntity(Long key) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest2/KeepEntity.java
class KeepEntity (line 14) | @Entity
method KeepEntity (line 24) | @Generated
method KeepEntity (line 28) | @Generated
method getId (line 33) | public Long getId() {
method setId (line 37) | public void setId(Long id) {
method toString (line 42) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest2/ToManyTarget2.java
class ToManyTarget2 (line 13) | @Entity
method ToManyTarget2 (line 23) | @Generated
method ToManyTarget2 (line 27) | public ToManyTarget2(Long id) {
method ToManyTarget2 (line 31) | @Generated
method getId (line 37) | public Long getId() {
method setId (line 41) | public void setId(Long id) {
method getFkId (line 45) | public Long getFkId() {
method setFkId (line 49) | public void setFkId(Long fkId) {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest2/dao/DaoMaster.java
class DaoMaster (line 21) | public class DaoMaster extends AbstractDaoMaster {
method createAllTables (line 25) | public static void createAllTables(Database db, boolean ifNotExists) {
method dropAllTables (line 33) | public static void dropAllTables(Database db, boolean ifExists) {
method newDevSession (line 44) | public static DaoSession newDevSession(Context context, String name) {
method DaoMaster (line 50) | public DaoMaster(SQLiteDatabase db) {
method DaoMaster (line 54) | public DaoMaster(Database db) {
method newSession (line 62) | public DaoSession newSession() {
method newSession (line 66) | public DaoSession newSession(IdentityScopeType type) {
class OpenHelper (line 73) | public static abstract class OpenHelper extends DatabaseOpenHelper {
method OpenHelper (line 74) | public OpenHelper(Context context, String name) {
method OpenHelper (line 78) | public OpenHelper(Context context, String name, CursorFactory factor...
method onCreate (line 82) | @Override
class DevOpenHelper (line 90) | public static class DevOpenHelper extends OpenHelper {
method DevOpenHelper (line 91) | public DevOpenHelper(Context context, String name) {
method DevOpenHelper (line 95) | public DevOpenHelper(Context context, String name, CursorFactory fac...
method onUpgrade (line 99) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest2/dao/DaoSession.java
class DaoSession (line 28) | public class DaoSession extends AbstractDaoSession {
method DaoSession (line 40) | public DaoSession(Database db, IdentityScopeType type, Map<Class<? ext...
method clear (line 67) | public void clear() {
method getKeepEntityDao (line 74) | public KeepEntityDao getKeepEntityDao() {
method getToManyTarget2Dao (line 78) | public ToManyTarget2Dao getToManyTarget2Dao() {
method getToOneTarget2Dao (line 82) | public ToOneTarget2Dao getToOneTarget2Dao() {
method getRelationSource2Dao (line 86) | public RelationSource2Dao getRelationSource2Dao() {
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest2/dao/KeepEntityDao.java
class KeepEntityDao (line 18) | public class KeepEntityDao extends AbstractDao<KeepEntity, Long> {
class Properties (line 26) | public static class Properties {
method KeepEntityDao (line 31) | public KeepEntityDao(DaoConfig config) {
method KeepEntityDao (line 35) | public KeepEntityDao(DaoConfig config, DaoSession daoSession) {
method createTable (line 40) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 47) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 52) | @Override
method bindValues (line 62) | @Override
method readKey (line 72) | @Override
method readEntity (line 77) | @Override
method readEntity (line 85) | @Override
method updateKeyAfterInsert (line 90) | @Override
method getKey (line 96) | @Override
method hasKey (line 105) | @Override
method isEntityUpdateable (line 110) | @Override
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest2/dao/ToManyTarget2Dao.java
class ToManyTarget2Dao (line 21) | public class ToManyTarget2Dao extends AbstractDao<ToManyTarget2, Long> {
class Properties (line 29) | public static class Properties {
method ToManyTarget2Dao (line 36) | public ToManyTarget2Dao(DaoConfig config) {
method ToManyTarget2Dao (line 40) | public ToManyTarget2Dao(DaoConfig config, DaoSession daoSession) {
method createTable (line 45) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 53) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 58) | @Override
method bindValues (line 73) | @Override
method readKey (line 88) | @Override
method readEntity (line 93) | @Override
method readEntity (line 102) | @Override
method updateKeyAfterInsert (line 108) | @Override
method getKey (line 114) | @Override
method hasKey (line 123) | @Override
method isEntityUpdateable (line 128) | @Override
method _queryRelationSource2_ToManyTarget2List (line 134) | public List<ToManyTarget2> _queryRelationSource2_ToManyTarget2List(Lon...
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest2/specialdao/RelationSource2Dao.java
class RelationSource2Dao (line 25) | public class RelationSource2Dao extends AbstractDao<RelationSource2, Lon...
class Properties (line 33) | public static class Properties {
method RelationSource2Dao (line 41) | public RelationSource2Dao(DaoConfig config) {
method RelationSource2Dao (line 45) | public RelationSource2Dao(DaoConfig config, DaoSession daoSession) {
method createTable (line 51) | public static void createTable(Database db, boolean ifNotExists) {
method dropTable (line 59) | public static void dropTable(Database db, boolean ifExists) {
method bindValues (line 64) | @Override
method bindValues (line 79) | @Override
method attachEntity (line 94) | @Override
method readKey (line 100) | @Override
method readEntity (line 105) | @Override
method readEntity (line 114) | @Override
method updateKeyAfterInsert (line 120) | @Override
method getKey (line 126) | @Override
method hasKey (line 135) | @Override
method isEntityUpdateable (line 140) | @Override
method getSelectDeep (line 147) | protected String getSelectDeep() {
method loadCurrentDeep (line 161) | protected RelationSource2 loadCurrentDeep(Cursor cursor, boolean lock) {
method loadDeep (line 171) | public RelationSource2 loadDeep(Long key) {
method loadAllDeepFromCursor (line 199) | public List<RelationSource2> loadAllDeepFromCursor(Cursor cursor) {
method loadDeepAllAndCloseCursor (line 221) | protected List<RelationSource2> loadDeepAllAndCloseCursor(Cursor curso...
method queryDeep (line 231) | public List<RelationSource2> queryDeep(String where, String... selecti...
FILE: tests/DaoTestBase/src/main/java/org/greenrobot/greendao/daotest2/specialentity/RelationSource2.java
class RelationSource2 (line 23) | @Entity(active = true)
method RelationSource2 (line 52) | @Generated
method RelationSource2 (line
Condensed preview — 305 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,185K chars).
[
{
"path": ".gitignore",
"chars": 50,
"preview": ".gradle\n*.iml\n.idea/\nout/\nbuild/\nlocal.properties\n"
},
{
"path": ".travis.yml",
"chars": 1019,
"preview": "# Use the Travis Container-Based Infrastructure\nsudo: false\nlanguage: android\n\njdk:\n - oraclejdk8\n\nbefore_install:\n # "
},
{
"path": "CONTRIBUTING.md",
"chars": 1738,
"preview": "Before you create an Issue...\n=============================\n\nThere are better Places for Support\n-----------------------"
},
{
"path": "DaoCore/.gitignore",
"chars": 19,
"preview": "/gradle.properties\n"
},
{
"path": "DaoCore/LICENSE",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "DaoCore/NOTICE",
"chars": 160,
"preview": "greenrobot greenDAO (c) Copyright 2011-2016 by Markus Junginger / greenrobot.org\nAll rights reserved\n\nThis product inclu"
},
{
"path": "DaoCore/build.gradle",
"chars": 2129,
"preview": "apply plugin: 'java'\n\ngroup = 'org.greenrobot'\narchivesBaseName = 'greendao'\nversion = rootProject.version\nsourceCompati"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/AbstractDao.java",
"chars": 35229,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/AbstractDaoMaster.java",
"chars": 1980,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/AbstractDaoSession.java",
"chars": 8507,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/DaoException.java",
"chars": 1492,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/DaoLog.java",
"chars": 2411,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/DbUtils.java",
"chars": 4610,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/InternalQueryDaoAccess.java",
"chars": 1597,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/InternalUnitTestDaoAccess.java",
"chars": 2054,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/Property.java",
"chars": 4467,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncDaoException.java",
"chars": 1238,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncOperation.java",
"chars": 7227,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncOperationExecutor.java",
"chars": 14615,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncOperationListener.java",
"chars": 1087,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/async/AsyncSession.java",
"chars": 14606,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/database/Database.java",
"chars": 1322,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/database/DatabaseOpenHelper.java",
"chars": 7296,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/database/DatabaseStatement.java",
"chars": 1098,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/database/EncryptedDatabase.java",
"chars": 2391,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/database/EncryptedDatabaseStatement.java",
"chars": 2044,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/database/SqlCipherEncryptedHelper.java",
"chars": 1646,
"preview": "package org.greenrobot.greendao.database;\n\nimport android.content.Context;\n\nimport net.sqlcipher.database.SQLiteDatabase"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/database/StandardDatabase.java",
"chars": 2389,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/database/StandardDatabaseStatement.java",
"chars": 2042,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/identityscope/IdentityScope.java",
"chars": 1265,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/identityscope/IdentityScopeLong.java",
"chars": 3624,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/identityscope/IdentityScopeObject.java",
"chars": 3270,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/identityscope/IdentityScopeType.java",
"chars": 746,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/internal/DaoConfig.java",
"chars": 6758,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/internal/FastCursor.java",
"chars": 6299,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/internal/LongHashMap.java",
"chars": 4910,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/internal/SqlUtils.java",
"chars": 6577,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/internal/TableStatements.java",
"chars": 5633,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/query/AbstractQuery.java",
"chars": 3390,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/query/AbstractQueryData.java",
"chars": 3318,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/query/AbstractQueryWithLimit.java",
"chars": 3003,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/query/CloseableListIterator.java",
"chars": 1027,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/query/CountQuery.java",
"chars": 3134,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/query/CursorQuery.java",
"chars": 3702,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/query/DeleteQuery.java",
"chars": 3513,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/query/Join.java",
"chars": 3698,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/query/LazyList.java",
"chars": 10072,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/query/Query.java",
"chars": 6587,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/query/QueryBuilder.java",
"chars": 19824,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/query/WhereCollector.java",
"chars": 3853,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/query/WhereCondition.java",
"chars": 5753,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/rx/RxBase.java",
"chars": 1867,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/rx/RxDao.java",
"chars": 12642,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/rx/RxQuery.java",
"chars": 3826,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/rx/RxTransaction.java",
"chars": 2308,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/rx/RxUtils.java",
"chars": 1444,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/test/AbstractDaoSessionTest.java",
"chars": 2208,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/test/AbstractDaoTest.java",
"chars": 3114,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/test/AbstractDaoTestLongPk.java",
"chars": 2114,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/test/AbstractDaoTestSinglePk.java",
"chars": 11719,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/test/AbstractDaoTestStringPk.java",
"chars": 1466,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoCore/src/main/java/org/greenrobot/greendao/test/DbTest.java",
"chars": 4318,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "DaoGenerator/.freemarker-ide.xml",
"chars": 1579,
"preview": "<config>\n\t<context-values>\n\t\t<resource path=\"src-template/dao-master.ftl\">\n\t\t\t<value key=\"schema\" object-class=\"org.gree"
},
{
"path": "DaoGenerator/.gitignore",
"chars": 19,
"preview": "/gradle.properties\n"
},
{
"path": "DaoGenerator/build.gradle",
"chars": 1995,
"preview": "apply plugin: 'java'\n\ngroup = 'org.greenrobot'\narchivesBaseName = 'greendao-generator'\nversion = rootProject.version\nsou"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/ContentProvider.java",
"chars": 2580,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/DaoGenerator.java",
"chars": 9885,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/DaoUtil.java",
"chars": 3828,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/Entity.java",
"chars": 25234,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/Index.java",
"chars": 1605,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/Property.java",
"chars": 14422,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/PropertyOrderList.java",
"chars": 3418,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/PropertyType.java",
"chars": 1341,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/Query.java",
"chars": 1613,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/QueryParam.java",
"chars": 1243,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/Schema.java",
"chars": 7519,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/ToMany.java",
"chars": 3048,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/ToManyBase.java",
"chars": 3649,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/ToManyWithJoinEntity.java",
"chars": 2247,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src/org/greenrobot/greendao/generator/ToOne.java",
"chars": 4622,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "DaoGenerator/src-template/content-provider.ftl",
"chars": 8199,
"preview": "<#-- @ftlvariable name=\"entity\" type=\"org.greenrobot.greendao.generator.Entity\" -->\n<#-- @ftlvariable name=\"contentProvi"
},
{
"path": "DaoGenerator/src-template/dao-deep.ftl",
"chars": 5107,
"preview": "<#--\n\nCopyright (C) 2011-2015 Markus Junginger, greenrobot (http://greenrobot.de)\n "
},
{
"path": "DaoGenerator/src-template/dao-master.ftl",
"chars": 5088,
"preview": "<#--\n\nCopyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n "
},
{
"path": "DaoGenerator/src-template/dao-session.ftl",
"chars": 3195,
"preview": "<#--\n\nCopyright (C) 2011 Markus Junginger, greenrobot (http://greenrobot.de) \n "
},
{
"path": "DaoGenerator/src-template/dao-unit-test.ftl",
"chars": 2280,
"preview": "<#--\n\nCopyright (C) 2011 Markus Junginger, greenrobot (http://greenrobot.de) \n "
},
{
"path": "DaoGenerator/src-template/dao.ftl",
"chars": 13592,
"preview": "<#--\n\nCopyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n "
},
{
"path": "DaoGenerator/src-template/entity.ftl",
"chars": 14448,
"preview": "<#--\n\nCopyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n "
},
{
"path": "DaoGenerator/src-test/org/greenrobot/greendao/generator/SimpleDaoGeneratorTest.java",
"chars": 2737,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "README.md",
"chars": 4929,
"preview": "⚠️ **This project is not longer actively maintained.** If you are looking for an easy to use and efficient database solu"
},
{
"path": "build.gradle",
"chars": 884,
"preview": "// Sub projects may reference rootProject.version\nversion = '3.3.0'\n\nwrapper {\n distributionType = Wrapper.Distributi"
},
{
"path": "examples/DaoExample/build.gradle",
"chars": 1359,
"preview": "buildscript {\n repositories {\n jcenter()\n google()\n mavenCentral()\n }\n\n dependencies {\n "
},
{
"path": "examples/DaoExample/src/androidTest/java/org/greenrobot/greendao/example/NoteTest.java",
"chars": 1099,
"preview": "/*\n * Copyright (C) 2011 Markus Junginger, greenrobot (http://greenrobot.de)\n *\n * Licensed under the Apache License, Ve"
},
{
"path": "examples/DaoExample/src/main/AndroidManifest.xml",
"chars": 699,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package="
},
{
"path": "examples/DaoExample/src/main/java/org/greenrobot/greendao/example/App.java",
"chars": 1615,
"preview": "package org.greenrobot.greendao.example;\n\nimport android.app.Application;\nimport android.content.Context;\n\nimport org.gr"
},
{
"path": "examples/DaoExample/src/main/java/org/greenrobot/greendao/example/Note.java",
"chars": 1898,
"preview": "package org.greenrobot.greendao.example;\n\nimport org.greenrobot.greendao.annotation.Convert;\nimport org.greenrobot.green"
},
{
"path": "examples/DaoExample/src/main/java/org/greenrobot/greendao/example/NoteActivity.java",
"chars": 4319,
"preview": "/*\n * Copyright (C) 2011 Markus Junginger, greenrobot (http://greenrobot.de)\n *\n * Licensed under the Apache License, Ve"
},
{
"path": "examples/DaoExample/src/main/java/org/greenrobot/greendao/example/NoteType.java",
"chars": 91,
"preview": "package org.greenrobot.greendao.example;\n\npublic enum NoteType {\n TEXT, LIST, PICTURE\n}\n"
},
{
"path": "examples/DaoExample/src/main/java/org/greenrobot/greendao/example/NoteTypeConverter.java",
"chars": 448,
"preview": "package org.greenrobot.greendao.example;\n\nimport org.greenrobot.greendao.converter.PropertyConverter;\n\npublic class Note"
},
{
"path": "examples/DaoExample/src/main/java/org/greenrobot/greendao/example/NotesAdapter.java",
"chars": 2146,
"preview": "package org.greenrobot.greendao.example;\n\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.v"
},
{
"path": "examples/DaoExample/src/main/res/layout/item_note.xml",
"chars": 819,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmln"
},
{
"path": "examples/DaoExample/src/main/res/layout/main.xml",
"chars": 2000,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "examples/DaoExample/src/main/res/values/colors.xml",
"chars": 208,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"colorPrimary\">#3F51B5</color>\n <color name=\"color"
},
{
"path": "examples/DaoExample/src/main/res/values/dimens.xml",
"chars": 211,
"preview": "<resources>\n <!-- Default screen margins, per the Android Design guidelines. -->\n <dimen name=\"activity_horizontal"
},
{
"path": "examples/DaoExample/src/main/res/values/strings.xml",
"chars": 290,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n <string name=\"app_name\">greenDAO Note Example</string>\n\n <str"
},
{
"path": "examples/DaoExample/src/main/res/values/styles.xml",
"chars": 383,
"preview": "<resources>\n\n <!-- Base application theme. -->\n <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar"
},
{
"path": "examples/RxDaoExample/build.gradle",
"chars": 1262,
"preview": "buildscript {\n repositories {\n jcenter()\n google()\n mavenCentral()\n }\n\n dependencies {\n "
},
{
"path": "examples/RxDaoExample/src/main/AndroidManifest.xml",
"chars": 701,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package="
},
{
"path": "examples/RxDaoExample/src/main/java/org/greenrobot/greendao/rxexample/App.java",
"chars": 1617,
"preview": "package org.greenrobot.greendao.rxexample;\n\nimport android.app.Application;\nimport android.content.Context;\n\nimport org."
},
{
"path": "examples/RxDaoExample/src/main/java/org/greenrobot/greendao/rxexample/MainActivity.java",
"chars": 3863,
"preview": "package org.greenrobot.greendao.rxexample;\n\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.View;"
},
{
"path": "examples/RxDaoExample/src/main/java/org/greenrobot/greendao/rxexample/Note.java",
"chars": 1900,
"preview": "package org.greenrobot.greendao.rxexample;\n\nimport org.greenrobot.greendao.annotation.Convert;\nimport org.greenrobot.gre"
},
{
"path": "examples/RxDaoExample/src/main/java/org/greenrobot/greendao/rxexample/NoteType.java",
"chars": 93,
"preview": "package org.greenrobot.greendao.rxexample;\n\npublic enum NoteType {\n TEXT, LIST, PICTURE\n}\n"
},
{
"path": "examples/RxDaoExample/src/main/java/org/greenrobot/greendao/rxexample/NoteTypeConverter.java",
"chars": 450,
"preview": "package org.greenrobot.greendao.rxexample;\n\nimport org.greenrobot.greendao.converter.PropertyConverter;\n\npublic class No"
},
{
"path": "examples/RxDaoExample/src/main/java/org/greenrobot/greendao/rxexample/NotesAdapter.java",
"chars": 2148,
"preview": "package org.greenrobot.greendao.rxexample;\n\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android"
},
{
"path": "examples/RxDaoExample/src/main/res/layout/activity_main.xml",
"chars": 2002,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "examples/RxDaoExample/src/main/res/layout/item_note.xml",
"chars": 819,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmln"
},
{
"path": "examples/RxDaoExample/src/main/res/values/colors.xml",
"chars": 208,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"colorPrimary\">#3F51B5</color>\n <color name=\"color"
},
{
"path": "examples/RxDaoExample/src/main/res/values/dimens.xml",
"chars": 211,
"preview": "<resources>\n <!-- Default screen margins, per the Android Design guidelines. -->\n <dimen name=\"activity_horizontal"
},
{
"path": "examples/RxDaoExample/src/main/res/values/strings.xml",
"chars": 254,
"preview": "<resources>\n\n <string name=\"app_name\">greenDAO Rx Note Example</string>\n\n <string name=\"enter_new_note\">Enter new "
},
{
"path": "examples/RxDaoExample/src/main/res/values/styles.xml",
"chars": 383,
"preview": "<resources>\n\n <!-- Base application theme. -->\n <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar"
},
{
"path": "gradle/publish.gradle",
"chars": 3842,
"preview": "// Configures common publishing settings\n\napply plugin: \"maven\"\napply plugin: \"signing\"\n\nconfigurations {\n deployerJa"
},
{
"path": "gradle/wrapper/gradle-wrapper.properties",
"chars": 202,
"preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributi"
},
{
"path": "gradle.properties",
"chars": 904,
"preview": "## For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/buil"
},
{
"path": "gradlew",
"chars": 5960,
"preview": "#!/usr/bin/env sh\n\n#\n# Copyright 2015 the original author or authors.\n#\n# Licensed under the Apache License, Version 2.0"
},
{
"path": "gradlew.bat",
"chars": 2842,
"preview": "@rem\n@rem Copyright 2015 the original author or authors.\n@rem\n@rem Licensed under the Apache License, Version 2.0 (the \""
},
{
"path": "greendao-api/LICENSE",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "greendao-api/NOTICE",
"chars": 160,
"preview": "greenrobot greenDAO (c) Copyright 2011-2016 by Markus Junginger / greenrobot.org\nAll rights reserved\n\nThis product inclu"
},
{
"path": "greendao-api/build.gradle",
"chars": 1445,
"preview": "apply plugin: 'java'\n\ngroup = 'org.greenrobot'\nversion = rootProject.version\n\nsourceCompatibility = 1.7\ntargetCompatibil"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/Convert.java",
"chars": 707,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport org.greenrobot.greendao.converter.PropertyConverter;\n\nimport java.la"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/Entity.java",
"chars": 2089,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/Generated.java",
"chars": 617,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/Id.java",
"chars": 682,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/Index.java",
"chars": 1125,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/JoinEntity.java",
"chars": 720,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/JoinProperty.java",
"chars": 567,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.Retentio"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/Keep.java",
"chars": 905,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/NotNull.java",
"chars": 532,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/OrderBy.java",
"chars": 875,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/Property.java",
"chars": 591,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/ToMany.java",
"chars": 791,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/ToOne.java",
"chars": 1025,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/Transient.java",
"chars": 363,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/Unique.java",
"chars": 815,
"preview": "package org.greenrobot.greendao.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/apihint/Beta.java",
"chars": 1416,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/apihint/Experimental.java",
"chars": 1373,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/annotation/apihint/Internal.java",
"chars": 1266,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * Licensed under the Apache Licen"
},
{
"path": "greendao-api/src/main/java/org/greenrobot/greendao/converter/PropertyConverter.java",
"chars": 1114,
"preview": "/*\n * Copyright (C) 2011-2015 Markus Junginger, greenrobot (http://greenrobot.de)\n *\n * Licensed under the Apache Licens"
},
{
"path": "javadoc-style/stylesheet.css",
"chars": 12808,
"preview": "/* Javadoc style sheet */\n/*\nOverall document style\n*/\n\n@import url('resources/fonts/dejavu.css');\n\nbody {\n backgroun"
},
{
"path": "settings.gradle",
"chars": 304,
"preview": "include 'greendao-api'\ninclude 'DaoCore'\ninclude 'DaoGenerator'\ninclude 'tests'\n\ninclude 'examples:DaoExample'\ninclude '"
},
{
"path": "tests/DaoTest/build.gradle",
"chars": 1134,
"preview": "buildscript {\n repositories {\n jcenter()\n google()\n mavenCentral()\n }\n\n dependencies {\n "
},
{
"path": "tests/DaoTest/proguard.cfg",
"chars": 1248,
"preview": "-optimizationpasses 5\n-dontusemixedcaseclassnames\n-dontskipnonpubliclibraryclasses\n-dontpreverify\n-verbose\n-optimization"
},
{
"path": "tests/DaoTest/project.properties",
"chars": 399,
"preview": "# This file is automatically generated by Android Tools.\n# Do not modify this file -- YOUR CHANGES WILL BE ERASED!\n#\n# T"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/DaoSessionConcurrentTest.java",
"chars": 11902,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/DaoSessionConcurrentWALTest.java",
"chars": 3054,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/DaoSessionTest.java",
"chars": 2464,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/DbTestTest.java",
"chars": 4037,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/DbUtilsTest.java",
"chars": 1512,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/DeadlockPreventionTest.java",
"chars": 5909,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/IndexTest.java",
"chars": 2699,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/LongHashMapTest.java",
"chars": 2623,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/async/AbstractAsyncTest.java",
"chars": 2356,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/async/BasicAsyncTest.java",
"chars": 7522,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/async/MergeTxAsyncTest.java",
"chars": 1882,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/contentprovider/SimpleEntityContentProviderTest.java",
"chars": 2794,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/encrypted/EncryptedDataFileTest.java",
"chars": 2572,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/encrypted/EncryptedDatabaseOpenHelperTest.java",
"chars": 2304,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/encrypted/EncryptedDbUtils.java",
"chars": 2562,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/encrypted/EncryptionSimpleEntityTest.java",
"chars": 2004,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/AbcdefEntityTest.java",
"chars": 1363,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/AnActiveEntityMultithreadingTest.java",
"chars": 4259,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/AnActiveEntityTest.java",
"chars": 2993,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/AutoincrementEntityTest.java",
"chars": 2058,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/CustomTypeEntityTest.java",
"chars": 2371,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/DateEntityTest.java",
"chars": 2291,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/ExtendsImplementsEntityTest.java",
"chars": 1891,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/IndexedStringEntityTest.java",
"chars": 1434,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/JoinManyToDateEntityTest.java",
"chars": 1444,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/RelationEntityTest.java",
"chars": 7373,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/RelationEntityTestIdentityScope.java",
"chars": 3344,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/SimpleEntityNotNullTest.java",
"chars": 3345,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/SimpleEntityTest.java",
"chars": 4955,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/SpecialNamesEntityTest.java",
"chars": 1423,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/SqliteMasterTest.java",
"chars": 1729,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/StringKeyValueEntityIdentityScopeTest.java",
"chars": 3117,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/StringKeyValueEntityTest.java",
"chars": 1823,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/TestEntityIdentityScopeTest.java",
"chars": 2930,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/TestEntityTest.java",
"chars": 2263,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/TestEntityTestBase.java",
"chars": 2492,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/ToManyEntityTest.java",
"chars": 9485,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/ToManyTargetEntityTest.java",
"chars": 1423,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/TransactionTest.java",
"chars": 1071,
"preview": "package org.greenrobot.greendao.daotest.entity;\n\nimport org.greenrobot.greendao.daotest.TestEntity;\nimport org.greenrobo"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/entity/TreeEntityTest.java",
"chars": 3954,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/CountQueryTest.java",
"chars": 4640,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/CountQueryThreadLocalTest.java",
"chars": 3223,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/CursorQueryTest.java",
"chars": 2185,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/DeleteQueryTest.java",
"chars": 4559,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/DeleteQueryThreadLocalTest.java",
"chars": 3399,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/JoinTest.java",
"chars": 7120,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/LazyListTest.java",
"chars": 7290,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/QueryBuilderAndOrTest.java",
"chars": 6237,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
},
{
"path": "tests/DaoTest/src/androidTest/java/org/greenrobot/greendao/daotest/query/QueryBuilderOrderTest.java",
"chars": 6680,
"preview": "/*\n * Copyright (C) 2011-2016 Markus Junginger, greenrobot (http://greenrobot.org)\n *\n * This file is part of greenDAO G"
}
]
// ... and 105 more files (download for full content)
About this extraction
This page contains the full source code of the greenrobot/greenDAO GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 305 files (1.1 MB), approximately 258.4k tokens, and a symbol index with 2724 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.