Skip to content
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.

Commit

Permalink
Get Entity Name from class Name
Browse files Browse the repository at this point in the history
  • Loading branch information
deckyfx committed Aug 9, 2017
1 parent def0013 commit d84e5f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Add the dependency
```gradle
dependencies {
compile 'org.greenrobot:greendao:3.2.0'
compile 'com.github.deckyfx:dbhelper:0.4'
compile 'com.github.deckyfx:dbhelper:0.5'
}
```

Expand Down
2 changes: 1 addition & 1 deletion dbhelper/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
versionName=0.4
versionName=0.5
versionCode=1
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ private void populateDaoEntity(AbstractDaoSession daoSession){
}
}

public EntityMapWrapper getEntity(Class<?> klass) {
return this.getEntity(klass.getSimpleName());
}

public EntityMapWrapper getEntity(String tableName) {
EntityMapWrapper entityWrapper = this.mDAOs.get(tableName);
return entityWrapper;
Expand Down

0 comments on commit d84e5f8

Please sign in to comment.