Closed guitcastro closed 9 years ago
I, too, have made this extension, but in my own subclass. IMHO, it's arguable whether ORMlite should do this, as it's currently following the behaviour of CursorAdapter
which returns the Cursor after moving the position.
I guess it´s arguable, but I guess we could create getItemCursor(position)
or do the inverse getTypedItem(position)
and in this case getItem
still returning a Cursor.
But IMHO get the access the model it´s much more frequently and user friend than cursors.
I like this feature, when it will available on ormlite ?
+1
Sorry, I just don't get this merge request. It removes a ton of code. Am I understanding it right?
@j256 Sorry I am not familiar with github PR.
The only commit related to this PR is this one https://github.com/guitcastro/ormlite-android/commit/3fb3c483525788f71e9639491ebe2647f623d453
The commit that remove a ton of code is related to this issue:
https://github.com/guitcastro/ormlite-android/commit/de028277563ae51d87c563929b17a518484bed75
And the other commit does not make sense for you (only for my fork).
I don´t know why those commits were added to this PR. = /
I've hand merged the one commit but I can't make the permanent without breaking existing code, right? So I used you getTypedItem(...)
name instead. Hope this is adequate.
What code would this break ? It should keep its name (getItem) as it greatly overides the extended class (CursorAdapter) method !
But it's returning a completely different object. Anyone using that method would have code that wouldn't compile, right?
My humblest apologies, you're right, I misread the CursorAdapter method return type.
It´s nice to take more advantage of Generic