kandi background
Explore Kits

greenDAO | fast ORM solution for Android that maps objects | Database library

 by   greenrobot Java Version: V3.3.0 License: No License

 by   greenrobot Java Version: V3.3.0 License: No License

Download this library from

kandi X-RAY | greenDAO Summary

greenDAO is a Java library typically used in Database applications. greenDAO has no bugs, it has no vulnerabilities, it has build file available and it has medium support. You can download it from GitHub, Maven.
greenDAO is a light & fast ORM for Android that maps objects to SQLite databases. Being highly optimized for Android, greenDAO offers great performance and consumes minimal memory. [![Build Status](https://travis-ci.org/greenrobot/greenDAO.svg?branch=master)](https://travis-ci.org/greenrobot/greenDAO) [![Follow greenrobot on Twitter](https://img.shields.io/twitter/follow/greenrobot_de.svg?style=flat-square&logo=twitter)](https://twitter.com/greenrobot_de).
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • greenDAO has a medium active ecosystem.
  • It has 12425 star(s) with 2870 fork(s). There are 545 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 184 open issues and 766 have been closed. On average issues are closed in 90 days. There are 45 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of greenDAO is V3.3.0
greenDAO Support
Best in #Database
Average in #Database
greenDAO Support
Best in #Database
Average in #Database

quality kandi Quality

  • greenDAO has 0 bugs and 0 code smells.
greenDAO Quality
Best in #Database
Average in #Database
greenDAO Quality
Best in #Database
Average in #Database

securitySecurity

  • greenDAO has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • greenDAO code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
greenDAO Security
Best in #Database
Average in #Database
greenDAO Security
Best in #Database
Average in #Database

license License

  • greenDAO does not have a standard license declared.
  • Check the repository for any license declaration and review the terms closely.
  • Without a license, all rights are reserved, and you cannot use the library in your applications.
greenDAO License
Best in #Database
Average in #Database
greenDAO License
Best in #Database
Average in #Database

buildReuse

  • greenDAO releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • greenDAO saves you 10050 person hours of effort in developing the same functionality from scratch.
  • It has 20461 lines of code, 2450 functions and 263 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
greenDAO Reuse
Best in #Database
Average in #Database
greenDAO Reuse
Best in #Database
Average in #Database
Top functions reviewed by kandi - BETA

kandi has reviewed greenDAO and discovered the below as its top functions. This is intended to give you an instant insight into greenDAO implemented functionality, and help decide if they suit your requirements.

  • Merge two transactions .
  • Loads the entity from the cursor .
  • Initialize additional imports .
  • Initializes the property mappings .
  • Sets up the views .
  • Initialize the constraint .
  • Filters one item by one one .
  • Append joins and values .
  • Reflection of the properties .
  • Check if the file exists .

greenDAO Key Features

Rock solid: greenDAO has been around since 2011 and is used by countless famous apps

Super simple: concise and straight-forward API, in V3 with annotations

Small: The library is <150K and it’s just plain Java jar (no CPU dependent native parts)

Fast: Probably the fastest ORM for Android, driven by intelligent code generation

Safe and expressive query API: QueryBuilder uses property constants to avoid typos

Powerful joins: query across entities and even chain joins for complex relations

Flexible property types: use custom classes or enums to represent data in your entity

Encryption: supports SQLCipher encrypted databases

Add greenDAO to your project

copy iconCopydownload iconDownload
buildscript {
    repositories {
        jcenter()
        mavenCentral() // add repository
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
        classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0' // add plugin
    }
}

R8, ProGuard

copy iconCopydownload iconDownload
-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
public static java.lang.String TABLENAME;
}
-keep class **$Properties { *; }

# If you DO use SQLCipher:
-keep class org.greenrobot.greendao.database.SqlCipherEncryptedHelper { *; }

# If you do NOT use SQLCipher:
-dontwarn net.sqlcipher.database.**
# If you do NOT use RxJava:
-dontwarn rx.**

PositionalDataSource refresh on Android

copy iconCopydownload iconDownload
public class ContactViewModel extends ViewModel {

    private final int PAGE_SIZE = 50;

    public final LiveData<PagedList<Contact>> contactList;
    public MutableLiveData<String> filterConstraint = new MutableLiveData<>();

    public ContactViewModel(){

        PagedList.Config.Builder pageListConfig = new PagedList.Config.Builder();

        pageListConfig
            .setPageSize(PAGE_SIZE)
            .setEnablePlaceholders(false);

        contactList = Transformations.switchMap(filterConstraint, input -> {
            boolean filtered = !(TextUtils.isEmpty(input) || input.equals("%%"));
            ContactDataSourceFactory contactDataSourceFactory = new ContactDataSourceFactory(filtered, filtered ? input : null);
            return new LivePagedListBuilder<>(contactDataSourceFactory, pageListConfig.build()).build();
        });
    }

    public void invalidateDataSource(){
        PagedList<Contact> pagedList = contactList.getValue();
        if (pagedList != null && pagedList.getDataSource() != null)
            pagedList.getDataSource().invalidate();
    }
}

greenDAO Android no create tables in file database

copy iconCopydownload iconDownload
public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    TextView textView = (TextView) findViewById(R.id.nameTv);

    // Put this in a different thread or use AsyncSession in greenDAO.
    // For Demo purpose, this query is made on main thread but it should in a different thread.
    M_User user = ((AppDbController)getApplication()).getDaoSession().getM_UserDao().load(1L);

    if(user != null){
        textView.setText(user.getFullName());
    }
}

Unresolved reference: Parcelize after adding necessary tools in gradle and updating to kotlin latest version

copy iconCopydownload iconDownload
implementation "org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.61"
-----------------------
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
androidExtensions {
    experimental = true
}
-----------------------
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
androidExtensions {
    experimental = true
}

Community Discussions

Trending Discussions on greenDAO
  • The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files android studio
  • android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed using greenDAO ORM
  • PositionalDataSource refresh on Android
  • greenDAO Android no create tables in file database
  • Unresolved reference: Parcelize after adding necessary tools in gradle and updating to kotlin latest version
Trending Discussions on greenDAO

QUESTION

The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files android studio

Asked 2021-May-13 at 21:00

There are quite a few questions with the above error, but most of them are related to eclipse, for me it's happening in android studio and also for the project which was working fine till now.

My android project was working fine all the while, and then all of a sudden started getting this build error. Don't know where exactly is the issue, but I see some traces of greendao mentioned in the logs.

FAILURE: Build failed with an exception.

Task :driver_module:greendao FAILED Found 2 problem(s) parsing "/Users/../Code/MyApplication/driver_module/src/main/java/../sdk/MyEvents.java": #0 @1: The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files (ID: 16777540; error: true) #1 @1: The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files (ID: 16777540; error: true)

Edit : This is somewhat close I found, but this too didn't work for me. https://github.com/greenrobot/greenDAO/issues/931

ANSWER

Answered 2021-May-10 at 08:33

In my case, I updated greendao-gradle-plugin 3.2.2 to 3.3.0,Then , It resolved magically.

My screenshot

Source https://stackoverflow.com/questions/67422686

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install greenDAO

You can download it from GitHub, Maven.
You can use greenDAO like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the greenDAO component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

For more details on greenDAO please check [greenDAO’s website](https://greenrobot.org/greendao). Here are some direct links you may find useful:. [Migrating to greenDAO 3](https://greenrobot.org/greendao/documentation/updating-to-greendao-3-and-annotations/).

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Compare Database Libraries with Highest Support
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.