Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0.0-alpha2 #1715

Merged
merged 246 commits into from
Mar 13, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
246 commits
Select commit Hold shift + click to select a range
d824f56
[Tests] fix broken tests.
agrosner Oct 21, 2018
da0ab5f
[Insert] respect order of primary key definition in insert statement.
agrosner Oct 21, 2018
3a02f4f
[Caching] consolidate construction of cache adapter by specifying dyn…
agrosner Oct 21, 2018
c93e4d1
[RX] fix file locations to match package changes.
agrosner Oct 21, 2018
1470f93
[Index] consolidate method name on Index to match IndexProperty. Upda…
agrosner Oct 21, 2018
8827320
[List] update usage.
agrosner Oct 21, 2018
96d064a
[Modules] update usage. add kotlin class param for database holders.
agrosner Oct 21, 2018
dd63b82
[QueryModels] update documentation to match 5.0.0 api.
agrosner Oct 21, 2018
7b141ab
[ModelViews] simplify doc.
agrosner Oct 21, 2018
55c395c
[Migrations] abstract out migration file handling. put migrations bef…
agrosner Oct 25, 2018
ce51a58
[Database] remove reliance on contentvalues except for content provid…
agrosner Oct 25, 2018
7aa28d5
[Query] move infix extension defaults into interface for IConditional.
agrosner Oct 25, 2018
1931e29
[Query] move constrain implementation into interface.
agrosner Oct 25, 2018
a845ed4
[Query] clone self for wherebase in where.
agrosner Oct 25, 2018
f1e8c09
[DB] rename getter to property for saveQueue.
agrosner Oct 25, 2018
ff4c7ed
[Priority] remove builder, add extension to easily convert a transact…
agrosner Oct 25, 2018
e5898e0
[OneToMany] fix issue where onetomany reference object started with n…
agrosner Oct 26, 2018
2a9acbf
[Transactions] enforce worker thread on executing transaction on the …
agrosner Oct 26, 2018
8efba47
[Query] add random() method and random() orderby support. #1608
agrosner Oct 26, 2018
07582ea
[Query] make random property static on jvm. #1608
agrosner Oct 26, 2018
34cac30
[Models] fix property with name of "setter" and "getter".
agrosner Oct 26, 2018
7457148
[Property] add namealias overload to use NameAlias directly.
agrosner Oct 26, 2018
b64a5a9
[Doc] update module documentation to use annotationprocessor instead …
agrosner Oct 26, 2018
8d53e43
[Doc] add example about how to use coroutines, paging, and daos in th…
agrosner Oct 27, 2018
b0c978a
[Paging] update to use androidx dep. update rx dep.
agrosner Oct 27, 2018
7da3255
[Coroutines] update to 30.2 version.
agrosner Oct 27, 2018
de8a6db
[Columns] add androidX looking for non null.
agrosner Oct 27, 2018
207ee95
[Deps] add androidx appcompat dependency.
agrosner Oct 27, 2018
dfbc67b
[Processor] consolidate column into a type variable from a few props.…
agrosner Oct 27, 2018
a57091d
[Processor] consolidate mirroredtypexception handling into an inline …
agrosner Oct 27, 2018
390009b
[Processor] more code cleanup including returning typemirror directly…
agrosner Oct 27, 2018
4a08cb8
[Processor] cleanup reference definition, some code consolidation.
agrosner Oct 27, 2018
d5a4c2d
[Processor] cleanup code. fix foreignkeyelement name not referenced p…
agrosner Oct 27, 2018
09ec42f
[Processor] more cleanup. make className a val on databaseholderdefin…
agrosner Oct 27, 2018
d752050
[Processor] make writer utils an extension.
agrosner Oct 27, 2018
e34d1ce
[Migrations] support alter table add column with default value.
agrosner Oct 27, 2018
6c30dd1
[Migrations] fix priority documentation to match implementation.
agrosner Oct 27, 2018
6f947c6
[Content] add ability to specify a databaseholder to initialize befor…
agrosner Oct 27, 2018
b9ead96
[LiveData] add initial artifact for livedata observing queries.
agrosner Oct 27, 2018
34d4228
[RX2] emit once per subscribe. cleanup register call.
agrosner Oct 28, 2018
a507a4b
[LiveData] emit on active. add test to verify livedata returns values.
agrosner Oct 28, 2018
064b054
[Docs] update to include livedata as an artifact.
agrosner Oct 28, 2018
9eb41a3
[LiveData] add doc.
agrosner Oct 28, 2018
bae4d9a
GitBook: [develop] 26 pages modified
agrosner Oct 28, 2018
5d54803
[Cursor] remove unnecessary wrapping of flowcursor in provider models.
agrosner Oct 29, 2018
e00804f
Merge branch 'develop' of https://github.com/agrosner/DBFlow into dev…
agrosner Oct 29, 2018
65255bd
[CursorList] replace single method interface with typealias.
agrosner Oct 29, 2018
5b37a2b
[CursorList] replace single method interface with typealias.
agrosner Oct 29, 2018
a4efdf8
[Property] consolidate name alias property and constructors. move get…
agrosner Oct 29, 2018
5d3462e
[DB] consolidate db methods into passing a db param. remove extension…
agrosner Oct 29, 2018
8521a1b
[DB] require databasewrapper in model + modelqueriable methods. remov…
agrosner Oct 29, 2018
e097840
[Transaction] add ready callback to supply before transaction executes.
agrosner Oct 29, 2018
e697f9c
[Docs] update observability docs.
agrosner Oct 29, 2018
cfbc1e1
[Docs] switch away from using kotlin extension on model queries. swit…
agrosner Oct 29, 2018
df47086
[RX] add convenience extension on Any. require DatabaseWrapper on Bas…
agrosner Oct 29, 2018
8d981de
[Trigger] make static strings const.
agrosner Oct 29, 2018
30cff68
[Docs] more updates to new usage.
agrosner Nov 6, 2018
9ce9da2
Merge branch 'master' into develop
agrosner Nov 6, 2018
27ac203
[kotlin] update to kotlin 1.3.0. utilize kotlinx coroutines 1.0.0.
agrosner Nov 6, 2018
c8306b8
[Docs] add documentation on kotlin support for a few kotlin-specific …
agrosner Nov 6, 2018
c52f5a8
[FTS4] add virtual table annotation.
agrosner Nov 11, 2018
571946b
[Table] remove file target allowance.
agrosner Nov 11, 2018
6359838
[Processor] refactor a few redundant fields into a behavior class.
agrosner Nov 11, 2018
76a863a
[Processor] fix compile with querymodeldefinition by introducing mult…
agrosner Nov 11, 2018
2c0462e
[Processor] make base table definition define MethodDefinition array …
agrosner Nov 11, 2018
4920829
[Tables] consolidate load from cursor listener logic.
agrosner Nov 11, 2018
ac1d14e
[Tables] add cursorhandling behavior, which consolidates all of loadi…
agrosner Nov 12, 2018
2f84a3f
[Tables] simplify access to database definition by making it lazy non…
agrosner Nov 12, 2018
1f268f4
[Tables] add primary key column behavior.
agrosner Nov 12, 2018
0a25e7c
[Processor] rename from BaseTableDefinition.
agrosner Nov 12, 2018
4bf54ec
[Table] caching now a behavior.
agrosner Nov 12, 2018
6f70a4b
[Table] caching sets its fields from table reading.
agrosner Nov 12, 2018
e2de11c
[Table] more cleanup.
agrosner Nov 12, 2018
f943619
[Definition] utilize kotlin val to clean up vars a ton in basedefinit…
Nov 12, 2018
91fc6cb
[Gradle] update version to 3.3.0-beta03.
Nov 12, 2018
2474f2d
[Definition] simplify outdated code on getelementclassname method.
Nov 12, 2018
8719ba8
[Database] remove deprecated annotation parameters.
Nov 12, 2018
9a15e57
[Database] simplify the database definition class for annotation to m…
Nov 12, 2018
b6d73e2
[Database] simplify the database definition class for annotation to m…
Nov 12, 2018
fd409c2
[Database] remove separate field databaseClassName pointing to simple…
Nov 12, 2018
a192adf
[Processor] Remove traces of class separator in definition classes.
Nov 12, 2018
4c8b238
[Provider] clean up annotation use by making it non null.
Nov 12, 2018
28219b5
[Provider] Extract out ContentUriDefinition and put its code adding i…
Nov 12, 2018
406495b
[Provider] improve immutabilility of notify and tableendpoint definit…
Nov 12, 2018
edd9851
Merge branch 'fts4' of https://github.com/agrosner/DBFlow into fts4
Nov 12, 2018
df4c411
[Table] more cleanup and efficiency helpers.
Nov 12, 2018
c504e23
[Processor] make reference column definition more safe. add behavior …
Nov 13, 2018
20d95f1
[Entities] consolidate some of the logic between modelview and query …
Nov 13, 2018
10d5022
[Entities] support foreign key reference where referenced primary key…
Nov 13, 2018
1782390
[Columns] significantly consolidate wrappper / type converter logic i…
Nov 13, 2018
0209fec
[Version] update tp 3.3.0-beta04 of the gradle plugin.
Nov 13, 2018
7024927
[Migrations] migrations get immutable fields.
Nov 13, 2018
bbacc07
[Virtual] Add methods to virtual table including handling annotation …
Nov 14, 2018
37a5fc5
[Processor] clean up usage on handlers by requiring annotation on all…
Nov 14, 2018
0ec55ac
[Processor] put annotation class in constructor of main handler, rena…
Nov 14, 2018
8348e9b
[TableDefinition] Clean up table annotation use.
Nov 14, 2018
c375d88
[VirtualTable] output class files now. Add adapter class.
Nov 14, 2018
792e13d
[Entities] allow querymodels and virtual tables to check for existenc…
Nov 14, 2018
0bd7b70
[VirtualTable] add in content table reference for creation if specified
Nov 14, 2018
593bf68
[VirtualTable] add MATCH operator to language queries.
Nov 14, 2018
ca38581
[Property] fix issue with toString removed. add tests for operator an…
agrosner Nov 14, 2018
c31347d
[Match] add match validation test.
agrosner Nov 14, 2018
3a4a0e4
[Entities] standardize creation properties into common interface. ena…
agrosner Nov 14, 2018
34a9849
[Entities] fix logic in code creation.
agrosner Nov 14, 2018
1f5ebc6
[VirtualTable] create table, add it to creation at db creation, updat…
agrosner Nov 14, 2018
3f6a2b9
[Tests] move to instrumentation on a real device.
Nov 14, 2018
3305948
fix compile.
Nov 15, 2018
df8cdd9
[Tests] move all code gen to android test directory for testing.
Nov 15, 2018
6c98983
[VirtualTable] utilize power of Table annotation by adding optional e…
agrosner Nov 15, 2018
8e9a05f
[VirtualTable] add fts3 initial support.
agrosner Nov 15, 2018
0392385
GitBook: [develop] 25 pages modified
agrosner Nov 15, 2018
ba3ebf6
Merge branch 'develop' of https://github.com/agrosner/DBFlow into fts4
Nov 15, 2018
2624fd9
[VirtualTable] remove VirtualTableAdapter (not needed).
Nov 15, 2018
b5c92c0
Merge pull request #1634 from agrosner/fts4
agrosner Nov 15, 2018
594733e
[Query] Breaking change: String "?" no longer are unescaped and treat…
Nov 16, 2018
7700423
[Operator] cleanup code to not return null and simplify some of the l…
Nov 16, 2018
5fd9ab2
[Operator] simplify logic.
Nov 16, 2018
61b6524
[Observer] first class to start tracking changes.
Nov 16, 2018
28b956f
[Database] add isInTransaction method to databasewrapper. fix file lo…
agrosner Nov 18, 2018
7c6383f
[Observers] add db trigger construction. add collection of triggermet…
agrosner Nov 18, 2018
fa1acd9
[Observers] move into own package.
agrosner Nov 19, 2018
4fd9e01
[View] allow property use for ModelViewQuery. update docs.
Nov 19, 2018
43587bb
Merge branch 'better-observing' of https://github.com/agrosner/DBFlow…
Nov 19, 2018
289d8e2
[View] allow property use for ModelViewQuery. update docs.
Nov 19, 2018
6987787
[Docs] update outdated db doc.
Nov 19, 2018
2ba127f
[Observing] complete initial implementation of table tracking.
Nov 19, 2018
6ca29ce
[Observing] add lock on closing and fix pending refresh bug.
Nov 19, 2018
45264d1
[DB] added journal mode to support writeaheadlogging directly in lib.
Nov 19, 2018
53198e3
[Observer] fix crash when attempting to run check for updates on obse…
Nov 19, 2018
5f760a0
[Operator] fix overload.
Nov 19, 2018
66bd7d2
[ModelView] fix compile.
Nov 19, 2018
0b5d299
Merge branch 'develop' into better-observing
Nov 19, 2018
f0c7206
[Observability] wrap the internal database callback in a wrapper and …
Nov 19, 2018
8bef3e6
[Observability] enable back calls.
Nov 19, 2018
e8ea637
[Observability] fix trigger naming that did not work. properly find r…
Nov 19, 2018
5cebb98
[RX] updates now backed by the new notification system.
Nov 19, 2018
c08e34e
[Observability] warn for all modeladapter modifications if not in tra…
Nov 19, 2018
2c6f036
[DataSource] move to new observing pattern.
Nov 20, 2018
8ca3075
[LiveData] swap with new implementation.
agrosner Nov 24, 2018
2fba0be
[Select] add inline class, update kotlin version.
agrosner Jan 30, 2021
33e4175
[DB] try catch on cipher error.
agrosner Jan 30, 2021
83714b7
[Setup] update kotlin version and gradle wrapper
agrosner Jan 30, 2021
95730ad
[Tests] fix compile
agrosner Jan 30, 2021
743076f
[Deps] update rx to version 3. update to latest stable of arch comps.
agrosner Jan 30, 2021
9ab3a74
[Build] remove unused param warning where database for table not requ…
agrosner Jan 30, 2021
e84766d
[Tests] check for changes in LiveDataTest.kt. fix test failures
agrosner Jan 30, 2021
137fdfc
[Processor] provide default exists method to reduce generated code.
agrosner Jan 31, 2021
28e5369
[SQL] remove redundant spread op.
agrosner Feb 1, 2021
aca3286
[DB] add doc on tableobserver prop.
agrosner Feb 1, 2021
98c3e93
Merge pull request #1712 from agrosner/better-observing
agrosner Feb 1, 2021
99ca0c5
[DB] deprecate QueryModelAdapter.kt and use retrievaladapter instead.
agrosner Feb 1, 2021
c5130c4
[Setup] add incremental annotation processor support.
agrosner Feb 1, 2021
f04d184
[Processor] remove redundant qualifier.
agrosner Feb 1, 2021
4bd74d6
[Tests] fix process crash on one ContentProviderTests.kt
agrosner Feb 1, 2021
7d6b723
[Provider] Fix issue with testing content provider.
agrosner Feb 2, 2021
130772a
[Provider] mark testonly.
agrosner Feb 2, 2021
0c995d8
[Cache] rename the oddly named IMultiKeyCacheConverter.kt to MultiKey…
agrosner Feb 2, 2021
a9907e7
GitBook: [develop] 30 pages modified
agrosner Feb 2, 2021
fa608c6
[Query] add doc on async.
agrosner Feb 2, 2021
f41a1d6
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 2, 2021
a95c42f
GitBook: [develop] 2 pages modified
agrosner Feb 2, 2021
c282bfc
[Index] update test model with newer kotlin array syntax
agrosner Feb 2, 2021
c148fd7
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 2, 2021
1c5007c
GitBook: [develop] 2 pages modified
agrosner Feb 2, 2021
66a4cb0
[Query] replace deprecated use of queryModelAdapter for retrievalAdapter
agrosner Feb 2, 2021
a605180
[Migration] make AlterTableMigration.kt open again.
agrosner Feb 2, 2021
638dee9
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 2, 2021
3513785
[Migration] add kclass constructors.
agrosner Feb 2, 2021
0b2a31c
GitBook: [develop] 29 pages modified
agrosner Feb 2, 2021
b533fce
[RX] fix exists naming.
agrosner Feb 3, 2021
9d5a15b
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 3, 2021
58729a2
GitBook: [develop] 31 pages modified
agrosner Feb 3, 2021
0695db1
GitBook: [develop] one page modified
agrosner Feb 3, 2021
402f1d4
GitBook: [develop] one page modified
agrosner Feb 3, 2021
ffeb928
GitBook: [develop] one page modified
agrosner Feb 3, 2021
9c4f3cd
[DB] fix migration order
agrosner Feb 3, 2021
f2ba8c5
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 3, 2021
4ee8b30
[SQL] remove custom cache as it wasnt doing anything
agrosner Feb 3, 2021
0d844c4
GitBook: [develop] 30 pages modified
agrosner Feb 3, 2021
a29b074
GitBook: [develop] one page modified
agrosner Feb 3, 2021
2877da6
[Docs] remove floating README.md
agrosner Feb 3, 2021
645bc07
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 3, 2021
a4a11b2
[Docs] update version
agrosner Feb 3, 2021
e1e8af7
[Tests] add tests for dao class retrievals. also opt in for experimen…
agrosner Feb 3, 2021
334da2f
[Lint] fix lint warnings and possible crashes from jvm interop.
agrosner Feb 8, 2021
c4732a0
[Lint] fix lint warnings and possible crashes from jvm interop.
agrosner Feb 10, 2021
4fad976
GitBook: [develop] 30 pages modified
agrosner Feb 10, 2021
1cc2b95
GitBook: [develop] one page modified
agrosner Feb 10, 2021
e3100b3
GitBook: [develop] 2 pages modified
agrosner Feb 10, 2021
c5d55de
GitBook: [develop] 2 pages modified
agrosner Feb 10, 2021
45d0ec8
GitBook: [develop] 2 pages modified
agrosner Feb 10, 2021
0d1c819
GitBook: [develop] 2 pages modified
agrosner Feb 10, 2021
a169461
GitBook: [develop] 30 pages modified
agrosner Feb 10, 2021
fd3c774
[Query] rewrite insert query using buildString.
agrosner Feb 11, 2021
6776f8a
[Fts4] fix fts4 test.
agrosner Feb 11, 2021
96789cb
[Fts4] add match query checking.
agrosner Feb 11, 2021
6b17fcd
[Query] add table name property convenience.
agrosner Feb 11, 2021
8b1efdb
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 11, 2021
68ba538
[Fts4] add docId convenience property
agrosner Feb 11, 2021
b18e84f
[Fts4] add snippet and offsets function support.
agrosner Feb 11, 2021
680b03a
[Fts] improve and clean up FTS code.
agrosner Feb 11, 2021
88c0781
[Gradle] convert all scripts to kotlin!
agrosner Feb 13, 2021
ddfbd34
[Table] don't reassign parameter in function.
agrosner Feb 14, 2021
b535a79
[Example] add foreign key generate helper
agrosner Feb 14, 2021
b040aba
[OneToMany] fix issue where cache and one to many would not work when…
agrosner Feb 14, 2021
f8bc1ff
[Table] add ability to create temp tables.
agrosner Feb 16, 2021
d6c8b10
[Table] fix issue where NotNull applied to foreignkey field doesn't a…
agrosner Feb 16, 2021
6a81a40
[LiveData] rename toLiveData
agrosner Feb 16, 2021
46b3274
[Config] convert back typealias to fun interfaces to keep JVM signatu…
agrosner Feb 17, 2021
96a523e
[Config] convert other tests to use the dsl
agrosner Feb 17, 2021
fdd4e1d
[Config] simplify even further.
agrosner Feb 17, 2021
5e03065
[Config] add inMemoryDatabase dsl helper.
agrosner Feb 17, 2021
b059fc7
GitBook: [develop] 30 pages modified
agrosner Feb 17, 2021
1f2f77e
GitBook: [develop] 4 pages modified
agrosner Feb 17, 2021
76c981f
[Views] rollback property support for ModelViewQuery.kt. need more si…
agrosner Feb 17, 2021
86a1fa8
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 17, 2021
209e682
[Caching] make MultiKeyCacheConverter.kt fun interface.
agrosner Feb 17, 2021
1e45a39
GitBook: [develop] 30 pages modified
agrosner Feb 17, 2021
630cdbf
[Config] make the databaseholder method inline reified.
agrosner Feb 17, 2021
52b75d2
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 17, 2021
e6690f3
GitBook: [develop] 30 pages modified
agrosner Feb 17, 2021
c00560b
[QueryList] allow specifying a custom handler
agrosner Feb 17, 2021
932ef8d
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 17, 2021
928ed90
[TypeConverter] its an error to have multiple converters on the same …
agrosner Feb 17, 2021
b763a77
[ProviderModel] fix potential leaking cursor when no results found.
agrosner Feb 17, 2021
0f7ba59
[DB] move pragma for foreign keys into the onconfigure method of the …
agrosner Feb 17, 2021
7d461d6
GitBook: [develop] 3 pages modified
agrosner Feb 17, 2021
1c3c829
[DB] make default DatabaseCallback.kt methods.
agrosner Feb 17, 2021
62ce59a
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 17, 2021
2d85b79
[Async] make the queriable param the receiver for more concise ops on…
agrosner Feb 17, 2021
38e5845
GitBook: [develop] 2 pages modified
agrosner Feb 17, 2021
9338ba4
[DB] simplify AndroidSQLiteOpenHelper.kt impl. simplify some legacy c…
agrosner Feb 18, 2021
731edd0
Merge remote-tracking branch 'origin/develop' into develop
agrosner Feb 18, 2021
a4b3680
[DB] WAL support on SQLcipher
agrosner Feb 18, 2021
5ad4d86
[DB] openhelper is lazy
agrosner Feb 18, 2021
fca6d72
[DB] remove unused method for now
agrosner Feb 18, 2021
12ad960
[FlowCursor] make -1 a constant.
agrosner Feb 18, 2021
bd5305e
[Tests] split out db initialization during tests
agrosner Feb 18, 2021
e9e2651
[DB] prepackaged dbs now can run migrations to get to current version…
agrosner Feb 18, 2021
a580b5f
[DB] remove static getMigrations method in favor of accessing the db …
agrosner Feb 21, 2021
445c520
[Processor] update error message. #1567
agrosner Feb 21, 2021
010a526
[Queue] fix synchronization issue with quitting. #1676
agrosner Feb 21, 2021
354a7a9
[Processor] type erase parameterized type converters. fix issue with …
agrosner Feb 21, 2021
04e3e2a
[Processor] fix issue where reference annotation used on nonmodel col…
agrosner Feb 21, 2021
9ff4dac
[Tests] add one set for update table migration.
agrosner Feb 21, 2021
9a57e27
Merge branches 'develop' and 'master' of https://github.com/agrosner/…
agrosner Mar 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Tables] consolidate load from cursor listener logic.
  • Loading branch information
agrosner committed Nov 11, 2018
commit 4920829a1b372f86b68c58d65a06614a2546594e
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.dbflow5.processor.utils.ElementUtility
import com.dbflow5.processor.utils.ModelUtils
import com.dbflow5.processor.utils.`override fun`
import com.dbflow5.processor.utils.getPackage
import com.dbflow5.processor.utils.implementsClass
import com.dbflow5.processor.utils.toClassName
import com.grosner.kpoet.`public static final`
import com.grosner.kpoet.`return`
Expand Down Expand Up @@ -41,7 +42,7 @@ fun Collection<BaseTableDefinition>.safeWritePackageHelper(processorManager: Pro
/**
* Description: Used to write Models and ModelViews
*/
abstract class BaseTableDefinition(typeElement: Element, processorManager: ProcessorManager)
abstract class BaseTableDefinition(typeElement: TypeElement, processorManager: ProcessorManager)
: BaseDefinition(typeElement, processorManager) {

var columnDefinitions: MutableList<ColumnDefinition>
Expand Down Expand Up @@ -71,6 +72,9 @@ abstract class BaseTableDefinition(typeElement: Element, processorManager: Proce
val hasGlobalTypeConverters
get() = globalTypeConverters.isNotEmpty()

val implementsLoadFromCursorListener = typeElement.implementsClass(manager.processingEnvironment,
ClassNames.LOAD_FROM_CURSOR_LISTENER)

abstract val associationalBehavior: AssociationalBehavior

abstract val methods: Array<MethodDefinition>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ class LoadFromCursorMethod(private val baseTableDefinition: BaseTableDefinition)
}
}

if (baseTableDefinition is TableDefinition && baseTableDefinition.implementsLoadFromCursorListener) {
if (baseTableDefinition.implementsLoadFromCursorListener) {
statement("${ModelUtils.variable}.onLoadFromCursor($PARAM_CURSOR)")
}
`return`(ModelUtils.variable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.dbflow5.annotation.Column
import com.dbflow5.annotation.ColumnMap
import com.dbflow5.annotation.ModelView
import com.dbflow5.annotation.ModelViewQuery
import com.dbflow5.processor.ClassNames
import com.dbflow5.processor.ColumnValidator
import com.dbflow5.processor.ProcessorManager
import com.dbflow5.processor.definition.column.ColumnDefinition
Expand All @@ -31,20 +30,17 @@ import com.grosner.kpoet.public
import com.squareup.javapoet.ParameterizedTypeName
import com.squareup.javapoet.TypeName
import com.squareup.javapoet.TypeSpec
import javax.lang.model.element.Element
import javax.lang.model.element.ExecutableElement
import javax.lang.model.element.TypeElement

/**
* Description: Used in writing ModelViewAdapters
*/
class ModelViewDefinition(modelView: ModelView,
manager: ProcessorManager, element: Element)
manager: ProcessorManager,
element: TypeElement)
: BaseTableDefinition(element, manager) {

private val implementsLoadFromCursorListener: Boolean =
typeElement.implementsClass(manager.processingEnvironment, ClassNames.LOAD_FROM_CURSOR_LISTENER)

private var queryFieldName: String? = null

override val methods: Array<MethodDefinition> = arrayOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ class QueryModelDefinition(override val associationalBehavior: AssociationalBeha
processorManager: ProcessorManager)
: BaseTableDefinition(typeElement, processorManager) {

private val implementsLoadFromCursorListener = typeElement.implementsClass(manager.processingEnvironment,
ClassNames.LOAD_FROM_CURSOR_LISTENER)

override val methods: Array<MethodDefinition> = arrayOf(LoadFromCursorMethod(this))

constructor(queryModel: QueryModel, typeElement: TypeElement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ class TableDefinition(table: Table,

var implementsSqlStatementListener = false

var implementsLoadFromCursorListener = false

override val methods: Array<MethodDefinition> = arrayOf(
BindToStatementMethod(this, INSERT),
BindToStatementMethod(this, UPDATE),
Expand Down Expand Up @@ -162,9 +160,6 @@ class TableDefinition(table: Table,
inheritedPrimaryKeyMap[it.fieldName] = it
}

implementsLoadFromCursorListener = element.implementsClass(manager.processingEnvironment,
ClassNames.LOAD_FROM_CURSOR_LISTENER)

implementsContentValuesListener = element.implementsClass(manager.processingEnvironment,
ClassNames.CONTENT_VALUES_LISTENER)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package com.dbflow5.processor.definition

import com.dbflow5.annotation.VirtualTable
import com.dbflow5.processor.ClassNames
import com.dbflow5.processor.ProcessorManager
import com.dbflow5.processor.definition.column.ColumnDefinition
import com.dbflow5.processor.utils.annotation
import com.dbflow5.processor.utils.extractTypeNameFromAnnotation
import com.dbflow5.processor.utils.implementsClass
import com.dbflow5.processor.utils.isNullOrEmpty
import javax.lang.model.element.TypeElement

Expand All @@ -17,9 +15,6 @@ class VirtualTableDefinition(virtualTable: VirtualTable,
typeElement: TypeElement, processorManager: ProcessorManager)
: BaseTableDefinition(typeElement, processorManager) {

private val implementsLoadFromCursorListener: Boolean =
typeElement.implementsClass(processorManager.processingEnvironment, ClassNames.LOAD_FROM_CURSOR_LISTENER)

private var createWithDatabase = true

private var type: VirtualTable.Type = VirtualTable.Type.FTS4
Expand Down