Android Open Source - br.com.mirabilis.sqlite S Q Lite Annotation Field






From Project

Back to project page br.com.mirabilis.sqlite.

License

The source code is released under:

Apache License

If you think the Android project br.com.mirabilis.sqlite listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package br.com.mirabilis.sqlite.annotation.model;
//from   w  ww  .  j a  va 2s.  co  m
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import br.com.mirabilis.sqlite.manager.model.SQLiteEntity.SQLiteAction;
import br.com.mirabilis.sqlite.manager.model.SQLiteEntity.SQLiteForeignModifier;
import br.com.mirabilis.sqlite.manager.model.SQLiteField.SQLiteFieldType;
import br.com.mirabilis.sqlite.manager.model.SQLiteTable;

/**
 * Anottation of field sqlite.
 * 
 * @author Rodrigo Sim?es Rosa
 */
@Documented
@Target(value = { ElementType.FIELD })
@Retention(value = RetentionPolicy.RUNTIME)
public @interface SQLiteAnnotationField {

  /**
   * name field in sqlite.
   * 
   * @return
   */
  String name();

  /**
   * type field in sqlite.
   * 
   * @return
   */
  SQLiteFieldType type();

  /**
   * if field is primarykey in table.
   * 
   * @return
   */
  boolean primaryKey() default false;

  /**
   * if field is foreignkey in table. ** Only will be functional if set
   * reference.
   * 
   * @return
   */
  boolean foreignKey() default false;

  /**
   * reference of foreignkey.
   * 
   * @return
   */
  Class<? extends SQLiteTable> reference() default SQLiteTable.class;

  /**
   * modifier of foreign key.
   * 
   * @return
   */
  SQLiteForeignModifier foreignKeyModifier() default SQLiteForeignModifier.RESTRICT;

  /**
   * not null in field.
   * 
   * @return
   */
  boolean notNull() default false;

  /**
   * autoincrement in field.
   * 
   * @return
   */
  boolean autoIncrement() default false;

  /**
   * action in field foreignkey
   * 
   * @return
   */
  SQLiteAction action() default SQLiteAction.ON_DELETE;
}




Java Source Code List

br.com.mirabilis.sample.BuildConfig.java
br.com.mirabilis.sample.MainActivity.java
br.com.mirabilis.sqlite.BuildConfig.java
br.com.mirabilis.sqlite.BuildConfig.java
br.com.mirabilis.sqlite.annotation.SQLiteParseAnnotation.java
br.com.mirabilis.sqlite.annotation.model.SQLiteAnnotationEntity.java
br.com.mirabilis.sqlite.annotation.model.SQLiteAnnotationField.java
br.com.mirabilis.sqlite.cypher.CypherFileManager.java
br.com.mirabilis.sqlite.manager.core.SQLiteConnection.java
br.com.mirabilis.sqlite.manager.core.SQLiteCore.java
br.com.mirabilis.sqlite.manager.dao.DAO.java
br.com.mirabilis.sqlite.manager.dao.SQLiteDAO.java
br.com.mirabilis.sqlite.manager.dao.util.SQLiteDataManager.java
br.com.mirabilis.sqlite.manager.dao.util.SQLiteDataType.java
br.com.mirabilis.sqlite.manager.exception.SQLiteEmptyException.java
br.com.mirabilis.sqlite.manager.exception.SQLiteException.java
br.com.mirabilis.sqlite.manager.exception.SQLiteNotNullFieldException.java
br.com.mirabilis.sqlite.manager.model.SQLiteEntity.java
br.com.mirabilis.sqlite.manager.model.SQLiteField.java
br.com.mirabilis.sqlite.manager.model.SQLiteTable.java
br.com.mirabilis.sqlite.manager.util.SQLiteDatabaseFile.java
br.com.mirabilis.sqlite.view.SqliteActivity.java