-
Notifications
You must be signed in to change notification settings - Fork 16
Annotations
The binding rules are defined through Java annotations. In this section there's a brief description of annotations defined in Kripton.
##Annotations for classes## You can decorate both class and field with generic and specific-format annotation. At class declaration's level it's possible to use the following annotation:
- @BindType: indicates class is binded. You have to use this annotation if you decorate same class with a specific-format binding annotation (i.e.: @BindTypeXml).
- @BindTable (Android platform): allow to define database name binded to annotated Java class.
- @BindSharedPreferences (Android platform): allow to create a Shared Preference linked to annotated Java class.
##Annotations for interfaces##
Kripton decorate interface to create SQLite database, DAO and its queries and SharedPreference.
- [[@BindDataSource|@BindDataSource] (Android platform): defines a data source based on SQLite database.
- [[@BindDao|@BindDao] (Android platform): defines a DAO to manage a specific database's table.
##Annotations for fields## You can decorate only fields. No setter or getter annotation is defined. You can decorate field regardless its accessor. The annotations are:
- @Bind: states field is binded. This contains generic information about field persistance.
-
@BindAdapter: allow to specify a custom type adapter for a specific field. For example,
@BindAdapter
can be used to persit aDate
field as along
. - @BindXml: contains informations about xml-persistence of field. It make possible to define how transform field in xml: tag, attribute or value of parent tag.
- @BindColumn: for a Java bean persisted on a SQLite database, this annotation allows to specify table column's features of a specific fields.
##Annotations for (interface) methods## There are some interface method's annotations:
- @SqlSelect: create a method to execute a SELECT SQL.
- @SqlInsert: create a method to execute a INSERT SQL.
- @SqlUpdate: create a method to execute a UPDATE SQL.
- @SqlDelete: create a method to execute a DELETE SQL.
##Annotations for (interface) method's parameters## There is only one annotations that you can use on method parameters:
- @SqlParam: allow to define SQL parameter name.
- Introduction
- Goals & Features
- Kotlin
- Immutable or Mutable Pojo
- Annotation Processor Args
- Credits
- Articles
- Benchmarks
- Setup
- Tutorial
- Usage
- Dependencies and inspirations
- Stackoverflow
- Documentation
- SQL logging
- Data source options
- Indices
- SQL Type adapter
- Global SQL Type adapter
- Constraints
- Live data: welcome Architectural components!!
- Paged Live data
- Dynamic parts
- Transactional and batch operations
- Async Transactional and batch operations
- Global transaction
- Support for immutable POJO
- Generate Content provider
- Generate Database schema generation
- Database migration
- BindSqlColumn
- BindContentProvider
- BindContentProviderEntry
- BindContentProviderPath
- BindDao
- BindDaoMany2Many
- BindDataSource
- BindDataSourceOptions
- BindDataSourceUpdateTask
- BindIndex
- BindSqlRelation
- BindSqlAdapter
- BindSqlChildSelect
- BindSqlDelete
- BindSqlDynamicOrderBy
- BindSqlDynamicWhere
- BindSqlDynamicWhereParams
- BindSqlInsert
- BindSqlPageSize
- BindSqlParam
- BindSqlSelect
- BindSqlUpdate
- BindSqlType
- BindSqlTransaction