DBTools Generator


Source link: https://github.com/jeffdcamp/dbtools-gen

DBTools Generator

DBTools Gen is a ORM Java class file generator and SQL Schema file generator library. DBTools Gen makes it easy to create databases schema files and create JPA ORM Mapping or Android ORM Mapping files.

For platform specific DBTools usage see

Usage

buildscript {

  repositories {

mavenCentral();

// or

jcenter();

  
}

 dependencies {

classpath 'org.dbtools:gradle-dbtools-plugin:<VERSION>'
  
}
 
}
  // ... apply plugin: 'dbtools'  // ... dbtools {

  type 'ANDROID-JAVA' // see options below 

basePackageName 'com.domain.package.database'
  outputSrcDir 'src/main/java/com/domain/package/database' 
}
 

After setting up gradle you can call the following methods

Method Description
dbtools-init Uses the schemaDir specified above to create a blank database schema file and xml xsd for auto-completion
dbtools-genclasses Uses the options specified above to generate the actual ORM objects in the outputSrcDir

Plugin Options

Key Values Description
type 'ANDROID-JAVA', 'ANDROID-KOTLIN', 'JPA', 'ANDROID-KOTLIN-ROOM' The type of DAO and ORM files to generate. Defaults to 'JPA'
schemaDir e.x. 'src/main/database' The directory the database schema file resides (or will be created with dbtools-init). Defaults to 'src/main/database'
schemaXMLFilename e.x. 'schema.xml' The name of the database schema file. Defaults to 'schema.xml'
basePackageDir e.x. 'com.dbtools.demo.database' The root package the generated DAO and ORM files have
outputSrcDir e.x. 'src/main/java/com/dbtools/demo/database' The directory associated with the basePackageDir
dateType 'JAVA-DATE', 'JODA', 'JSR-310' Specifies the format the Date fields should have. Defaults to 'JAVA-DATE'
injectionSupport true or false Adds annotated Injection ( @Inject) to the generated files. Defaults to false
jsr305Support true or false Adds annotated nullable ( @Nullable) and nonnull ( @NonNull) fields to the generated files. Defaults to false
sqlQueryBuilderSupport true or false Use DBTools-Query for generated queries and views. Defaults to false
includeDatabaseNameInPackage true or false Include the database name in the generated package and directories. Defaults to true
rxJavaSupport true or false Adds RxJava integration support. Defaults to false
javaEESupport true or false Adds JEE/Spring Transactional annotations to CRUD methods in BaseManager. Defaults to false

License

Copyright 2015 Jeff Campbell  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. 

Resources

Fetch is a simple yet powerful Android library that allows you to manage downloads more efficiently in your Android apps. It uses a background service on the device to download and maintain requests.

Features:

  • Simple and easy to use API.
  • Continuous downloading in the background.
  • Ability to pause and resume downloads.
  • Set the priority of a download request.
  • Ability to retry failed downloads.
  • Easy progress and status tracking.
  • And more...

Android android.graphics.Color has a function for color-parsing and supports basic colors of w3c.

This project is for supporting more color keywords. It's based on W3C's Expanded Color.

Viger - View Pager PDF OpenSource.

A SeekBar suited for showing a preview of something. As seen in Google Play Movies.

An Android DatePicker for Persian Calendar.

Implementation of credit card form in material design.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes