Navigation :
Source code
Example of KittyORM logging setup:
1@KITTY_DATABASE(
2 isLoggingOn = true, // Base logging flag
3 isProductionOn = false, // Production logging flag
4 isKittyDexUtilLoggingEnabled = false, // dex logging flag
5 logTag = MigrationDBv3.LTAG, // log tag
6 databaseName = "mig", // database name
7 databaseVersion = 3, // database version
8 ...
9)
10
11public class MigrationDBv3 extends KittyDatabase {
12
13 public static final String LTAG = "MIGv3";
14
15 ...
16}
Example of KittyModel
implementaion toLogString()
method overload:
1@KITTY_TABLE
2public class SimpleExampleModel extends KittyModel {
3 public SimpleExampleModel() {
4 super();
5 }
6
7 @KITTY_COLUMN(
8 isIPK = true,
9 columnOrder = 0
10 )
11 public Long id;
12
13 @KITTY_COLUMN(columnOrder = 1)
14 public int randomInteger;
15
16 @KITTY_COLUMN(columnOrder = 2)
17 public String firstName;
18
19 @Override
20 public String toString() {
21 StringBuilder sb = new StringBuilder(64);
22 return sb.append("[ rowid = ")
23 .append(getRowID())
24 .append(" ; id = ")
25 .append(id)
26 .append(" ; randomInteger = ")
27 .append(randomInteger)
28 .append(" ; firstName = ")
29 .append(firstName)
30 .append(" ]")
31 .toString();
32 }
33
34 public String toLogString() {
35 return toString();
36 }
37}