Skip to content

Commit

Permalink
release 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
xcesco committed Sep 6, 2017
1 parent f5b7030 commit d03a972
Show file tree
Hide file tree
Showing 81 changed files with 2,272 additions and 223 deletions.
4 changes: 2 additions & 2 deletions Kripton/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<groupId>com.abubusoft</groupId>
<artifactId>kripton</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
<packaging>jar</packaging>

<description>Kripton Persistence Library</description>
Expand All @@ -37,7 +37,7 @@
<java.version>1.7</java.version>

<!-- dependencies version -->
<jackson.version>2.8.9</jackson.version>
<jackson.version>2.9.0</jackson.version>
<retrofit.version>2.1.0</retrofit.version>

<kripton.debug>false</kripton.debug>
Expand Down
4 changes: 2 additions & 2 deletions KriptonAndroidLibrary/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<groupId>com.abubusoft</groupId>
<artifactId>kripton-android-library</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
<packaging>jar</packaging>

<description>Kripton Persistence Library for Android platform</description>
Expand All @@ -39,7 +39,7 @@
<java.version>1.7</java.version>

<!-- dependencies version -->
<jackson.version>2.8.9</jackson.version>
<jackson.version>2.9.0</jackson.version>
<retrofit.version>2.1.0</retrofit.version>

<kripton.debug>false</kripton.debug>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ public int insertBean1(Channel bean) {

/**
* <p>SQL insert:</p>
* <pre>INSERT INTO channel (uid, owner_uid, update_time, name) VALUES (${arg.uid}, ${arg.ownerUid}, ${arg.updateTime}, ${arg.name})</pre>
* <pre>INSERT INTO channel (uid, owner_uid, update_time, name) VALUES (${bean.uid}, ${bean.ownerUid}, ${bean.updateTime}, ${bean.name})</pre>
*
* <p><code>arg.id</code> is automatically updated because it is the primary key</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,13 @@ public List<Person> selectExcludeOne() {

/**
* <p>SQL insert:</p>
* <pre>INSERT INTO person (name) VALUES (${bean.name})</pre>
* <pre>INSERT INTO person (name, id) VALUES (${bean.name}, ${bean.id})</pre>
*
* <p><code>bean.id</code> is automatically updated because it is the primary key</p>
*
* <p><strong>Inserted columns:</strong></p>
* <dl>
* <dt>id</dt><dd>is mapped to <strong>${bean.id}</strong></dd>
* <dt>name</dt><dd>is mapped to <strong>${bean.name}</strong></dd>
* </dl>
*
Expand All @@ -203,6 +204,7 @@ public void insertIncludeOne(Person bean) {
} else {
contentValues.putNull("name");
}
contentValues.put("id", bean.id);

// log for insert -- BEGIN
StringBuffer _columnNameBuffer=new StringBuffer();
Expand Down Expand Up @@ -310,6 +312,7 @@ public void insertExcludeOne(Person bean) {
*
* <h2>Updated columns:</h2>
* <dl>
* <dt>id</dt><dd>is mapped to <strong>${bean.id}</strong></dd>
* <dt>name</dt><dd>is mapped to <strong>${bean.name}</strong></dd>
* </dl>
*
Expand All @@ -326,6 +329,7 @@ public void updateIncludeOne(Person bean) {
} else {
contentValues.putNull("name");
}
contentValues.put("id", bean.id);

ArrayList<String> _sqlWhereParams=getWhereParamsArray();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public class BeanA_1Table {
* DDL to create table bean_a_1
* </p>
*
* <pre>CREATE TABLE bean_a_1 (id INTEGER PRIMARY KEY AUTOINCREMENT, bean_a2_id INTEGER, value_string TEXT, FOREIGN KEY(bean_a2_id) REFERENCES bean_a_2(pk));</pre>
* <pre>CREATE TABLE bean_a_1 (id INTEGER PRIMARY KEY AUTOINCREMENT, bean_a2_id INTEGER, value_string TEXT, FOREIGN KEY(bean_a2_id) REFERENCES bean_a_2(id));</pre>
*/
public static final String CREATE_TABLE_SQL = "CREATE TABLE bean_a_1 (id INTEGER PRIMARY KEY AUTOINCREMENT, bean_a2_id INTEGER, value_string TEXT, FOREIGN KEY(bean_a2_id) REFERENCES bean_a_2(pk));";
public static final String CREATE_TABLE_SQL = "CREATE TABLE bean_a_1 (id INTEGER PRIMARY KEY AUTOINCREMENT, bean_a2_id INTEGER, value_string TEXT, FOREIGN KEY(bean_a2_id) REFERENCES bean_a_2(id));";

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@BindType
public class BeanA_2 {

@BindColumn(value="pk", columnType=ColumnType.PRIMARY_KEY)
@BindColumn(columnType=ColumnType.PRIMARY_KEY)
public long id;

public String valueString2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public class BeanA_2Table {
* DDL to create table bean_a_2
* </p>
*
* <pre>CREATE TABLE bean_a_2 (pk INTEGER PRIMARY KEY AUTOINCREMENT, value_string2 TEXT);</pre>
* <pre>CREATE TABLE bean_a_2 (id INTEGER PRIMARY KEY AUTOINCREMENT, value_string2 TEXT);</pre>
*/
public static final String CREATE_TABLE_SQL = "CREATE TABLE bean_a_2 (pk INTEGER PRIMARY KEY AUTOINCREMENT, value_string2 TEXT);";
public static final String CREATE_TABLE_SQL = "CREATE TABLE bean_a_2 (id INTEGER PRIMARY KEY AUTOINCREMENT, value_string2 TEXT);";

/**
* <p>
Expand All @@ -34,11 +34,11 @@ public class BeanA_2Table {
public static final String DROP_TABLE_SQL = "DROP TABLE IF EXISTS bean_a_2;";

/**
* Entity's property <code>id</code> is associated to table column <code>pk</code>. This costant represents column name.
* Entity's property <code>id</code> is associated to table column <code>id</code>. This costant represents column name.
*
* @see BeanA_2#id
*/
public static final String COLUMN_ID = "pk";
public static final String COLUMN_ID = "id";

/**
* Entity's property <code>valueString2</code> is associated to table column <code>value_string2</code>. This costant represents column name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
*******************************************************************************/
package sqlite.feature.foreignKey;

import com.abubusoft.kripton.android.ColumnType;
import com.abubusoft.kripton.android.annotation.BindColumn;
import com.abubusoft.kripton.annotation.BindType;


@BindType
public class BeanA_4 {

@BindColumn(value="pk")
public long id;

@BindColumn(foreignKey=BeanA_3.class, nullable=false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public class BeanA_4Table {
* DDL to create table bean_a_4
* </p>
*
* <pre>CREATE TABLE bean_a_4 (id INTEGER PRIMARY KEY AUTOINCREMENT, bean_a2_id INTEGER NOT NULL, value_string TEXT, FOREIGN KEY(bean_a2_id) REFERENCES bean_a_3(pk));</pre>
* <pre>CREATE TABLE bean_a_4 (pk INTEGER PRIMARY KEY AUTOINCREMENT, bean_a2_id INTEGER NOT NULL, value_string TEXT, FOREIGN KEY(bean_a2_id) REFERENCES bean_a_3(pk));</pre>
*/
public static final String CREATE_TABLE_SQL = "CREATE TABLE bean_a_4 (id INTEGER PRIMARY KEY AUTOINCREMENT, bean_a2_id INTEGER NOT NULL, value_string TEXT, FOREIGN KEY(bean_a2_id) REFERENCES bean_a_3(pk));";
public static final String CREATE_TABLE_SQL = "CREATE TABLE bean_a_4 (pk INTEGER PRIMARY KEY AUTOINCREMENT, bean_a2_id INTEGER NOT NULL, value_string TEXT, FOREIGN KEY(bean_a2_id) REFERENCES bean_a_3(pk));";

/**
* <p>
Expand All @@ -34,11 +34,11 @@ public class BeanA_4Table {
public static final String DROP_TABLE_SQL = "DROP TABLE IF EXISTS bean_a_4;";

/**
* Entity's property <code>id</code> is associated to table column <code>id</code>. This costant represents column name.
* Entity's property <code>id</code> is associated to table column <code>pk</code>. This costant represents column name.
*
* @see BeanA_4#id
*/
public static final String COLUMN_ID = "id";
public static final String COLUMN_ID = "pk";

/**
* Entity's property <code>beanA2Id</code> is associated to table column <code>bean_a2_id</code>. This costant represents column name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public DaoBeanA_2Impl(BindDummyDataSource dataSet) {
/**
* <h2>Select SQL:</h2>
*
* <pre>SELECT pk, value_string2 FROM bean_a_2</pre>
* <pre>SELECT id, value_string2 FROM bean_a_2</pre>
*
* <h2>Projected columns:</h2>
* <dl>
* <dt>pk</dt><dd>is associated to bean's property <strong>id</strong></dd>
* <dt>id</dt><dd>is associated to bean's property <strong>id</strong></dd>
* <dt>value_string2</dt><dd>is associated to bean's property <strong>valueString2</strong></dd>
* </dl>
*
Expand All @@ -40,7 +40,7 @@ public DaoBeanA_2Impl(BindDummyDataSource dataSet) {
@Override
public List<BeanA_2> selectAll() {
StringBuilder _sqlBuilder=getSQLStringBuilder();
_sqlBuilder.append("SELECT pk, value_string2 FROM bean_a_2");
_sqlBuilder.append("SELECT id, value_string2 FROM bean_a_2");
// generation CODE_001 -- BEGIN
// generation CODE_001 -- END
ArrayList<String> _sqlWhereParams=getWhereParamsArray();
Expand All @@ -66,7 +66,7 @@ public List<BeanA_2> selectAll() {

if (cursor.moveToFirst()) {

int index0=cursor.getColumnIndex("pk");
int index0=cursor.getColumnIndex("id");
int index1=cursor.getColumnIndex("value_string2");

do
Expand All @@ -87,11 +87,11 @@ public List<BeanA_2> selectAll() {
/**
* <h2>Select SQL:</h2>
*
* <pre>SELECT pk, value_string2 FROM bean_a_2 WHERE pk=${id}</pre>
* <pre>SELECT id, value_string2 FROM bean_a_2 WHERE id=${id}</pre>
*
* <h2>Projected columns:</h2>
* <dl>
* <dt>pk</dt><dd>is associated to bean's property <strong>id</strong></dd>
* <dt>id</dt><dd>is associated to bean's property <strong>id</strong></dd>
* <dt>value_string2</dt><dd>is associated to bean's property <strong>valueString2</strong></dd>
* </dl>
*
Expand All @@ -107,15 +107,15 @@ public List<BeanA_2> selectAll() {
@Override
public List<BeanA_2> selectById(long id) {
StringBuilder _sqlBuilder=getSQLStringBuilder();
_sqlBuilder.append("SELECT pk, value_string2 FROM bean_a_2");
_sqlBuilder.append("SELECT id, value_string2 FROM bean_a_2");
// generation CODE_001 -- BEGIN
// generation CODE_001 -- END
ArrayList<String> _sqlWhereParams=getWhereParamsArray();

// manage WHERE arguments -- BEGIN

// manage WHERE statement
String _sqlWhereStatement=" WHERE pk=?";
String _sqlWhereStatement=" WHERE id=?";
_sqlBuilder.append(_sqlWhereStatement);

// manage WHERE arguments -- END
Expand All @@ -141,7 +141,7 @@ public List<BeanA_2> selectById(long id) {

if (cursor.moveToFirst()) {

int index0=cursor.getColumnIndex("pk");
int index0=cursor.getColumnIndex("id");
int index1=cursor.getColumnIndex("value_string2");

do
Expand All @@ -162,11 +162,11 @@ public List<BeanA_2> selectById(long id) {
/**
* <h2>Select SQL:</h2>
*
* <pre>SELECT pk FROM bean_a_2 WHERE value_string2=${dummy}</pre>
* <pre>SELECT id FROM bean_a_2 WHERE value_string2=${dummy}</pre>
*
* <h2>Projected columns:</h2>
* <dl>
* <dt>pk</dt><dd>is associated to bean's property <strong>id</strong></dd>
* <dt>id</dt><dd>is associated to bean's property <strong>id</strong></dd>
* </dl>
*
* <h2>Query's parameters:</h2>
Expand All @@ -181,7 +181,7 @@ public List<BeanA_2> selectById(long id) {
@Override
public List<BeanA_2> selectByString(String value) {
StringBuilder _sqlBuilder=getSQLStringBuilder();
_sqlBuilder.append("SELECT pk FROM bean_a_2");
_sqlBuilder.append("SELECT id FROM bean_a_2");
// generation CODE_001 -- BEGIN
// generation CODE_001 -- END
ArrayList<String> _sqlWhereParams=getWhereParamsArray();
Expand Down Expand Up @@ -215,7 +215,7 @@ public List<BeanA_2> selectByString(String value) {

if (cursor.moveToFirst()) {

int index0=cursor.getColumnIndex("pk");
int index0=cursor.getColumnIndex("id");

do
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public DaoBeanA_4Impl(BindDummy2DataSource dataSet) {
/**
* <h2>Select SQL:</h2>
*
* <pre>SELECT id, bean_a2_id, value_string FROM bean_a_4</pre>
* <pre>SELECT pk, bean_a2_id, value_string FROM bean_a_4</pre>
*
* <h2>Projected columns:</h2>
* <dl>
* <dt>id</dt><dd>is associated to bean's property <strong>id</strong></dd>
* <dt>pk</dt><dd>is associated to bean's property <strong>id</strong></dd>
* <dt>bean_a2_id</dt><dd>is associated to bean's property <strong>beanA2Id</strong></dd>
* <dt>value_string</dt><dd>is associated to bean's property <strong>valueString</strong></dd>
* </dl>
Expand All @@ -41,7 +41,7 @@ public DaoBeanA_4Impl(BindDummy2DataSource dataSet) {
@Override
public List<BeanA_4> selectAll() {
StringBuilder _sqlBuilder=getSQLStringBuilder();
_sqlBuilder.append("SELECT id, bean_a2_id, value_string FROM bean_a_4");
_sqlBuilder.append("SELECT pk, bean_a2_id, value_string FROM bean_a_4");
// generation CODE_001 -- BEGIN
// generation CODE_001 -- END
ArrayList<String> _sqlWhereParams=getWhereParamsArray();
Expand All @@ -67,7 +67,7 @@ public List<BeanA_4> selectAll() {

if (cursor.moveToFirst()) {

int index0=cursor.getColumnIndex("id");
int index0=cursor.getColumnIndex("pk");
int index1=cursor.getColumnIndex("bean_a2_id");
int index2=cursor.getColumnIndex("value_string");

Expand All @@ -90,11 +90,11 @@ public List<BeanA_4> selectAll() {
/**
* <h2>Select SQL:</h2>
*
* <pre>SELECT id, bean_a2_id, value_string FROM bean_a_4 WHERE id=${id}</pre>
* <pre>SELECT pk, bean_a2_id, value_string FROM bean_a_4 WHERE pk=${id}</pre>
*
* <h2>Projected columns:</h2>
* <dl>
* <dt>id</dt><dd>is associated to bean's property <strong>id</strong></dd>
* <dt>pk</dt><dd>is associated to bean's property <strong>id</strong></dd>
* <dt>bean_a2_id</dt><dd>is associated to bean's property <strong>beanA2Id</strong></dd>
* <dt>value_string</dt><dd>is associated to bean's property <strong>valueString</strong></dd>
* </dl>
Expand All @@ -111,15 +111,15 @@ public List<BeanA_4> selectAll() {
@Override
public List<BeanA_4> selectById(long id) {
StringBuilder _sqlBuilder=getSQLStringBuilder();
_sqlBuilder.append("SELECT id, bean_a2_id, value_string FROM bean_a_4");
_sqlBuilder.append("SELECT pk, bean_a2_id, value_string FROM bean_a_4");
// generation CODE_001 -- BEGIN
// generation CODE_001 -- END
ArrayList<String> _sqlWhereParams=getWhereParamsArray();

// manage WHERE arguments -- BEGIN

// manage WHERE statement
String _sqlWhereStatement=" WHERE id=?";
String _sqlWhereStatement=" WHERE pk=?";
_sqlBuilder.append(_sqlWhereStatement);

// manage WHERE arguments -- END
Expand All @@ -145,7 +145,7 @@ public List<BeanA_4> selectById(long id) {

if (cursor.moveToFirst()) {

int index0=cursor.getColumnIndex("id");
int index0=cursor.getColumnIndex("pk");
int index1=cursor.getColumnIndex("bean_a2_id");
int index2=cursor.getColumnIndex("value_string");

Expand All @@ -168,11 +168,11 @@ public List<BeanA_4> selectById(long id) {
/**
* <h2>Select SQL:</h2>
*
* <pre>SELECT id FROM bean_a_4 WHERE value_string=${dummy}</pre>
* <pre>SELECT pk FROM bean_a_4 WHERE value_string=${dummy}</pre>
*
* <h2>Projected columns:</h2>
* <dl>
* <dt>id</dt><dd>is associated to bean's property <strong>id</strong></dd>
* <dt>pk</dt><dd>is associated to bean's property <strong>id</strong></dd>
* </dl>
*
* <h2>Query's parameters:</h2>
Expand All @@ -187,7 +187,7 @@ public List<BeanA_4> selectById(long id) {
@Override
public List<BeanA_4> selectByString(String value) {
StringBuilder _sqlBuilder=getSQLStringBuilder();
_sqlBuilder.append("SELECT id FROM bean_a_4");
_sqlBuilder.append("SELECT pk FROM bean_a_4");
// generation CODE_001 -- BEGIN
// generation CODE_001 -- END
ArrayList<String> _sqlWhereParams=getWhereParamsArray();
Expand Down Expand Up @@ -221,7 +221,7 @@ public List<BeanA_4> selectByString(String value) {

if (cursor.moveToFirst()) {

int index0=cursor.getColumnIndex("id");
int index0=cursor.getColumnIndex("pk");

do
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public List<Person> selectById(Person bean) {

/**
* <p>SQL insert:</p>
* <pre>INSERT INTO person (name, surname, birth_city, birth_day) VALUES (${bean.name}, ${bean.surname}, ${bean.birthCity}, ${bean.birthDay})</pre>
* <pre>INSERT INTO person (name, surname, birth_city, birth_day) VALUES (${name}, ${surname}, ${birthCity}, ${birthDay})</pre>
*
* <p><code>bean.id</code> is automatically updated because it is the primary key</p>
*
Expand Down
Loading

0 comments on commit d03a972

Please sign in to comment.