Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
supplier
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王宇航
supplier
Commits
b6bfdbd5
Commit
b6bfdbd5
authored
Oct 24, 2020
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.0.9
parent
5aab5e4e
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
0 additions
and
4278 deletions
+0
-4278
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SingleClick.java
+0
-17
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SingleClickAspect.java
+0
-59
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SwitchPrintAspect.java
+0
-61
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SwitchPrintMethod.java
+0
-15
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ColorBeanDao.java
+0
-202
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ComboItemDao.java
+0
-259
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DaoMaster.java
+0
-132
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DaoSession.java
+0
-216
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DiscountDao.java
+0
-201
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ExpandInfoDao.java
+0
-233
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodComboDao.java
+0
-242
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodDao.java
+0
-647
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodModifierDao.java
+0
-271
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FunctionDao.java
+0
-193
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/LanguageDao.java
+0
-135
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ModifierDao.java
+0
-515
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrintCurrencyBeanDao.java
+0
-295
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrintModelBeanDao.java
+0
-163
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrinterDeviceBeanDao.java
+0
-421
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/SoldoutCtrlActivity.java
+0
-1
No files found.
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SingleClick.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
aspectj
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* Created by Wyh on 2020/2/29.
* 雙擊檢測
*/
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
(
ElementType
.
METHOD
)
public
@interface
SingleClick
{
/* 点击间隔时间 */
long
value
()
default
1000
;
}
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SingleClickAspect.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
aspectj
;
import
android.util.Log
;
import
android.view.View
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Pointcut
;
import
org.aspectj.lang.reflect.MethodSignature
;
import
java.lang.reflect.Method
;
/**
* Created by Wyh on 2020/2/29.
*/
@Aspect
public
class
SingleClickAspect
{
private
static
final
long
DEFAULT_TIME_INTERVAL
=
5000
;
/**
* 定义切点,标记切点为所有被@SingleClick注解的方法
* 注意:这里me.baron.test.annotation.SingleClick需要替换成
* 你自己项目中SingleClick这个类的全路径哦
*/
@Pointcut
(
"execution(@com.gingersoft.gsa.cloud.aspectj.SingleClick * *(..))"
)
public
void
methodAnnotated
()
{
}
/**
* 定义一个切面方法,包裹切点方法
*/
@Around
(
"methodAnnotated()"
)
public
void
aroundJoinPoint
(
ProceedingJoinPoint
joinPoint
)
throws
Throwable
{
// 取出方法的参数
View
view
=
null
;
for
(
Object
arg
:
joinPoint
.
getArgs
())
{
if
(
arg
instanceof
View
)
{
view
=
(
View
)
arg
;
break
;
}
}
if
(
view
==
null
)
{
return
;
}
// 取出方法的注解
MethodSignature
methodSignature
=
(
MethodSignature
)
joinPoint
.
getSignature
();
Method
method
=
methodSignature
.
getMethod
();
if
(!
method
.
isAnnotationPresent
(
SingleClick
.
class
))
{
return
;
}
SingleClick
singleClick
=
method
.
getAnnotation
(
SingleClick
.
class
);
// 判断是否快速点击
if
(!
XClickUtil
.
isFastDoubleClick
(
view
,
singleClick
.
value
()))
{
// 不是快速点击,执行原方法
joinPoint
.
proceed
();
}
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SwitchPrintAspect.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
aspectj
;
import
android.app.Dialog
;
import
android.view.View
;
import
com.gingersoft.gsa.cloud.base.R
;
import
com.gingersoft.gsa.cloud.base.utils.other.SPUtils
;
import
com.gingersoft.gsa.cloud.base.widget.DialogUtils
;
import
com.gingersoft.gsa.cloud.constans.PrintConstans
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Pointcut
;
/**
* Created by Wyh on 2020/3/2.
* 組件化使用Aspect有問題。
*/
@Aspect
public
class
SwitchPrintAspect
{
/**
* 定义切点,标记切点为所有被@SwitchPrintMethod注解的方法
*/
@Pointcut
(
"execution(@com.gingersoft.gsa.cloud.aspectj.SwitchPrintMethod * *(..))"
)
public
void
methodAnnotated
()
{
}
/**
* 定义一个切面方法,包裹切点方法
*/
@Around
(
"methodAnnotated()"
)
public
void
aroundJoinPoint
(
ProceedingJoinPoint
joinPoint
)
{
// 取出方法的参数
View
view
=
null
;
for
(
Object
arg
:
joinPoint
.
getArgs
())
{
if
(
arg
instanceof
View
)
{
view
=
(
View
)
arg
;
break
;
}
}
if
(
view
==
null
||
view
.
getContext
()
==
null
)
{
return
;
}
// 顯示切換打印方式的彈窗
new
DialogUtils
(
view
.
getContext
(),
R
.
layout
.
print_select_print_method
)
{
@Override
public
void
initLayout
(
ViewHepler
hepler
,
Dialog
dialog
)
{
hepler
.
setViewClick
(
R
.
id
.
local_print
,
v
->
{
SPUtils
.
put
(
dialog
.
getContext
(),
PrintConstans
.
DEFAULT_PRINT_METHOD
,
PrintConstans
.
LOCAL_PRINT
);
dialog
.
dismiss
();
});
hepler
.
setViewClick
(
R
.
id
.
internet_print
,
v
->
{
SPUtils
.
put
(
dialog
.
getContext
(),
PrintConstans
.
DEFAULT_PRINT_METHOD
,
PrintConstans
.
IP_PRINT
);
dialog
.
dismiss
();
});
}
}.
show
();
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SwitchPrintMethod.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
aspectj
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* Created by Wyh on 2020/3/2.
* 切換默認打印方式
*/
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
(
ElementType
.
METHOD
)
public
@interface
SwitchPrintMethod
{
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ColorBeanDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.ColorBean
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "COLOR_BEAN".
*/
public
class
ColorBeanDao
extends
AbstractDao
<
ColorBean
,
Void
>
{
public
static
final
String
TABLENAME
=
"COLOR_BEAN"
;
/**
* Properties of entity ColorBean.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
ColorId
=
new
Property
(
0
,
int
.
class
,
"colorId"
,
false
,
"COLOR_ID"
);
public
final
static
Property
ColorStart
=
new
Property
(
1
,
String
.
class
,
"colorStart"
,
false
,
"COLOR_START"
);
public
final
static
Property
ColorStop
=
new
Property
(
2
,
String
.
class
,
"colorStop"
,
false
,
"COLOR_STOP"
);
public
final
static
Property
FontColor
=
new
Property
(
3
,
String
.
class
,
"fontColor"
,
false
,
"FONT_COLOR"
);
public
final
static
Property
AndroidColor
=
new
Property
(
4
,
String
.
class
,
"androidColor"
,
false
,
"ANDROID_COLOR"
);
public
final
static
Property
AndroidFontColor
=
new
Property
(
5
,
String
.
class
,
"androidFontColor"
,
false
,
"ANDROID_FONT_COLOR"
);
public
final
static
Property
CreateTime
=
new
Property
(
6
,
String
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
EditTime
=
new
Property
(
7
,
String
.
class
,
"editTime"
,
false
,
"EDIT_TIME"
);
}
public
ColorBeanDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
ColorBeanDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"COLOR_BEAN\" ("
+
//
"\"COLOR_ID\" INTEGER NOT NULL ,"
+
// 0: colorId
"\"COLOR_START\" TEXT,"
+
// 1: colorStart
"\"COLOR_STOP\" TEXT,"
+
// 2: colorStop
"\"FONT_COLOR\" TEXT,"
+
// 3: fontColor
"\"ANDROID_COLOR\" TEXT,"
+
// 4: androidColor
"\"ANDROID_FONT_COLOR\" TEXT,"
+
// 5: androidFontColor
"\"CREATE_TIME\" TEXT,"
+
// 6: createTime
"\"EDIT_TIME\" TEXT);"
);
// 7: editTime
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"COLOR_BEAN\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
ColorBean
entity
)
{
stmt
.
clearBindings
();
stmt
.
bindLong
(
1
,
entity
.
getColorId
());
String
colorStart
=
entity
.
getColorStart
();
if
(
colorStart
!=
null
)
{
stmt
.
bindString
(
2
,
colorStart
);
}
String
colorStop
=
entity
.
getColorStop
();
if
(
colorStop
!=
null
)
{
stmt
.
bindString
(
3
,
colorStop
);
}
String
fontColor
=
entity
.
getFontColor
();
if
(
fontColor
!=
null
)
{
stmt
.
bindString
(
4
,
fontColor
);
}
String
androidColor
=
entity
.
getAndroidColor
();
if
(
androidColor
!=
null
)
{
stmt
.
bindString
(
5
,
androidColor
);
}
String
androidFontColor
=
entity
.
getAndroidFontColor
();
if
(
androidFontColor
!=
null
)
{
stmt
.
bindString
(
6
,
androidFontColor
);
}
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
7
,
createTime
);
}
String
editTime
=
entity
.
getEditTime
();
if
(
editTime
!=
null
)
{
stmt
.
bindString
(
8
,
editTime
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
ColorBean
entity
)
{
stmt
.
clearBindings
();
stmt
.
bindLong
(
1
,
entity
.
getColorId
());
String
colorStart
=
entity
.
getColorStart
();
if
(
colorStart
!=
null
)
{
stmt
.
bindString
(
2
,
colorStart
);
}
String
colorStop
=
entity
.
getColorStop
();
if
(
colorStop
!=
null
)
{
stmt
.
bindString
(
3
,
colorStop
);
}
String
fontColor
=
entity
.
getFontColor
();
if
(
fontColor
!=
null
)
{
stmt
.
bindString
(
4
,
fontColor
);
}
String
androidColor
=
entity
.
getAndroidColor
();
if
(
androidColor
!=
null
)
{
stmt
.
bindString
(
5
,
androidColor
);
}
String
androidFontColor
=
entity
.
getAndroidFontColor
();
if
(
androidFontColor
!=
null
)
{
stmt
.
bindString
(
6
,
androidFontColor
);
}
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
7
,
createTime
);
}
String
editTime
=
entity
.
getEditTime
();
if
(
editTime
!=
null
)
{
stmt
.
bindString
(
8
,
editTime
);
}
}
@Override
public
Void
readKey
(
Cursor
cursor
,
int
offset
)
{
return
null
;
}
@Override
public
ColorBean
readEntity
(
Cursor
cursor
,
int
offset
)
{
ColorBean
entity
=
new
ColorBean
(
//
cursor
.
getInt
(
offset
+
0
),
// colorId
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getString
(
offset
+
1
),
// colorStart
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
),
// colorStop
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getString
(
offset
+
3
),
// fontColor
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
),
// androidColor
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// androidFontColor
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// createTime
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
)
// editTime
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
ColorBean
entity
,
int
offset
)
{
entity
.
setColorId
(
cursor
.
getInt
(
offset
+
0
));
entity
.
setColorStart
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getString
(
offset
+
1
));
entity
.
setColorStop
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
entity
.
setFontColor
(
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getString
(
offset
+
3
));
entity
.
setAndroidColor
(
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
));
entity
.
setAndroidFontColor
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setEditTime
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
}
@Override
protected
final
Void
updateKeyAfterInsert
(
ColorBean
entity
,
long
rowId
)
{
// Unsupported or missing PK type
return
null
;
}
@Override
public
Void
getKey
(
ColorBean
entity
)
{
return
null
;
}
@Override
public
boolean
hasKey
(
ColorBean
entity
)
{
// TODO
return
false
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ComboItemDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.ComboItem
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "COMBO_ITEM".
*/
public
class
ComboItemDao
extends
AbstractDao
<
ComboItem
,
Long
>
{
public
static
final
String
TABLENAME
=
"COMBO_ITEM"
;
/**
* Properties of entity ComboItem.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
true
,
"_id"
);
public
final
static
Property
ComId
=
new
Property
(
1
,
Long
.
class
,
"comId"
,
false
,
"COM_ID"
);
public
final
static
Property
Fid
=
new
Property
(
2
,
Long
.
class
,
"fid"
,
false
,
"FID"
);
public
final
static
Property
Qty
=
new
Property
(
3
,
long
.
class
,
"qty"
,
false
,
"QTY"
);
public
final
static
Property
DiffAmt
=
new
Property
(
4
,
double
.
class
,
"diffAmt"
,
false
,
"DIFF_AMT"
);
public
final
static
Property
SeqNo
=
new
Property
(
5
,
long
.
class
,
"seqNo"
,
false
,
"SEQ_NO"
);
public
final
static
Property
Visible
=
new
Property
(
6
,
long
.
class
,
"visible"
,
false
,
"VISIBLE"
);
public
final
static
Property
CreateTime
=
new
Property
(
7
,
java
.
util
.
Date
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
CreateBy
=
new
Property
(
8
,
String
.
class
,
"createBy"
,
false
,
"CREATE_BY"
);
public
final
static
Property
UpdateTime
=
new
Property
(
9
,
java
.
util
.
Date
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
Conditions
=
new
Property
(
10
,
long
.
class
,
"conditions"
,
false
,
"CONDITIONS"
);
public
final
static
Property
IsRT
=
new
Property
(
11
,
long
.
class
,
"isRT"
,
false
,
"IS_RT"
);
public
final
static
Property
Deletes
=
new
Property
(
12
,
byte
.
class
,
"deletes"
,
false
,
"DELETES"
);
public
final
static
Property
PosId
=
new
Property
(
13
,
long
.
class
,
"posId"
,
false
,
"POS_ID"
);
public
final
static
Property
Restaurant_id
=
new
Property
(
14
,
long
.
class
,
"restaurant_id"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
IsMainAccount
=
new
Property
(
15
,
byte
.
class
,
"isMainAccount"
,
false
,
"IS_MAIN_ACCOUNT"
);
public
final
static
Property
PrintSeting
=
new
Property
(
16
,
String
.
class
,
"printSeting"
,
false
,
"PRINT_SETING"
);
}
public
ComboItemDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
ComboItemDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"COMBO_ITEM\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: id
"\"COM_ID\" INTEGER,"
+
// 1: comId
"\"FID\" INTEGER,"
+
// 2: fid
"\"QTY\" INTEGER NOT NULL ,"
+
// 3: qty
"\"DIFF_AMT\" REAL NOT NULL ,"
+
// 4: diffAmt
"\"SEQ_NO\" INTEGER NOT NULL ,"
+
// 5: seqNo
"\"VISIBLE\" INTEGER NOT NULL ,"
+
// 6: visible
"\"CREATE_TIME\" INTEGER,"
+
// 7: createTime
"\"CREATE_BY\" TEXT,"
+
// 8: createBy
"\"UPDATE_TIME\" INTEGER,"
+
// 9: updateTime
"\"CONDITIONS\" INTEGER NOT NULL ,"
+
// 10: conditions
"\"IS_RT\" INTEGER NOT NULL ,"
+
// 11: isRT
"\"DELETES\" INTEGER NOT NULL ,"
+
// 12: deletes
"\"POS_ID\" INTEGER NOT NULL ,"
+
// 13: posId
"\"RESTAURANT_ID\" INTEGER NOT NULL ,"
+
// 14: restaurant_id
"\"IS_MAIN_ACCOUNT\" INTEGER NOT NULL ,"
+
// 15: isMainAccount
"\"PRINT_SETING\" TEXT);"
);
// 16: printSeting
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"COMBO_ITEM\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
ComboItem
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
comId
=
entity
.
getComId
();
if
(
comId
!=
null
)
{
stmt
.
bindLong
(
2
,
comId
);
}
Long
fid
=
entity
.
getFid
();
if
(
fid
!=
null
)
{
stmt
.
bindLong
(
3
,
fid
);
}
stmt
.
bindLong
(
4
,
entity
.
getQty
());
stmt
.
bindDouble
(
5
,
entity
.
getDiffAmt
());
stmt
.
bindLong
(
6
,
entity
.
getSeqNo
());
stmt
.
bindLong
(
7
,
entity
.
getVisible
());
java
.
util
.
Date
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
8
,
createTime
.
getTime
());
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
9
,
createBy
);
}
java
.
util
.
Date
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
10
,
updateTime
.
getTime
());
}
stmt
.
bindLong
(
11
,
entity
.
getConditions
());
stmt
.
bindLong
(
12
,
entity
.
getIsRT
());
stmt
.
bindLong
(
13
,
entity
.
getDeletes
());
stmt
.
bindLong
(
14
,
entity
.
getPosId
());
stmt
.
bindLong
(
15
,
entity
.
getRestaurant_id
());
stmt
.
bindLong
(
16
,
entity
.
getIsMainAccount
());
String
printSeting
=
entity
.
getPrintSeting
();
if
(
printSeting
!=
null
)
{
stmt
.
bindString
(
17
,
printSeting
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
ComboItem
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
comId
=
entity
.
getComId
();
if
(
comId
!=
null
)
{
stmt
.
bindLong
(
2
,
comId
);
}
Long
fid
=
entity
.
getFid
();
if
(
fid
!=
null
)
{
stmt
.
bindLong
(
3
,
fid
);
}
stmt
.
bindLong
(
4
,
entity
.
getQty
());
stmt
.
bindDouble
(
5
,
entity
.
getDiffAmt
());
stmt
.
bindLong
(
6
,
entity
.
getSeqNo
());
stmt
.
bindLong
(
7
,
entity
.
getVisible
());
java
.
util
.
Date
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
8
,
createTime
.
getTime
());
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
9
,
createBy
);
}
java
.
util
.
Date
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
10
,
updateTime
.
getTime
());
}
stmt
.
bindLong
(
11
,
entity
.
getConditions
());
stmt
.
bindLong
(
12
,
entity
.
getIsRT
());
stmt
.
bindLong
(
13
,
entity
.
getDeletes
());
stmt
.
bindLong
(
14
,
entity
.
getPosId
());
stmt
.
bindLong
(
15
,
entity
.
getRestaurant_id
());
stmt
.
bindLong
(
16
,
entity
.
getIsMainAccount
());
String
printSeting
=
entity
.
getPrintSeting
();
if
(
printSeting
!=
null
)
{
stmt
.
bindString
(
17
,
printSeting
);
}
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
ComboItem
readEntity
(
Cursor
cursor
,
int
offset
)
{
ComboItem
entity
=
new
ComboItem
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
),
// comId
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getLong
(
offset
+
2
),
// fid
cursor
.
getLong
(
offset
+
3
),
// qty
cursor
.
getDouble
(
offset
+
4
),
// diffAmt
cursor
.
getLong
(
offset
+
5
),
// seqNo
cursor
.
getLong
(
offset
+
6
),
// visible
cursor
.
isNull
(
offset
+
7
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
7
)),
// createTime
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// createBy
cursor
.
isNull
(
offset
+
9
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
9
)),
// updateTime
cursor
.
getLong
(
offset
+
10
),
// conditions
cursor
.
getLong
(
offset
+
11
),
// isRT
(
byte
)
cursor
.
getShort
(
offset
+
12
),
// deletes
cursor
.
getLong
(
offset
+
13
),
// posId
cursor
.
getLong
(
offset
+
14
),
// restaurant_id
(
byte
)
cursor
.
getShort
(
offset
+
15
),
// isMainAccount
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
)
// printSeting
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
ComboItem
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setComId
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
));
entity
.
setFid
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getLong
(
offset
+
2
));
entity
.
setQty
(
cursor
.
getLong
(
offset
+
3
));
entity
.
setDiffAmt
(
cursor
.
getDouble
(
offset
+
4
));
entity
.
setSeqNo
(
cursor
.
getLong
(
offset
+
5
));
entity
.
setVisible
(
cursor
.
getLong
(
offset
+
6
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
7
)));
entity
.
setCreateBy
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
9
)));
entity
.
setConditions
(
cursor
.
getLong
(
offset
+
10
));
entity
.
setIsRT
(
cursor
.
getLong
(
offset
+
11
));
entity
.
setDeletes
((
byte
)
cursor
.
getShort
(
offset
+
12
));
entity
.
setPosId
(
cursor
.
getLong
(
offset
+
13
));
entity
.
setRestaurant_id
(
cursor
.
getLong
(
offset
+
14
));
entity
.
setIsMainAccount
((
byte
)
cursor
.
getShort
(
offset
+
15
));
entity
.
setPrintSeting
(
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
ComboItem
entity
,
long
rowId
)
{
entity
.
setId
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
ComboItem
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getId
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
ComboItem
entity
)
{
return
entity
.
getId
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DaoMaster.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.content.Context
;
import
android.database.sqlite.SQLiteDatabase
;
import
android.database.sqlite.SQLiteDatabase.CursorFactory
;
import
android.util.Log
;
import
org.greenrobot.greendao.AbstractDaoMaster
;
import
org.greenrobot.greendao.database.StandardDatabase
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseOpenHelper
;
import
org.greenrobot.greendao.identityscope.IdentityScopeType
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* Master of DAO (schema version 20): knows all DAOs.
*/
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
static
final
int
SCHEMA_VERSION
=
20
;
/** Creates underlying database table using DAOs. */
public
static
void
createAllTables
(
Database
db
,
boolean
ifNotExists
)
{
ColorBeanDao
.
createTable
(
db
,
ifNotExists
);
ComboItemDao
.
createTable
(
db
,
ifNotExists
);
DiscountDao
.
createTable
(
db
,
ifNotExists
);
ExpandInfoDao
.
createTable
(
db
,
ifNotExists
);
FoodDao
.
createTable
(
db
,
ifNotExists
);
FoodComboDao
.
createTable
(
db
,
ifNotExists
);
FoodModifierDao
.
createTable
(
db
,
ifNotExists
);
FunctionDao
.
createTable
(
db
,
ifNotExists
);
LanguageDao
.
createTable
(
db
,
ifNotExists
);
ModifierDao
.
createTable
(
db
,
ifNotExists
);
PrintCurrencyBeanDao
.
createTable
(
db
,
ifNotExists
);
PrintModelBeanDao
.
createTable
(
db
,
ifNotExists
);
PrinterDeviceBeanDao
.
createTable
(
db
,
ifNotExists
);
}
/** Drops underlying database table using DAOs. */
public
static
void
dropAllTables
(
Database
db
,
boolean
ifExists
)
{
ColorBeanDao
.
dropTable
(
db
,
ifExists
);
ComboItemDao
.
dropTable
(
db
,
ifExists
);
DiscountDao
.
dropTable
(
db
,
ifExists
);
ExpandInfoDao
.
dropTable
(
db
,
ifExists
);
FoodDao
.
dropTable
(
db
,
ifExists
);
FoodComboDao
.
dropTable
(
db
,
ifExists
);
FoodModifierDao
.
dropTable
(
db
,
ifExists
);
FunctionDao
.
dropTable
(
db
,
ifExists
);
LanguageDao
.
dropTable
(
db
,
ifExists
);
ModifierDao
.
dropTable
(
db
,
ifExists
);
PrintCurrencyBeanDao
.
dropTable
(
db
,
ifExists
);
PrintModelBeanDao
.
dropTable
(
db
,
ifExists
);
PrinterDeviceBeanDao
.
dropTable
(
db
,
ifExists
);
}
/**
* WARNING: Drops all table on Upgrade! Use only during development.
* Convenience method using a {@link DevOpenHelper}.
*/
public
static
DaoSession
newDevSession
(
Context
context
,
String
name
)
{
Database
db
=
new
DevOpenHelper
(
context
,
name
).
getWritableDb
();
DaoMaster
daoMaster
=
new
DaoMaster
(
db
);
return
daoMaster
.
newSession
();
}
public
DaoMaster
(
SQLiteDatabase
db
)
{
this
(
new
StandardDatabase
(
db
));
}
public
DaoMaster
(
Database
db
)
{
super
(
db
,
SCHEMA_VERSION
);
registerDaoClass
(
ColorBeanDao
.
class
);
registerDaoClass
(
ComboItemDao
.
class
);
registerDaoClass
(
DiscountDao
.
class
);
registerDaoClass
(
ExpandInfoDao
.
class
);
registerDaoClass
(
FoodDao
.
class
);
registerDaoClass
(
FoodComboDao
.
class
);
registerDaoClass
(
FoodModifierDao
.
class
);
registerDaoClass
(
FunctionDao
.
class
);
registerDaoClass
(
LanguageDao
.
class
);
registerDaoClass
(
ModifierDao
.
class
);
registerDaoClass
(
PrintCurrencyBeanDao
.
class
);
registerDaoClass
(
PrintModelBeanDao
.
class
);
registerDaoClass
(
PrinterDeviceBeanDao
.
class
);
}
public
DaoSession
newSession
()
{
return
new
DaoSession
(
db
,
IdentityScopeType
.
Session
,
daoConfigMap
);
}
public
DaoSession
newSession
(
IdentityScopeType
type
)
{
return
new
DaoSession
(
db
,
type
,
daoConfigMap
);
}
/**
* Calls {@link #createAllTables(Database, boolean)} in {@link #onCreate(Database)} -
*/
public
static
abstract
class
OpenHelper
extends
DatabaseOpenHelper
{
public
OpenHelper
(
Context
context
,
String
name
)
{
super
(
context
,
name
,
SCHEMA_VERSION
);
}
public
OpenHelper
(
Context
context
,
String
name
,
CursorFactory
factory
)
{
super
(
context
,
name
,
factory
,
SCHEMA_VERSION
);
}
@Override
public
void
onCreate
(
Database
db
)
{
Log
.
i
(
"greenDAO"
,
"Creating tables for schema version "
+
SCHEMA_VERSION
);
createAllTables
(
db
,
false
);
}
}
/** WARNING: Drops all table on Upgrade! Use only during development. */
public
static
class
DevOpenHelper
extends
OpenHelper
{
public
DevOpenHelper
(
Context
context
,
String
name
)
{
super
(
context
,
name
);
}
public
DevOpenHelper
(
Context
context
,
String
name
,
CursorFactory
factory
)
{
super
(
context
,
name
,
factory
);
}
@Override
public
void
onUpgrade
(
Database
db
,
int
oldVersion
,
int
newVersion
)
{
Log
.
i
(
"greenDAO"
,
"Upgrading schema from version "
+
oldVersion
+
" to "
+
newVersion
+
" by dropping all tables"
);
dropAllTables
(
db
,
true
);
onCreate
(
db
);
}
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DaoSession.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
java.util.Map
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.AbstractDaoSession
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.identityscope.IdentityScopeType
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
com.gingersoft.gsa.cloud.database.bean.ColorBean
;
import
com.gingersoft.gsa.cloud.database.bean.ComboItem
;
import
com.gingersoft.gsa.cloud.database.bean.Discount
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
import
com.gingersoft.gsa.cloud.database.bean.Food
;
import
com.gingersoft.gsa.cloud.database.bean.FoodCombo
;
import
com.gingersoft.gsa.cloud.database.bean.FoodModifier
;
import
com.gingersoft.gsa.cloud.database.bean.Function
;
import
com.gingersoft.gsa.cloud.database.bean.Language
;
import
com.gingersoft.gsa.cloud.database.bean.Modifier
;
import
com.gingersoft.gsa.cloud.database.bean.PrintCurrencyBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrintModelBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.greendao.ColorBeanDao
;
import
com.gingersoft.gsa.cloud.greendao.ComboItemDao
;
import
com.gingersoft.gsa.cloud.greendao.DiscountDao
;
import
com.gingersoft.gsa.cloud.greendao.ExpandInfoDao
;
import
com.gingersoft.gsa.cloud.greendao.FoodDao
;
import
com.gingersoft.gsa.cloud.greendao.FoodComboDao
;
import
com.gingersoft.gsa.cloud.greendao.FoodModifierDao
;
import
com.gingersoft.gsa.cloud.greendao.FunctionDao
;
import
com.gingersoft.gsa.cloud.greendao.LanguageDao
;
import
com.gingersoft.gsa.cloud.greendao.ModifierDao
;
import
com.gingersoft.gsa.cloud.greendao.PrintCurrencyBeanDao
;
import
com.gingersoft.gsa.cloud.greendao.PrintModelBeanDao
;
import
com.gingersoft.gsa.cloud.greendao.PrinterDeviceBeanDao
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* {@inheritDoc}
*
* @see org.greenrobot.greendao.AbstractDaoSession
*/
public
class
DaoSession
extends
AbstractDaoSession
{
private
final
DaoConfig
colorBeanDaoConfig
;
private
final
DaoConfig
comboItemDaoConfig
;
private
final
DaoConfig
discountDaoConfig
;
private
final
DaoConfig
expandInfoDaoConfig
;
private
final
DaoConfig
foodDaoConfig
;
private
final
DaoConfig
foodComboDaoConfig
;
private
final
DaoConfig
foodModifierDaoConfig
;
private
final
DaoConfig
functionDaoConfig
;
private
final
DaoConfig
languageDaoConfig
;
private
final
DaoConfig
modifierDaoConfig
;
private
final
DaoConfig
printCurrencyBeanDaoConfig
;
private
final
DaoConfig
printModelBeanDaoConfig
;
private
final
DaoConfig
printerDeviceBeanDaoConfig
;
private
final
ColorBeanDao
colorBeanDao
;
private
final
ComboItemDao
comboItemDao
;
private
final
DiscountDao
discountDao
;
private
final
ExpandInfoDao
expandInfoDao
;
private
final
FoodDao
foodDao
;
private
final
FoodComboDao
foodComboDao
;
private
final
FoodModifierDao
foodModifierDao
;
private
final
FunctionDao
functionDao
;
private
final
LanguageDao
languageDao
;
private
final
ModifierDao
modifierDao
;
private
final
PrintCurrencyBeanDao
printCurrencyBeanDao
;
private
final
PrintModelBeanDao
printModelBeanDao
;
private
final
PrinterDeviceBeanDao
printerDeviceBeanDao
;
public
DaoSession
(
Database
db
,
IdentityScopeType
type
,
Map
<
Class
<?
extends
AbstractDao
<?,
?>>,
DaoConfig
>
daoConfigMap
)
{
super
(
db
);
colorBeanDaoConfig
=
daoConfigMap
.
get
(
ColorBeanDao
.
class
).
clone
();
colorBeanDaoConfig
.
initIdentityScope
(
type
);
comboItemDaoConfig
=
daoConfigMap
.
get
(
ComboItemDao
.
class
).
clone
();
comboItemDaoConfig
.
initIdentityScope
(
type
);
discountDaoConfig
=
daoConfigMap
.
get
(
DiscountDao
.
class
).
clone
();
discountDaoConfig
.
initIdentityScope
(
type
);
expandInfoDaoConfig
=
daoConfigMap
.
get
(
ExpandInfoDao
.
class
).
clone
();
expandInfoDaoConfig
.
initIdentityScope
(
type
);
foodDaoConfig
=
daoConfigMap
.
get
(
FoodDao
.
class
).
clone
();
foodDaoConfig
.
initIdentityScope
(
type
);
foodComboDaoConfig
=
daoConfigMap
.
get
(
FoodComboDao
.
class
).
clone
();
foodComboDaoConfig
.
initIdentityScope
(
type
);
foodModifierDaoConfig
=
daoConfigMap
.
get
(
FoodModifierDao
.
class
).
clone
();
foodModifierDaoConfig
.
initIdentityScope
(
type
);
functionDaoConfig
=
daoConfigMap
.
get
(
FunctionDao
.
class
).
clone
();
functionDaoConfig
.
initIdentityScope
(
type
);
languageDaoConfig
=
daoConfigMap
.
get
(
LanguageDao
.
class
).
clone
();
languageDaoConfig
.
initIdentityScope
(
type
);
modifierDaoConfig
=
daoConfigMap
.
get
(
ModifierDao
.
class
).
clone
();
modifierDaoConfig
.
initIdentityScope
(
type
);
printCurrencyBeanDaoConfig
=
daoConfigMap
.
get
(
PrintCurrencyBeanDao
.
class
).
clone
();
printCurrencyBeanDaoConfig
.
initIdentityScope
(
type
);
printModelBeanDaoConfig
=
daoConfigMap
.
get
(
PrintModelBeanDao
.
class
).
clone
();
printModelBeanDaoConfig
.
initIdentityScope
(
type
);
printerDeviceBeanDaoConfig
=
daoConfigMap
.
get
(
PrinterDeviceBeanDao
.
class
).
clone
();
printerDeviceBeanDaoConfig
.
initIdentityScope
(
type
);
colorBeanDao
=
new
ColorBeanDao
(
colorBeanDaoConfig
,
this
);
comboItemDao
=
new
ComboItemDao
(
comboItemDaoConfig
,
this
);
discountDao
=
new
DiscountDao
(
discountDaoConfig
,
this
);
expandInfoDao
=
new
ExpandInfoDao
(
expandInfoDaoConfig
,
this
);
foodDao
=
new
FoodDao
(
foodDaoConfig
,
this
);
foodComboDao
=
new
FoodComboDao
(
foodComboDaoConfig
,
this
);
foodModifierDao
=
new
FoodModifierDao
(
foodModifierDaoConfig
,
this
);
functionDao
=
new
FunctionDao
(
functionDaoConfig
,
this
);
languageDao
=
new
LanguageDao
(
languageDaoConfig
,
this
);
modifierDao
=
new
ModifierDao
(
modifierDaoConfig
,
this
);
printCurrencyBeanDao
=
new
PrintCurrencyBeanDao
(
printCurrencyBeanDaoConfig
,
this
);
printModelBeanDao
=
new
PrintModelBeanDao
(
printModelBeanDaoConfig
,
this
);
printerDeviceBeanDao
=
new
PrinterDeviceBeanDao
(
printerDeviceBeanDaoConfig
,
this
);
registerDao
(
ColorBean
.
class
,
colorBeanDao
);
registerDao
(
ComboItem
.
class
,
comboItemDao
);
registerDao
(
Discount
.
class
,
discountDao
);
registerDao
(
ExpandInfo
.
class
,
expandInfoDao
);
registerDao
(
Food
.
class
,
foodDao
);
registerDao
(
FoodCombo
.
class
,
foodComboDao
);
registerDao
(
FoodModifier
.
class
,
foodModifierDao
);
registerDao
(
Function
.
class
,
functionDao
);
registerDao
(
Language
.
class
,
languageDao
);
registerDao
(
Modifier
.
class
,
modifierDao
);
registerDao
(
PrintCurrencyBean
.
class
,
printCurrencyBeanDao
);
registerDao
(
PrintModelBean
.
class
,
printModelBeanDao
);
registerDao
(
PrinterDeviceBean
.
class
,
printerDeviceBeanDao
);
}
public
void
clear
()
{
colorBeanDaoConfig
.
clearIdentityScope
();
comboItemDaoConfig
.
clearIdentityScope
();
discountDaoConfig
.
clearIdentityScope
();
expandInfoDaoConfig
.
clearIdentityScope
();
foodDaoConfig
.
clearIdentityScope
();
foodComboDaoConfig
.
clearIdentityScope
();
foodModifierDaoConfig
.
clearIdentityScope
();
functionDaoConfig
.
clearIdentityScope
();
languageDaoConfig
.
clearIdentityScope
();
modifierDaoConfig
.
clearIdentityScope
();
printCurrencyBeanDaoConfig
.
clearIdentityScope
();
printModelBeanDaoConfig
.
clearIdentityScope
();
printerDeviceBeanDaoConfig
.
clearIdentityScope
();
}
public
ColorBeanDao
getColorBeanDao
()
{
return
colorBeanDao
;
}
public
ComboItemDao
getComboItemDao
()
{
return
comboItemDao
;
}
public
DiscountDao
getDiscountDao
()
{
return
discountDao
;
}
public
ExpandInfoDao
getExpandInfoDao
()
{
return
expandInfoDao
;
}
public
FoodDao
getFoodDao
()
{
return
foodDao
;
}
public
FoodComboDao
getFoodComboDao
()
{
return
foodComboDao
;
}
public
FoodModifierDao
getFoodModifierDao
()
{
return
foodModifierDao
;
}
public
FunctionDao
getFunctionDao
()
{
return
functionDao
;
}
public
LanguageDao
getLanguageDao
()
{
return
languageDao
;
}
public
ModifierDao
getModifierDao
()
{
return
modifierDao
;
}
public
PrintCurrencyBeanDao
getPrintCurrencyBeanDao
()
{
return
printCurrencyBeanDao
;
}
public
PrintModelBeanDao
getPrintModelBeanDao
()
{
return
printModelBeanDao
;
}
public
PrinterDeviceBeanDao
getPrinterDeviceBeanDao
()
{
return
printerDeviceBeanDao
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/DiscountDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.Discount
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "DISCOUNT".
*/
public
class
DiscountDao
extends
AbstractDao
<
Discount
,
Long
>
{
public
static
final
String
TABLENAME
=
"DISCOUNT"
;
/**
* Properties of entity Discount.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
true
,
"_id"
);
public
final
static
Property
Restaurant_id
=
new
Property
(
1
,
int
.
class
,
"restaurant_id"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
Amount
=
new
Property
(
2
,
double
.
class
,
"amount"
,
false
,
"AMOUNT"
);
public
final
static
Property
Discount_value
=
new
Property
(
3
,
double
.
class
,
"discount_value"
,
false
,
"DISCOUNT_VALUE"
);
public
final
static
Property
Type
=
new
Property
(
4
,
int
.
class
,
"type"
,
false
,
"TYPE"
);
public
final
static
Property
DiscountType
=
new
Property
(
5
,
String
.
class
,
"discountType"
,
false
,
"DISCOUNT_TYPE"
);
public
final
static
Property
Status
=
new
Property
(
6
,
int
.
class
,
"status"
,
false
,
"STATUS"
);
public
final
static
Property
Remark
=
new
Property
(
7
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
public
final
static
Property
Begin_time
=
new
Property
(
8
,
String
.
class
,
"begin_time"
,
false
,
"BEGIN_TIME"
);
public
final
static
Property
End_time
=
new
Property
(
9
,
String
.
class
,
"end_time"
,
false
,
"END_TIME"
);
}
public
DiscountDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
DiscountDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"DISCOUNT\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: id
"\"RESTAURANT_ID\" INTEGER NOT NULL ,"
+
// 1: restaurant_id
"\"AMOUNT\" REAL NOT NULL ,"
+
// 2: amount
"\"DISCOUNT_VALUE\" REAL NOT NULL ,"
+
// 3: discount_value
"\"TYPE\" INTEGER NOT NULL ,"
+
// 4: type
"\"DISCOUNT_TYPE\" TEXT,"
+
// 5: discountType
"\"STATUS\" INTEGER NOT NULL ,"
+
// 6: status
"\"REMARK\" TEXT,"
+
// 7: remark
"\"BEGIN_TIME\" TEXT,"
+
// 8: begin_time
"\"END_TIME\" TEXT);"
);
// 9: end_time
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"DISCOUNT\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
Discount
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindLong
(
2
,
entity
.
getRestaurant_id
());
stmt
.
bindDouble
(
3
,
entity
.
getAmount
());
stmt
.
bindDouble
(
4
,
entity
.
getDiscount_value
());
stmt
.
bindLong
(
5
,
entity
.
getType
());
String
discountType
=
entity
.
getDiscountType
();
if
(
discountType
!=
null
)
{
stmt
.
bindString
(
6
,
discountType
);
}
stmt
.
bindLong
(
7
,
entity
.
getStatus
());
String
remark
=
entity
.
getRemark
();
if
(
remark
!=
null
)
{
stmt
.
bindString
(
8
,
remark
);
}
String
begin_time
=
entity
.
getBegin_time
();
if
(
begin_time
!=
null
)
{
stmt
.
bindString
(
9
,
begin_time
);
}
String
end_time
=
entity
.
getEnd_time
();
if
(
end_time
!=
null
)
{
stmt
.
bindString
(
10
,
end_time
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
Discount
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindLong
(
2
,
entity
.
getRestaurant_id
());
stmt
.
bindDouble
(
3
,
entity
.
getAmount
());
stmt
.
bindDouble
(
4
,
entity
.
getDiscount_value
());
stmt
.
bindLong
(
5
,
entity
.
getType
());
String
discountType
=
entity
.
getDiscountType
();
if
(
discountType
!=
null
)
{
stmt
.
bindString
(
6
,
discountType
);
}
stmt
.
bindLong
(
7
,
entity
.
getStatus
());
String
remark
=
entity
.
getRemark
();
if
(
remark
!=
null
)
{
stmt
.
bindString
(
8
,
remark
);
}
String
begin_time
=
entity
.
getBegin_time
();
if
(
begin_time
!=
null
)
{
stmt
.
bindString
(
9
,
begin_time
);
}
String
end_time
=
entity
.
getEnd_time
();
if
(
end_time
!=
null
)
{
stmt
.
bindString
(
10
,
end_time
);
}
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
Discount
readEntity
(
Cursor
cursor
,
int
offset
)
{
Discount
entity
=
new
Discount
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
getInt
(
offset
+
1
),
// restaurant_id
cursor
.
getDouble
(
offset
+
2
),
// amount
cursor
.
getDouble
(
offset
+
3
),
// discount_value
cursor
.
getInt
(
offset
+
4
),
// type
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// discountType
cursor
.
getInt
(
offset
+
6
),
// status
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// remark
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// begin_time
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
)
// end_time
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
Discount
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setRestaurant_id
(
cursor
.
getInt
(
offset
+
1
));
entity
.
setAmount
(
cursor
.
getDouble
(
offset
+
2
));
entity
.
setDiscount_value
(
cursor
.
getDouble
(
offset
+
3
));
entity
.
setType
(
cursor
.
getInt
(
offset
+
4
));
entity
.
setDiscountType
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setStatus
(
cursor
.
getInt
(
offset
+
6
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setBegin_time
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setEnd_time
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
Discount
entity
,
long
rowId
)
{
entity
.
setId
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
Discount
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getId
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
Discount
entity
)
{
return
entity
.
getId
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ExpandInfoDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "EXPAND_INFO".
*/
public
class
ExpandInfoDao
extends
AbstractDao
<
ExpandInfo
,
Long
>
{
public
static
final
String
TABLENAME
=
"EXPAND_INFO"
;
/**
* Properties of entity ExpandInfo.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
true
,
"_id"
);
public
final
static
Property
RestaurantId
=
new
Property
(
1
,
Integer
.
class
,
"restaurantId"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
SettingName
=
new
Property
(
2
,
String
.
class
,
"settingName"
,
false
,
"SETTING_NAME"
);
public
final
static
Property
ValueInt
=
new
Property
(
3
,
Integer
.
class
,
"valueInt"
,
false
,
"VALUE_INT"
);
public
final
static
Property
ValueChar
=
new
Property
(
4
,
String
.
class
,
"valueChar"
,
false
,
"VALUE_CHAR"
);
public
final
static
Property
ValueBoolean
=
new
Property
(
5
,
Boolean
.
class
,
"valueBoolean"
,
false
,
"VALUE_BOOLEAN"
);
public
final
static
Property
ValueDatetime
=
new
Property
(
6
,
String
.
class
,
"valueDatetime"
,
false
,
"VALUE_DATETIME"
);
public
final
static
Property
Remark
=
new
Property
(
7
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
public
final
static
Property
DataType
=
new
Property
(
8
,
int
.
class
,
"dataType"
,
false
,
"DATA_TYPE"
);
public
final
static
Property
ShowName
=
new
Property
(
9
,
String
.
class
,
"showName"
,
false
,
"SHOW_NAME"
);
}
public
ExpandInfoDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
ExpandInfoDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"EXPAND_INFO\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: id
"\"RESTAURANT_ID\" INTEGER,"
+
// 1: restaurantId
"\"SETTING_NAME\" TEXT,"
+
// 2: settingName
"\"VALUE_INT\" INTEGER,"
+
// 3: valueInt
"\"VALUE_CHAR\" TEXT,"
+
// 4: valueChar
"\"VALUE_BOOLEAN\" INTEGER,"
+
// 5: valueBoolean
"\"VALUE_DATETIME\" TEXT,"
+
// 6: valueDatetime
"\"REMARK\" TEXT,"
+
// 7: remark
"\"DATA_TYPE\" INTEGER NOT NULL ,"
+
// 8: dataType
"\"SHOW_NAME\" TEXT);"
);
// 9: showName
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"EXPAND_INFO\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
ExpandInfo
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Integer
restaurantId
=
entity
.
getRestaurantId
();
if
(
restaurantId
!=
null
)
{
stmt
.
bindLong
(
2
,
restaurantId
);
}
String
settingName
=
entity
.
getSettingName
();
if
(
settingName
!=
null
)
{
stmt
.
bindString
(
3
,
settingName
);
}
Integer
valueInt
=
entity
.
getValueInt
();
if
(
valueInt
!=
null
)
{
stmt
.
bindLong
(
4
,
valueInt
);
}
String
valueChar
=
entity
.
getValueChar
();
if
(
valueChar
!=
null
)
{
stmt
.
bindString
(
5
,
valueChar
);
}
Boolean
valueBoolean
=
entity
.
getValueBoolean
();
if
(
valueBoolean
!=
null
)
{
stmt
.
bindLong
(
6
,
valueBoolean
?
1L
:
0L
);
}
String
valueDatetime
=
entity
.
getValueDatetime
();
if
(
valueDatetime
!=
null
)
{
stmt
.
bindString
(
7
,
valueDatetime
);
}
String
remark
=
entity
.
getRemark
();
if
(
remark
!=
null
)
{
stmt
.
bindString
(
8
,
remark
);
}
stmt
.
bindLong
(
9
,
entity
.
getDataType
());
String
showName
=
entity
.
getShowName
();
if
(
showName
!=
null
)
{
stmt
.
bindString
(
10
,
showName
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
ExpandInfo
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Integer
restaurantId
=
entity
.
getRestaurantId
();
if
(
restaurantId
!=
null
)
{
stmt
.
bindLong
(
2
,
restaurantId
);
}
String
settingName
=
entity
.
getSettingName
();
if
(
settingName
!=
null
)
{
stmt
.
bindString
(
3
,
settingName
);
}
Integer
valueInt
=
entity
.
getValueInt
();
if
(
valueInt
!=
null
)
{
stmt
.
bindLong
(
4
,
valueInt
);
}
String
valueChar
=
entity
.
getValueChar
();
if
(
valueChar
!=
null
)
{
stmt
.
bindString
(
5
,
valueChar
);
}
Boolean
valueBoolean
=
entity
.
getValueBoolean
();
if
(
valueBoolean
!=
null
)
{
stmt
.
bindLong
(
6
,
valueBoolean
?
1L
:
0L
);
}
String
valueDatetime
=
entity
.
getValueDatetime
();
if
(
valueDatetime
!=
null
)
{
stmt
.
bindString
(
7
,
valueDatetime
);
}
String
remark
=
entity
.
getRemark
();
if
(
remark
!=
null
)
{
stmt
.
bindString
(
8
,
remark
);
}
stmt
.
bindLong
(
9
,
entity
.
getDataType
());
String
showName
=
entity
.
getShowName
();
if
(
showName
!=
null
)
{
stmt
.
bindString
(
10
,
showName
);
}
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
ExpandInfo
readEntity
(
Cursor
cursor
,
int
offset
)
{
ExpandInfo
entity
=
new
ExpandInfo
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getInt
(
offset
+
1
),
// restaurantId
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
),
// settingName
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getInt
(
offset
+
3
),
// valueInt
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
),
// valueChar
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getShort
(
offset
+
5
)
!=
0
,
// valueBoolean
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// valueDatetime
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// remark
cursor
.
getInt
(
offset
+
8
),
// dataType
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
)
// showName
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
ExpandInfo
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setRestaurantId
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getInt
(
offset
+
1
));
entity
.
setSettingName
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
entity
.
setValueInt
(
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getInt
(
offset
+
3
));
entity
.
setValueChar
(
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
));
entity
.
setValueBoolean
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getShort
(
offset
+
5
)
!=
0
);
entity
.
setValueDatetime
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setDataType
(
cursor
.
getInt
(
offset
+
8
));
entity
.
setShowName
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
ExpandInfo
entity
,
long
rowId
)
{
entity
.
setId
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
ExpandInfo
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getId
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
ExpandInfo
entity
)
{
return
entity
.
getId
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodComboDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.FoodCombo
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "FOOD_COMBO".
*/
public
class
FoodComboDao
extends
AbstractDao
<
FoodCombo
,
Void
>
{
public
static
final
String
TABLENAME
=
"FOOD_COMBO"
;
/**
* Properties of entity FoodCombo.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
false
,
"_id"
);
public
final
static
Property
Fid
=
new
Property
(
1
,
Long
.
class
,
"fid"
,
false
,
"FID"
);
public
final
static
Property
ComId
=
new
Property
(
2
,
int
.
class
,
"comId"
,
false
,
"COM_ID"
);
public
final
static
Property
SeqNo
=
new
Property
(
3
,
int
.
class
,
"seqNo"
,
false
,
"SEQ_NO"
);
public
final
static
Property
DiffAmt
=
new
Property
(
4
,
int
.
class
,
"diffAmt"
,
false
,
"DIFF_AMT"
);
public
final
static
Property
SelectQty
=
new
Property
(
5
,
int
.
class
,
"selectQty"
,
false
,
"SELECT_QTY"
);
public
final
static
Property
CreateTime
=
new
Property
(
6
,
String
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
DefModifier
=
new
Property
(
7
,
String
.
class
,
"defModifier"
,
false
,
"DEF_MODIFIER"
);
public
final
static
Property
ExcModifier
=
new
Property
(
8
,
String
.
class
,
"excModifier"
,
false
,
"EXC_MODIFIER"
);
public
final
static
Property
AutoNext
=
new
Property
(
9
,
int
.
class
,
"autoNext"
,
false
,
"AUTO_NEXT"
);
public
final
static
Property
MultipleSelect
=
new
Property
(
10
,
int
.
class
,
"multipleSelect"
,
false
,
"MULTIPLE_SELECT"
);
public
final
static
Property
UpdateTime
=
new
Property
(
11
,
String
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
Conditions
=
new
Property
(
12
,
int
.
class
,
"conditions"
,
false
,
"CONDITIONS"
);
public
final
static
Property
IsRT
=
new
Property
(
13
,
int
.
class
,
"isRT"
,
false
,
"IS_RT"
);
public
final
static
Property
Deletes
=
new
Property
(
14
,
int
.
class
,
"deletes"
,
false
,
"DELETES"
);
public
final
static
Property
RestaurantId
=
new
Property
(
15
,
int
.
class
,
"restaurantId"
,
false
,
"RESTAURANT_ID"
);
}
public
FoodComboDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
FoodComboDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"FOOD_COMBO\" ("
+
//
"\"_id\" INTEGER,"
+
// 0: id
"\"FID\" INTEGER,"
+
// 1: fid
"\"COM_ID\" INTEGER NOT NULL ,"
+
// 2: comId
"\"SEQ_NO\" INTEGER NOT NULL ,"
+
// 3: seqNo
"\"DIFF_AMT\" INTEGER NOT NULL ,"
+
// 4: diffAmt
"\"SELECT_QTY\" INTEGER NOT NULL ,"
+
// 5: selectQty
"\"CREATE_TIME\" TEXT,"
+
// 6: createTime
"\"DEF_MODIFIER\" TEXT,"
+
// 7: defModifier
"\"EXC_MODIFIER\" TEXT,"
+
// 8: excModifier
"\"AUTO_NEXT\" INTEGER NOT NULL ,"
+
// 9: autoNext
"\"MULTIPLE_SELECT\" INTEGER NOT NULL ,"
+
// 10: multipleSelect
"\"UPDATE_TIME\" TEXT,"
+
// 11: updateTime
"\"CONDITIONS\" INTEGER NOT NULL ,"
+
// 12: conditions
"\"IS_RT\" INTEGER NOT NULL ,"
+
// 13: isRT
"\"DELETES\" INTEGER NOT NULL ,"
+
// 14: deletes
"\"RESTAURANT_ID\" INTEGER NOT NULL );"
);
// 15: restaurantId
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"FOOD_COMBO\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
FoodCombo
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
fid
=
entity
.
getFid
();
if
(
fid
!=
null
)
{
stmt
.
bindLong
(
2
,
fid
);
}
stmt
.
bindLong
(
3
,
entity
.
getComId
());
stmt
.
bindLong
(
4
,
entity
.
getSeqNo
());
stmt
.
bindLong
(
5
,
entity
.
getDiffAmt
());
stmt
.
bindLong
(
6
,
entity
.
getSelectQty
());
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
7
,
createTime
);
}
String
defModifier
=
entity
.
getDefModifier
();
if
(
defModifier
!=
null
)
{
stmt
.
bindString
(
8
,
defModifier
);
}
String
excModifier
=
entity
.
getExcModifier
();
if
(
excModifier
!=
null
)
{
stmt
.
bindString
(
9
,
excModifier
);
}
stmt
.
bindLong
(
10
,
entity
.
getAutoNext
());
stmt
.
bindLong
(
11
,
entity
.
getMultipleSelect
());
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
12
,
updateTime
);
}
stmt
.
bindLong
(
13
,
entity
.
getConditions
());
stmt
.
bindLong
(
14
,
entity
.
getIsRT
());
stmt
.
bindLong
(
15
,
entity
.
getDeletes
());
stmt
.
bindLong
(
16
,
entity
.
getRestaurantId
());
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
FoodCombo
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
fid
=
entity
.
getFid
();
if
(
fid
!=
null
)
{
stmt
.
bindLong
(
2
,
fid
);
}
stmt
.
bindLong
(
3
,
entity
.
getComId
());
stmt
.
bindLong
(
4
,
entity
.
getSeqNo
());
stmt
.
bindLong
(
5
,
entity
.
getDiffAmt
());
stmt
.
bindLong
(
6
,
entity
.
getSelectQty
());
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
7
,
createTime
);
}
String
defModifier
=
entity
.
getDefModifier
();
if
(
defModifier
!=
null
)
{
stmt
.
bindString
(
8
,
defModifier
);
}
String
excModifier
=
entity
.
getExcModifier
();
if
(
excModifier
!=
null
)
{
stmt
.
bindString
(
9
,
excModifier
);
}
stmt
.
bindLong
(
10
,
entity
.
getAutoNext
());
stmt
.
bindLong
(
11
,
entity
.
getMultipleSelect
());
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
12
,
updateTime
);
}
stmt
.
bindLong
(
13
,
entity
.
getConditions
());
stmt
.
bindLong
(
14
,
entity
.
getIsRT
());
stmt
.
bindLong
(
15
,
entity
.
getDeletes
());
stmt
.
bindLong
(
16
,
entity
.
getRestaurantId
());
}
@Override
public
Void
readKey
(
Cursor
cursor
,
int
offset
)
{
return
null
;
}
@Override
public
FoodCombo
readEntity
(
Cursor
cursor
,
int
offset
)
{
FoodCombo
entity
=
new
FoodCombo
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
),
// fid
cursor
.
getInt
(
offset
+
2
),
// comId
cursor
.
getInt
(
offset
+
3
),
// seqNo
cursor
.
getInt
(
offset
+
4
),
// diffAmt
cursor
.
getInt
(
offset
+
5
),
// selectQty
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// createTime
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// defModifier
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// excModifier
cursor
.
getInt
(
offset
+
9
),
// autoNext
cursor
.
getInt
(
offset
+
10
),
// multipleSelect
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
),
// updateTime
cursor
.
getInt
(
offset
+
12
),
// conditions
cursor
.
getInt
(
offset
+
13
),
// isRT
cursor
.
getInt
(
offset
+
14
),
// deletes
cursor
.
getInt
(
offset
+
15
)
// restaurantId
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
FoodCombo
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setFid
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
));
entity
.
setComId
(
cursor
.
getInt
(
offset
+
2
));
entity
.
setSeqNo
(
cursor
.
getInt
(
offset
+
3
));
entity
.
setDiffAmt
(
cursor
.
getInt
(
offset
+
4
));
entity
.
setSelectQty
(
cursor
.
getInt
(
offset
+
5
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setDefModifier
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setExcModifier
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setAutoNext
(
cursor
.
getInt
(
offset
+
9
));
entity
.
setMultipleSelect
(
cursor
.
getInt
(
offset
+
10
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
));
entity
.
setConditions
(
cursor
.
getInt
(
offset
+
12
));
entity
.
setIsRT
(
cursor
.
getInt
(
offset
+
13
));
entity
.
setDeletes
(
cursor
.
getInt
(
offset
+
14
));
entity
.
setRestaurantId
(
cursor
.
getInt
(
offset
+
15
));
}
@Override
protected
final
Void
updateKeyAfterInsert
(
FoodCombo
entity
,
long
rowId
)
{
// Unsupported or missing PK type
return
null
;
}
@Override
public
Void
getKey
(
FoodCombo
entity
)
{
return
null
;
}
@Override
public
boolean
hasKey
(
FoodCombo
entity
)
{
// TODO
return
false
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.Food
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "FOOD".
*/
public
class
FoodDao
extends
AbstractDao
<
Food
,
Long
>
{
public
static
final
String
TABLENAME
=
"FOOD"
;
/**
* Properties of entity Food.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
true
,
"FID"
);
public
final
static
Property
ParentId
=
new
Property
(
1
,
long
.
class
,
"parentId"
,
false
,
"PARENT_ID"
);
public
final
static
Property
RestaurantId
=
new
Property
(
2
,
long
.
class
,
"restaurantId"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
IsParent
=
new
Property
(
3
,
byte
.
class
,
"isParent"
,
false
,
"IS_PARENT"
);
public
final
static
Property
SeqNo
=
new
Property
(
4
,
long
.
class
,
"seqNo"
,
false
,
"SEQ_NO"
);
public
final
static
Property
FoodName
=
new
Property
(
5
,
String
.
class
,
"foodName"
,
false
,
"FOOD_NAME"
);
public
final
static
Property
FoodName1
=
new
Property
(
6
,
String
.
class
,
"foodName1"
,
false
,
"FOOD_NAME1"
);
public
final
static
Property
FoodName2
=
new
Property
(
7
,
String
.
class
,
"foodName2"
,
false
,
"FOOD_NAME2"
);
public
final
static
Property
Plu
=
new
Property
(
8
,
String
.
class
,
"plu"
,
false
,
"PLU"
);
public
final
static
Property
PosFid
=
new
Property
(
9
,
String
.
class
,
"posFid"
,
false
,
"POS_FID"
);
public
final
static
Property
FoodDesc
=
new
Property
(
10
,
String
.
class
,
"foodDesc"
,
false
,
"FOOD_DESC"
);
public
final
static
Property
LimitAmount
=
new
Property
(
11
,
long
.
class
,
"limitAmount"
,
false
,
"LIMIT_AMOUNT"
);
public
final
static
Property
LimitType
=
new
Property
(
12
,
long
.
class
,
"limitType"
,
false
,
"LIMIT_TYPE"
);
public
final
static
Property
FoodSummary
=
new
Property
(
13
,
String
.
class
,
"foodSummary"
,
false
,
"FOOD_SUMMARY"
);
public
final
static
Property
Invisible
=
new
Property
(
14
,
long
.
class
,
"invisible"
,
false
,
"INVISIBLE"
);
public
final
static
Property
AutoMod
=
new
Property
(
15
,
byte
.
class
,
"autoMod"
,
false
,
"AUTO_MOD"
);
public
final
static
Property
Price
=
new
Property
(
16
,
double
.
class
,
"price"
,
false
,
"PRICE"
);
public
final
static
Property
MarketPrice
=
new
Property
(
17
,
double
.
class
,
"marketPrice"
,
false
,
"MARKET_PRICE"
);
public
final
static
Property
LunchboxPrice
=
new
Property
(
18
,
double
.
class
,
"lunchboxPrice"
,
false
,
"LUNCHBOX_PRICE"
);
public
final
static
Property
ImgUrlSmall
=
new
Property
(
19
,
String
.
class
,
"imgUrlSmall"
,
false
,
"IMG_URL_SMALL"
);
public
final
static
Property
Imageurl
=
new
Property
(
20
,
String
.
class
,
"imageurl"
,
false
,
"IMAGEURL"
);
public
final
static
Property
RiceponInvisible
=
new
Property
(
21
,
long
.
class
,
"riceponInvisible"
,
false
,
"RICEPON_INVISIBLE"
);
public
final
static
Property
Cost
=
new
Property
(
22
,
double
.
class
,
"cost"
,
false
,
"COST"
);
public
final
static
Property
StartDate
=
new
Property
(
23
,
java
.
util
.
Date
.
class
,
"startDate"
,
false
,
"START_DATE"
);
public
final
static
Property
EndDate
=
new
Property
(
24
,
java
.
util
.
Date
.
class
,
"endDate"
,
false
,
"END_DATE"
);
public
final
static
Property
Like
=
new
Property
(
25
,
long
.
class
,
"like"
,
false
,
"LIKE"
);
public
final
static
Property
TotalSold
=
new
Property
(
26
,
long
.
class
,
"totalSold"
,
false
,
"TOTAL_SOLD"
);
public
final
static
Property
IsSold
=
new
Property
(
27
,
long
.
class
,
"isSold"
,
false
,
"IS_SOLD"
);
public
final
static
Property
CreateBy
=
new
Property
(
28
,
String
.
class
,
"createBy"
,
false
,
"CREATE_BY"
);
public
final
static
Property
CreateTime
=
new
Property
(
29
,
java
.
util
.
Date
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
UpdateBy
=
new
Property
(
30
,
String
.
class
,
"updateBy"
,
false
,
"UPDATE_BY"
);
public
final
static
Property
UpdateTime
=
new
Property
(
31
,
java
.
util
.
Date
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
PeriodId
=
new
Property
(
32
,
long
.
class
,
"periodId"
,
false
,
"PERIOD_ID"
);
public
final
static
Property
AbleDiscount
=
new
Property
(
33
,
long
.
class
,
"ableDiscount"
,
false
,
"ABLE_DISCOUNT"
);
public
final
static
Property
Takeaway
=
new
Property
(
34
,
long
.
class
,
"takeaway"
,
false
,
"TAKEAWAY"
);
public
final
static
Property
BlueEdit
=
new
Property
(
35
,
long
.
class
,
"blueEdit"
,
false
,
"BLUE_EDIT"
);
public
final
static
Property
CartEdit
=
new
Property
(
36
,
long
.
class
,
"cartEdit"
,
false
,
"CART_EDIT"
);
public
final
static
Property
AutoMerge
=
new
Property
(
37
,
long
.
class
,
"autoMerge"
,
false
,
"AUTO_MERGE"
);
public
final
static
Property
PrintSeting
=
new
Property
(
38
,
String
.
class
,
"printSeting"
,
false
,
"PRINT_SETING"
);
public
final
static
Property
IsPrintQueueCode
=
new
Property
(
39
,
long
.
class
,
"isPrintQueueCode"
,
false
,
"IS_PRINT_QUEUE_CODE"
);
public
final
static
Property
QueueHeadId
=
new
Property
(
40
,
long
.
class
,
"queueHeadId"
,
false
,
"QUEUE_HEAD_ID"
);
public
final
static
Property
Approve
=
new
Property
(
41
,
long
.
class
,
"approve"
,
false
,
"APPROVE"
);
public
final
static
Property
PrintFont
=
new
Property
(
42
,
long
.
class
,
"printFont"
,
false
,
"PRINT_FONT"
);
public
final
static
Property
AdvPrice
=
new
Property
(
43
,
long
.
class
,
"advPrice"
,
false
,
"ADV_PRICE"
);
public
final
static
Property
PrintToBill
=
new
Property
(
44
,
long
.
class
,
"printToBill"
,
false
,
"PRINT_TO_BILL"
);
public
final
static
Property
PointsAdd
=
new
Property
(
45
,
double
.
class
,
"pointsAdd"
,
false
,
"POINTS_ADD"
);
public
final
static
Property
PointsRatio
=
new
Property
(
46
,
long
.
class
,
"pointsRatio"
,
false
,
"POINTS_RATIO"
);
public
final
static
Property
PointsRedeem
=
new
Property
(
47
,
double
.
class
,
"pointsRedeem"
,
false
,
"POINTS_REDEEM"
);
public
final
static
Property
KtPrintMainItem
=
new
Property
(
48
,
long
.
class
,
"ktPrintMainItem"
,
false
,
"KT_PRINT_MAIN_ITEM"
);
public
final
static
Property
KtShowPrice
=
new
Property
(
49
,
long
.
class
,
"ktShowPrice"
,
false
,
"KT_SHOW_PRICE"
);
public
final
static
Property
PrintTo
=
new
Property
(
50
,
long
.
class
,
"printTo"
,
false
,
"PRINT_TO"
);
public
final
static
Property
ToPax
=
new
Property
(
51
,
long
.
class
,
"toPax"
,
false
,
"TO_PAX"
);
public
final
static
Property
FoodType
=
new
Property
(
52
,
long
.
class
,
"foodType"
,
false
,
"FOOD_TYPE"
);
public
final
static
Property
MajorMainId
=
new
Property
(
53
,
long
.
class
,
"majorMainId"
,
false
,
"MAJOR_MAIN_ID"
);
public
final
static
Property
DeptId
=
new
Property
(
54
,
long
.
class
,
"deptId"
,
false
,
"DEPT_ID"
);
public
final
static
Property
ServiceCharge
=
new
Property
(
55
,
byte
.
class
,
"serviceCharge"
,
false
,
"SERVICE_CHARGE"
);
public
final
static
Property
ColorId
=
new
Property
(
56
,
long
.
class
,
"colorId"
,
false
,
"COLOR_ID"
);
public
final
static
Property
Conditions
=
new
Property
(
57
,
long
.
class
,
"conditions"
,
false
,
"CONDITIONS"
);
public
final
static
Property
IsRt
=
new
Property
(
58
,
long
.
class
,
"isRt"
,
false
,
"IS_RT"
);
public
final
static
Property
Deletes
=
new
Property
(
59
,
long
.
class
,
"deletes"
,
false
,
"DELETES"
);
public
final
static
Property
IsTimingFood
=
new
Property
(
60
,
long
.
class
,
"isTimingFood"
,
false
,
"IS_TIMING_FOOD"
);
public
final
static
Property
MinLongTime
=
new
Property
(
61
,
long
.
class
,
"minLongTime"
,
false
,
"MIN_LONG_TIME"
);
public
final
static
Property
UnitTime
=
new
Property
(
62
,
long
.
class
,
"unitTime"
,
false
,
"UNIT_TIME"
);
public
final
static
Property
UnitPrice
=
new
Property
(
63
,
double
.
class
,
"unitPrice"
,
false
,
"UNIT_PRICE"
);
public
final
static
Property
FreeLongTime
=
new
Property
(
64
,
long
.
class
,
"freeLongTime"
,
false
,
"FREE_LONG_TIME"
);
public
final
static
Property
FreePeriodBegin
=
new
Property
(
65
,
java
.
util
.
Date
.
class
,
"freePeriodBegin"
,
false
,
"FREE_PERIOD_BEGIN"
);
public
final
static
Property
IsStatistic
=
new
Property
(
66
,
long
.
class
,
"isStatistic"
,
false
,
"IS_STATISTIC"
);
}
public
FoodDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
FoodDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"FOOD\" ("
+
//
"\"FID\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: id
"\"PARENT_ID\" INTEGER NOT NULL ,"
+
// 1: parentId
"\"RESTAURANT_ID\" INTEGER NOT NULL ,"
+
// 2: restaurantId
"\"IS_PARENT\" INTEGER NOT NULL ,"
+
// 3: isParent
"\"SEQ_NO\" INTEGER NOT NULL ,"
+
// 4: seqNo
"\"FOOD_NAME\" TEXT,"
+
// 5: foodName
"\"FOOD_NAME1\" TEXT,"
+
// 6: foodName1
"\"FOOD_NAME2\" TEXT,"
+
// 7: foodName2
"\"PLU\" TEXT,"
+
// 8: plu
"\"POS_FID\" TEXT,"
+
// 9: posFid
"\"FOOD_DESC\" TEXT,"
+
// 10: foodDesc
"\"LIMIT_AMOUNT\" INTEGER NOT NULL ,"
+
// 11: limitAmount
"\"LIMIT_TYPE\" INTEGER NOT NULL ,"
+
// 12: limitType
"\"FOOD_SUMMARY\" TEXT,"
+
// 13: foodSummary
"\"INVISIBLE\" INTEGER NOT NULL ,"
+
// 14: invisible
"\"AUTO_MOD\" INTEGER NOT NULL ,"
+
// 15: autoMod
"\"PRICE\" REAL NOT NULL ,"
+
// 16: price
"\"MARKET_PRICE\" REAL NOT NULL ,"
+
// 17: marketPrice
"\"LUNCHBOX_PRICE\" REAL NOT NULL ,"
+
// 18: lunchboxPrice
"\"IMG_URL_SMALL\" TEXT,"
+
// 19: imgUrlSmall
"\"IMAGEURL\" TEXT,"
+
// 20: imageurl
"\"RICEPON_INVISIBLE\" INTEGER NOT NULL ,"
+
// 21: riceponInvisible
"\"COST\" REAL NOT NULL ,"
+
// 22: cost
"\"START_DATE\" INTEGER,"
+
// 23: startDate
"\"END_DATE\" INTEGER,"
+
// 24: endDate
"\"LIKE\" INTEGER NOT NULL ,"
+
// 25: like
"\"TOTAL_SOLD\" INTEGER NOT NULL ,"
+
// 26: totalSold
"\"IS_SOLD\" INTEGER NOT NULL ,"
+
// 27: isSold
"\"CREATE_BY\" TEXT,"
+
// 28: createBy
"\"CREATE_TIME\" INTEGER,"
+
// 29: createTime
"\"UPDATE_BY\" TEXT,"
+
// 30: updateBy
"\"UPDATE_TIME\" INTEGER,"
+
// 31: updateTime
"\"PERIOD_ID\" INTEGER NOT NULL ,"
+
// 32: periodId
"\"ABLE_DISCOUNT\" INTEGER NOT NULL ,"
+
// 33: ableDiscount
"\"TAKEAWAY\" INTEGER NOT NULL ,"
+
// 34: takeaway
"\"BLUE_EDIT\" INTEGER NOT NULL ,"
+
// 35: blueEdit
"\"CART_EDIT\" INTEGER NOT NULL ,"
+
// 36: cartEdit
"\"AUTO_MERGE\" INTEGER NOT NULL ,"
+
// 37: autoMerge
"\"PRINT_SETING\" TEXT,"
+
// 38: printSeting
"\"IS_PRINT_QUEUE_CODE\" INTEGER NOT NULL ,"
+
// 39: isPrintQueueCode
"\"QUEUE_HEAD_ID\" INTEGER NOT NULL ,"
+
// 40: queueHeadId
"\"APPROVE\" INTEGER NOT NULL ,"
+
// 41: approve
"\"PRINT_FONT\" INTEGER NOT NULL ,"
+
// 42: printFont
"\"ADV_PRICE\" INTEGER NOT NULL ,"
+
// 43: advPrice
"\"PRINT_TO_BILL\" INTEGER NOT NULL ,"
+
// 44: printToBill
"\"POINTS_ADD\" REAL NOT NULL ,"
+
// 45: pointsAdd
"\"POINTS_RATIO\" INTEGER NOT NULL ,"
+
// 46: pointsRatio
"\"POINTS_REDEEM\" REAL NOT NULL ,"
+
// 47: pointsRedeem
"\"KT_PRINT_MAIN_ITEM\" INTEGER NOT NULL ,"
+
// 48: ktPrintMainItem
"\"KT_SHOW_PRICE\" INTEGER NOT NULL ,"
+
// 49: ktShowPrice
"\"PRINT_TO\" INTEGER NOT NULL ,"
+
// 50: printTo
"\"TO_PAX\" INTEGER NOT NULL ,"
+
// 51: toPax
"\"FOOD_TYPE\" INTEGER NOT NULL ,"
+
// 52: foodType
"\"MAJOR_MAIN_ID\" INTEGER NOT NULL ,"
+
// 53: majorMainId
"\"DEPT_ID\" INTEGER NOT NULL ,"
+
// 54: deptId
"\"SERVICE_CHARGE\" INTEGER NOT NULL ,"
+
// 55: serviceCharge
"\"COLOR_ID\" INTEGER NOT NULL ,"
+
// 56: colorId
"\"CONDITIONS\" INTEGER NOT NULL ,"
+
// 57: conditions
"\"IS_RT\" INTEGER NOT NULL ,"
+
// 58: isRt
"\"DELETES\" INTEGER NOT NULL ,"
+
// 59: deletes
"\"IS_TIMING_FOOD\" INTEGER NOT NULL ,"
+
// 60: isTimingFood
"\"MIN_LONG_TIME\" INTEGER NOT NULL ,"
+
// 61: minLongTime
"\"UNIT_TIME\" INTEGER NOT NULL ,"
+
// 62: unitTime
"\"UNIT_PRICE\" REAL NOT NULL ,"
+
// 63: unitPrice
"\"FREE_LONG_TIME\" INTEGER NOT NULL ,"
+
// 64: freeLongTime
"\"FREE_PERIOD_BEGIN\" INTEGER,"
+
// 65: freePeriodBegin
"\"IS_STATISTIC\" INTEGER NOT NULL );"
);
// 66: isStatistic
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"FOOD\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
Food
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindLong
(
2
,
entity
.
getParentId
());
stmt
.
bindLong
(
3
,
entity
.
getRestaurantId
());
stmt
.
bindLong
(
4
,
entity
.
getIsParent
());
stmt
.
bindLong
(
5
,
entity
.
getSeqNo
());
String
foodName
=
entity
.
getFoodName
();
if
(
foodName
!=
null
)
{
stmt
.
bindString
(
6
,
foodName
);
}
String
foodName1
=
entity
.
getFoodName1
();
if
(
foodName1
!=
null
)
{
stmt
.
bindString
(
7
,
foodName1
);
}
String
foodName2
=
entity
.
getFoodName2
();
if
(
foodName2
!=
null
)
{
stmt
.
bindString
(
8
,
foodName2
);
}
String
plu
=
entity
.
getPlu
();
if
(
plu
!=
null
)
{
stmt
.
bindString
(
9
,
plu
);
}
String
posFid
=
entity
.
getPosFid
();
if
(
posFid
!=
null
)
{
stmt
.
bindString
(
10
,
posFid
);
}
String
foodDesc
=
entity
.
getFoodDesc
();
if
(
foodDesc
!=
null
)
{
stmt
.
bindString
(
11
,
foodDesc
);
}
stmt
.
bindLong
(
12
,
entity
.
getLimitAmount
());
stmt
.
bindLong
(
13
,
entity
.
getLimitType
());
String
foodSummary
=
entity
.
getFoodSummary
();
if
(
foodSummary
!=
null
)
{
stmt
.
bindString
(
14
,
foodSummary
);
}
stmt
.
bindLong
(
15
,
entity
.
getInvisible
());
stmt
.
bindLong
(
16
,
entity
.
getAutoMod
());
stmt
.
bindDouble
(
17
,
entity
.
getPrice
());
stmt
.
bindDouble
(
18
,
entity
.
getMarketPrice
());
stmt
.
bindDouble
(
19
,
entity
.
getLunchboxPrice
());
String
imgUrlSmall
=
entity
.
getImgUrlSmall
();
if
(
imgUrlSmall
!=
null
)
{
stmt
.
bindString
(
20
,
imgUrlSmall
);
}
String
imageurl
=
entity
.
getImageurl
();
if
(
imageurl
!=
null
)
{
stmt
.
bindString
(
21
,
imageurl
);
}
stmt
.
bindLong
(
22
,
entity
.
getRiceponInvisible
());
stmt
.
bindDouble
(
23
,
entity
.
getCost
());
java
.
util
.
Date
startDate
=
entity
.
getStartDate
();
if
(
startDate
!=
null
)
{
stmt
.
bindLong
(
24
,
startDate
.
getTime
());
}
java
.
util
.
Date
endDate
=
entity
.
getEndDate
();
if
(
endDate
!=
null
)
{
stmt
.
bindLong
(
25
,
endDate
.
getTime
());
}
stmt
.
bindLong
(
26
,
entity
.
getLike
());
stmt
.
bindLong
(
27
,
entity
.
getTotalSold
());
stmt
.
bindLong
(
28
,
entity
.
getIsSold
());
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
29
,
createBy
);
}
java
.
util
.
Date
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
30
,
createTime
.
getTime
());
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
31
,
updateBy
);
}
java
.
util
.
Date
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
32
,
updateTime
.
getTime
());
}
stmt
.
bindLong
(
33
,
entity
.
getPeriodId
());
stmt
.
bindLong
(
34
,
entity
.
getAbleDiscount
());
stmt
.
bindLong
(
35
,
entity
.
getTakeaway
());
stmt
.
bindLong
(
36
,
entity
.
getBlueEdit
());
stmt
.
bindLong
(
37
,
entity
.
getCartEdit
());
stmt
.
bindLong
(
38
,
entity
.
getAutoMerge
());
String
printSeting
=
entity
.
getPrintSeting
();
if
(
printSeting
!=
null
)
{
stmt
.
bindString
(
39
,
printSeting
);
}
stmt
.
bindLong
(
40
,
entity
.
getIsPrintQueueCode
());
stmt
.
bindLong
(
41
,
entity
.
getQueueHeadId
());
stmt
.
bindLong
(
42
,
entity
.
getApprove
());
stmt
.
bindLong
(
43
,
entity
.
getPrintFont
());
stmt
.
bindLong
(
44
,
entity
.
getAdvPrice
());
stmt
.
bindLong
(
45
,
entity
.
getPrintToBill
());
stmt
.
bindDouble
(
46
,
entity
.
getPointsAdd
());
stmt
.
bindLong
(
47
,
entity
.
getPointsRatio
());
stmt
.
bindDouble
(
48
,
entity
.
getPointsRedeem
());
stmt
.
bindLong
(
49
,
entity
.
getKtPrintMainItem
());
stmt
.
bindLong
(
50
,
entity
.
getKtShowPrice
());
stmt
.
bindLong
(
51
,
entity
.
getPrintTo
());
stmt
.
bindLong
(
52
,
entity
.
getToPax
());
stmt
.
bindLong
(
53
,
entity
.
getFoodType
());
stmt
.
bindLong
(
54
,
entity
.
getMajorMainId
());
stmt
.
bindLong
(
55
,
entity
.
getDeptId
());
stmt
.
bindLong
(
56
,
entity
.
getServiceCharge
());
stmt
.
bindLong
(
57
,
entity
.
getColorId
());
stmt
.
bindLong
(
58
,
entity
.
getConditions
());
stmt
.
bindLong
(
59
,
entity
.
getIsRt
());
stmt
.
bindLong
(
60
,
entity
.
getDeletes
());
stmt
.
bindLong
(
61
,
entity
.
getIsTimingFood
());
stmt
.
bindLong
(
62
,
entity
.
getMinLongTime
());
stmt
.
bindLong
(
63
,
entity
.
getUnitTime
());
stmt
.
bindDouble
(
64
,
entity
.
getUnitPrice
());
stmt
.
bindLong
(
65
,
entity
.
getFreeLongTime
());
java
.
util
.
Date
freePeriodBegin
=
entity
.
getFreePeriodBegin
();
if
(
freePeriodBegin
!=
null
)
{
stmt
.
bindLong
(
66
,
freePeriodBegin
.
getTime
());
}
stmt
.
bindLong
(
67
,
entity
.
getIsStatistic
());
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
Food
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindLong
(
2
,
entity
.
getParentId
());
stmt
.
bindLong
(
3
,
entity
.
getRestaurantId
());
stmt
.
bindLong
(
4
,
entity
.
getIsParent
());
stmt
.
bindLong
(
5
,
entity
.
getSeqNo
());
String
foodName
=
entity
.
getFoodName
();
if
(
foodName
!=
null
)
{
stmt
.
bindString
(
6
,
foodName
);
}
String
foodName1
=
entity
.
getFoodName1
();
if
(
foodName1
!=
null
)
{
stmt
.
bindString
(
7
,
foodName1
);
}
String
foodName2
=
entity
.
getFoodName2
();
if
(
foodName2
!=
null
)
{
stmt
.
bindString
(
8
,
foodName2
);
}
String
plu
=
entity
.
getPlu
();
if
(
plu
!=
null
)
{
stmt
.
bindString
(
9
,
plu
);
}
String
posFid
=
entity
.
getPosFid
();
if
(
posFid
!=
null
)
{
stmt
.
bindString
(
10
,
posFid
);
}
String
foodDesc
=
entity
.
getFoodDesc
();
if
(
foodDesc
!=
null
)
{
stmt
.
bindString
(
11
,
foodDesc
);
}
stmt
.
bindLong
(
12
,
entity
.
getLimitAmount
());
stmt
.
bindLong
(
13
,
entity
.
getLimitType
());
String
foodSummary
=
entity
.
getFoodSummary
();
if
(
foodSummary
!=
null
)
{
stmt
.
bindString
(
14
,
foodSummary
);
}
stmt
.
bindLong
(
15
,
entity
.
getInvisible
());
stmt
.
bindLong
(
16
,
entity
.
getAutoMod
());
stmt
.
bindDouble
(
17
,
entity
.
getPrice
());
stmt
.
bindDouble
(
18
,
entity
.
getMarketPrice
());
stmt
.
bindDouble
(
19
,
entity
.
getLunchboxPrice
());
String
imgUrlSmall
=
entity
.
getImgUrlSmall
();
if
(
imgUrlSmall
!=
null
)
{
stmt
.
bindString
(
20
,
imgUrlSmall
);
}
String
imageurl
=
entity
.
getImageurl
();
if
(
imageurl
!=
null
)
{
stmt
.
bindString
(
21
,
imageurl
);
}
stmt
.
bindLong
(
22
,
entity
.
getRiceponInvisible
());
stmt
.
bindDouble
(
23
,
entity
.
getCost
());
java
.
util
.
Date
startDate
=
entity
.
getStartDate
();
if
(
startDate
!=
null
)
{
stmt
.
bindLong
(
24
,
startDate
.
getTime
());
}
java
.
util
.
Date
endDate
=
entity
.
getEndDate
();
if
(
endDate
!=
null
)
{
stmt
.
bindLong
(
25
,
endDate
.
getTime
());
}
stmt
.
bindLong
(
26
,
entity
.
getLike
());
stmt
.
bindLong
(
27
,
entity
.
getTotalSold
());
stmt
.
bindLong
(
28
,
entity
.
getIsSold
());
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
29
,
createBy
);
}
java
.
util
.
Date
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
30
,
createTime
.
getTime
());
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
31
,
updateBy
);
}
java
.
util
.
Date
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
32
,
updateTime
.
getTime
());
}
stmt
.
bindLong
(
33
,
entity
.
getPeriodId
());
stmt
.
bindLong
(
34
,
entity
.
getAbleDiscount
());
stmt
.
bindLong
(
35
,
entity
.
getTakeaway
());
stmt
.
bindLong
(
36
,
entity
.
getBlueEdit
());
stmt
.
bindLong
(
37
,
entity
.
getCartEdit
());
stmt
.
bindLong
(
38
,
entity
.
getAutoMerge
());
String
printSeting
=
entity
.
getPrintSeting
();
if
(
printSeting
!=
null
)
{
stmt
.
bindString
(
39
,
printSeting
);
}
stmt
.
bindLong
(
40
,
entity
.
getIsPrintQueueCode
());
stmt
.
bindLong
(
41
,
entity
.
getQueueHeadId
());
stmt
.
bindLong
(
42
,
entity
.
getApprove
());
stmt
.
bindLong
(
43
,
entity
.
getPrintFont
());
stmt
.
bindLong
(
44
,
entity
.
getAdvPrice
());
stmt
.
bindLong
(
45
,
entity
.
getPrintToBill
());
stmt
.
bindDouble
(
46
,
entity
.
getPointsAdd
());
stmt
.
bindLong
(
47
,
entity
.
getPointsRatio
());
stmt
.
bindDouble
(
48
,
entity
.
getPointsRedeem
());
stmt
.
bindLong
(
49
,
entity
.
getKtPrintMainItem
());
stmt
.
bindLong
(
50
,
entity
.
getKtShowPrice
());
stmt
.
bindLong
(
51
,
entity
.
getPrintTo
());
stmt
.
bindLong
(
52
,
entity
.
getToPax
());
stmt
.
bindLong
(
53
,
entity
.
getFoodType
());
stmt
.
bindLong
(
54
,
entity
.
getMajorMainId
());
stmt
.
bindLong
(
55
,
entity
.
getDeptId
());
stmt
.
bindLong
(
56
,
entity
.
getServiceCharge
());
stmt
.
bindLong
(
57
,
entity
.
getColorId
());
stmt
.
bindLong
(
58
,
entity
.
getConditions
());
stmt
.
bindLong
(
59
,
entity
.
getIsRt
());
stmt
.
bindLong
(
60
,
entity
.
getDeletes
());
stmt
.
bindLong
(
61
,
entity
.
getIsTimingFood
());
stmt
.
bindLong
(
62
,
entity
.
getMinLongTime
());
stmt
.
bindLong
(
63
,
entity
.
getUnitTime
());
stmt
.
bindDouble
(
64
,
entity
.
getUnitPrice
());
stmt
.
bindLong
(
65
,
entity
.
getFreeLongTime
());
java
.
util
.
Date
freePeriodBegin
=
entity
.
getFreePeriodBegin
();
if
(
freePeriodBegin
!=
null
)
{
stmt
.
bindLong
(
66
,
freePeriodBegin
.
getTime
());
}
stmt
.
bindLong
(
67
,
entity
.
getIsStatistic
());
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
Food
readEntity
(
Cursor
cursor
,
int
offset
)
{
Food
entity
=
new
Food
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
getLong
(
offset
+
1
),
// parentId
cursor
.
getLong
(
offset
+
2
),
// restaurantId
(
byte
)
cursor
.
getShort
(
offset
+
3
),
// isParent
cursor
.
getLong
(
offset
+
4
),
// seqNo
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// foodName
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// foodName1
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// foodName2
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// plu
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
),
// posFid
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getString
(
offset
+
10
),
// foodDesc
cursor
.
getLong
(
offset
+
11
),
// limitAmount
cursor
.
getLong
(
offset
+
12
),
// limitType
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
),
// foodSummary
cursor
.
getLong
(
offset
+
14
),
// invisible
(
byte
)
cursor
.
getShort
(
offset
+
15
),
// autoMod
cursor
.
getDouble
(
offset
+
16
),
// price
cursor
.
getDouble
(
offset
+
17
),
// marketPrice
cursor
.
getDouble
(
offset
+
18
),
// lunchboxPrice
cursor
.
isNull
(
offset
+
19
)
?
null
:
cursor
.
getString
(
offset
+
19
),
// imgUrlSmall
cursor
.
isNull
(
offset
+
20
)
?
null
:
cursor
.
getString
(
offset
+
20
),
// imageurl
cursor
.
getLong
(
offset
+
21
),
// riceponInvisible
cursor
.
getDouble
(
offset
+
22
),
// cost
cursor
.
isNull
(
offset
+
23
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
23
)),
// startDate
cursor
.
isNull
(
offset
+
24
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
24
)),
// endDate
cursor
.
getLong
(
offset
+
25
),
// like
cursor
.
getLong
(
offset
+
26
),
// totalSold
cursor
.
getLong
(
offset
+
27
),
// isSold
cursor
.
isNull
(
offset
+
28
)
?
null
:
cursor
.
getString
(
offset
+
28
),
// createBy
cursor
.
isNull
(
offset
+
29
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
29
)),
// createTime
cursor
.
isNull
(
offset
+
30
)
?
null
:
cursor
.
getString
(
offset
+
30
),
// updateBy
cursor
.
isNull
(
offset
+
31
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
31
)),
// updateTime
cursor
.
getLong
(
offset
+
32
),
// periodId
cursor
.
getLong
(
offset
+
33
),
// ableDiscount
cursor
.
getLong
(
offset
+
34
),
// takeaway
cursor
.
getLong
(
offset
+
35
),
// blueEdit
cursor
.
getLong
(
offset
+
36
),
// cartEdit
cursor
.
getLong
(
offset
+
37
),
// autoMerge
cursor
.
isNull
(
offset
+
38
)
?
null
:
cursor
.
getString
(
offset
+
38
),
// printSeting
cursor
.
getLong
(
offset
+
39
),
// isPrintQueueCode
cursor
.
getLong
(
offset
+
40
),
// queueHeadId
cursor
.
getLong
(
offset
+
41
),
// approve
cursor
.
getLong
(
offset
+
42
),
// printFont
cursor
.
getLong
(
offset
+
43
),
// advPrice
cursor
.
getLong
(
offset
+
44
),
// printToBill
cursor
.
getDouble
(
offset
+
45
),
// pointsAdd
cursor
.
getLong
(
offset
+
46
),
// pointsRatio
cursor
.
getDouble
(
offset
+
47
),
// pointsRedeem
cursor
.
getLong
(
offset
+
48
),
// ktPrintMainItem
cursor
.
getLong
(
offset
+
49
),
// ktShowPrice
cursor
.
getLong
(
offset
+
50
),
// printTo
cursor
.
getLong
(
offset
+
51
),
// toPax
cursor
.
getLong
(
offset
+
52
),
// foodType
cursor
.
getLong
(
offset
+
53
),
// majorMainId
cursor
.
getLong
(
offset
+
54
),
// deptId
(
byte
)
cursor
.
getShort
(
offset
+
55
),
// serviceCharge
cursor
.
getLong
(
offset
+
56
),
// colorId
cursor
.
getLong
(
offset
+
57
),
// conditions
cursor
.
getLong
(
offset
+
58
),
// isRt
cursor
.
getLong
(
offset
+
59
),
// deletes
cursor
.
getLong
(
offset
+
60
),
// isTimingFood
cursor
.
getLong
(
offset
+
61
),
// minLongTime
cursor
.
getLong
(
offset
+
62
),
// unitTime
cursor
.
getDouble
(
offset
+
63
),
// unitPrice
cursor
.
getLong
(
offset
+
64
),
// freeLongTime
cursor
.
isNull
(
offset
+
65
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
65
)),
// freePeriodBegin
cursor
.
getLong
(
offset
+
66
)
// isStatistic
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
Food
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setParentId
(
cursor
.
getLong
(
offset
+
1
));
entity
.
setRestaurantId
(
cursor
.
getLong
(
offset
+
2
));
entity
.
setIsParent
((
byte
)
cursor
.
getShort
(
offset
+
3
));
entity
.
setSeqNo
(
cursor
.
getLong
(
offset
+
4
));
entity
.
setFoodName
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setFoodName1
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setFoodName2
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setPlu
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setPosFid
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
));
entity
.
setFoodDesc
(
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getString
(
offset
+
10
));
entity
.
setLimitAmount
(
cursor
.
getLong
(
offset
+
11
));
entity
.
setLimitType
(
cursor
.
getLong
(
offset
+
12
));
entity
.
setFoodSummary
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
));
entity
.
setInvisible
(
cursor
.
getLong
(
offset
+
14
));
entity
.
setAutoMod
((
byte
)
cursor
.
getShort
(
offset
+
15
));
entity
.
setPrice
(
cursor
.
getDouble
(
offset
+
16
));
entity
.
setMarketPrice
(
cursor
.
getDouble
(
offset
+
17
));
entity
.
setLunchboxPrice
(
cursor
.
getDouble
(
offset
+
18
));
entity
.
setImgUrlSmall
(
cursor
.
isNull
(
offset
+
19
)
?
null
:
cursor
.
getString
(
offset
+
19
));
entity
.
setImageurl
(
cursor
.
isNull
(
offset
+
20
)
?
null
:
cursor
.
getString
(
offset
+
20
));
entity
.
setRiceponInvisible
(
cursor
.
getLong
(
offset
+
21
));
entity
.
setCost
(
cursor
.
getDouble
(
offset
+
22
));
entity
.
setStartDate
(
cursor
.
isNull
(
offset
+
23
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
23
)));
entity
.
setEndDate
(
cursor
.
isNull
(
offset
+
24
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
24
)));
entity
.
setLike
(
cursor
.
getLong
(
offset
+
25
));
entity
.
setTotalSold
(
cursor
.
getLong
(
offset
+
26
));
entity
.
setIsSold
(
cursor
.
getLong
(
offset
+
27
));
entity
.
setCreateBy
(
cursor
.
isNull
(
offset
+
28
)
?
null
:
cursor
.
getString
(
offset
+
28
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
29
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
29
)));
entity
.
setUpdateBy
(
cursor
.
isNull
(
offset
+
30
)
?
null
:
cursor
.
getString
(
offset
+
30
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
31
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
31
)));
entity
.
setPeriodId
(
cursor
.
getLong
(
offset
+
32
));
entity
.
setAbleDiscount
(
cursor
.
getLong
(
offset
+
33
));
entity
.
setTakeaway
(
cursor
.
getLong
(
offset
+
34
));
entity
.
setBlueEdit
(
cursor
.
getLong
(
offset
+
35
));
entity
.
setCartEdit
(
cursor
.
getLong
(
offset
+
36
));
entity
.
setAutoMerge
(
cursor
.
getLong
(
offset
+
37
));
entity
.
setPrintSeting
(
cursor
.
isNull
(
offset
+
38
)
?
null
:
cursor
.
getString
(
offset
+
38
));
entity
.
setIsPrintQueueCode
(
cursor
.
getLong
(
offset
+
39
));
entity
.
setQueueHeadId
(
cursor
.
getLong
(
offset
+
40
));
entity
.
setApprove
(
cursor
.
getLong
(
offset
+
41
));
entity
.
setPrintFont
(
cursor
.
getLong
(
offset
+
42
));
entity
.
setAdvPrice
(
cursor
.
getLong
(
offset
+
43
));
entity
.
setPrintToBill
(
cursor
.
getLong
(
offset
+
44
));
entity
.
setPointsAdd
(
cursor
.
getDouble
(
offset
+
45
));
entity
.
setPointsRatio
(
cursor
.
getLong
(
offset
+
46
));
entity
.
setPointsRedeem
(
cursor
.
getDouble
(
offset
+
47
));
entity
.
setKtPrintMainItem
(
cursor
.
getLong
(
offset
+
48
));
entity
.
setKtShowPrice
(
cursor
.
getLong
(
offset
+
49
));
entity
.
setPrintTo
(
cursor
.
getLong
(
offset
+
50
));
entity
.
setToPax
(
cursor
.
getLong
(
offset
+
51
));
entity
.
setFoodType
(
cursor
.
getLong
(
offset
+
52
));
entity
.
setMajorMainId
(
cursor
.
getLong
(
offset
+
53
));
entity
.
setDeptId
(
cursor
.
getLong
(
offset
+
54
));
entity
.
setServiceCharge
((
byte
)
cursor
.
getShort
(
offset
+
55
));
entity
.
setColorId
(
cursor
.
getLong
(
offset
+
56
));
entity
.
setConditions
(
cursor
.
getLong
(
offset
+
57
));
entity
.
setIsRt
(
cursor
.
getLong
(
offset
+
58
));
entity
.
setDeletes
(
cursor
.
getLong
(
offset
+
59
));
entity
.
setIsTimingFood
(
cursor
.
getLong
(
offset
+
60
));
entity
.
setMinLongTime
(
cursor
.
getLong
(
offset
+
61
));
entity
.
setUnitTime
(
cursor
.
getLong
(
offset
+
62
));
entity
.
setUnitPrice
(
cursor
.
getDouble
(
offset
+
63
));
entity
.
setFreeLongTime
(
cursor
.
getLong
(
offset
+
64
));
entity
.
setFreePeriodBegin
(
cursor
.
isNull
(
offset
+
65
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
65
)));
entity
.
setIsStatistic
(
cursor
.
getLong
(
offset
+
66
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
Food
entity
,
long
rowId
)
{
entity
.
setId
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
Food
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getId
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
Food
entity
)
{
return
entity
.
getId
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FoodModifierDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.FoodModifier
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "FOOD_MODIFIER".
*/
public
class
FoodModifierDao
extends
AbstractDao
<
FoodModifier
,
Long
>
{
public
static
final
String
TABLENAME
=
"FOOD_MODIFIER"
;
/**
* Properties of entity FoodModifier.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
true
,
"_id"
);
public
final
static
Property
Mid
=
new
Property
(
1
,
Long
.
class
,
"mid"
,
false
,
"MID"
);
public
final
static
Property
Fid
=
new
Property
(
2
,
Long
.
class
,
"fid"
,
false
,
"FID"
);
public
final
static
Property
MinQty
=
new
Property
(
3
,
int
.
class
,
"minQty"
,
false
,
"MIN_QTY"
);
public
final
static
Property
MaxQty
=
new
Property
(
4
,
int
.
class
,
"maxQty"
,
false
,
"MAX_QTY"
);
public
final
static
Property
SeqNo
=
new
Property
(
5
,
int
.
class
,
"seqNo"
,
false
,
"SEQ_NO"
);
public
final
static
Property
CreateTime
=
new
Property
(
6
,
String
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
CreateBy
=
new
Property
(
7
,
String
.
class
,
"createBy"
,
false
,
"CREATE_BY"
);
public
final
static
Property
UpdateTime
=
new
Property
(
8
,
String
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
ShowType
=
new
Property
(
9
,
int
.
class
,
"showType"
,
false
,
"SHOW_TYPE"
);
public
final
static
Property
AutoNext
=
new
Property
(
10
,
int
.
class
,
"autoNext"
,
false
,
"AUTO_NEXT"
);
public
final
static
Property
MultipleSelect
=
new
Property
(
11
,
int
.
class
,
"multipleSelect"
,
false
,
"MULTIPLE_SELECT"
);
public
final
static
Property
Defmodifier
=
new
Property
(
12
,
String
.
class
,
"defmodifier"
,
false
,
"DEFMODIFIER"
);
public
final
static
Property
Excmodifier
=
new
Property
(
13
,
String
.
class
,
"excmodifier"
,
false
,
"EXCMODIFIER"
);
public
final
static
Property
Conditions
=
new
Property
(
14
,
int
.
class
,
"conditions"
,
false
,
"CONDITIONS"
);
public
final
static
Property
IsRT
=
new
Property
(
15
,
int
.
class
,
"isRT"
,
false
,
"IS_RT"
);
public
final
static
Property
RestaurantId
=
new
Property
(
16
,
int
.
class
,
"restaurantId"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
PreferentialPrice
=
new
Property
(
17
,
int
.
class
,
"preferentialPrice"
,
false
,
"PREFERENTIAL_PRICE"
);
public
final
static
Property
PosId
=
new
Property
(
18
,
int
.
class
,
"posId"
,
false
,
"POS_ID"
);
}
public
FoodModifierDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
FoodModifierDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"FOOD_MODIFIER\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: id
"\"MID\" INTEGER NOT NULL ,"
+
// 1: mid
"\"FID\" INTEGER,"
+
// 2: fid
"\"MIN_QTY\" INTEGER NOT NULL ,"
+
// 3: minQty
"\"MAX_QTY\" INTEGER NOT NULL ,"
+
// 4: maxQty
"\"SEQ_NO\" INTEGER NOT NULL ,"
+
// 5: seqNo
"\"CREATE_TIME\" TEXT,"
+
// 6: createTime
"\"CREATE_BY\" TEXT,"
+
// 7: createBy
"\"UPDATE_TIME\" TEXT,"
+
// 8: updateTime
"\"SHOW_TYPE\" INTEGER NOT NULL ,"
+
// 9: showType
"\"AUTO_NEXT\" INTEGER NOT NULL ,"
+
// 10: autoNext
"\"MULTIPLE_SELECT\" INTEGER NOT NULL ,"
+
// 11: multipleSelect
"\"DEFMODIFIER\" TEXT,"
+
// 12: defmodifier
"\"EXCMODIFIER\" TEXT,"
+
// 13: excmodifier
"\"CONDITIONS\" INTEGER NOT NULL ,"
+
// 14: conditions
"\"IS_RT\" INTEGER NOT NULL ,"
+
// 15: isRT
"\"RESTAURANT_ID\" INTEGER NOT NULL ,"
+
// 16: restaurantId
"\"PREFERENTIAL_PRICE\" INTEGER NOT NULL ,"
+
// 17: preferentialPrice
"\"POS_ID\" INTEGER NOT NULL );"
);
// 18: posId
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"FOOD_MODIFIER\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
FoodModifier
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindLong
(
2
,
entity
.
getMid
());
Long
fid
=
entity
.
getFid
();
if
(
fid
!=
null
)
{
stmt
.
bindLong
(
3
,
fid
);
}
stmt
.
bindLong
(
4
,
entity
.
getMinQty
());
stmt
.
bindLong
(
5
,
entity
.
getMaxQty
());
stmt
.
bindLong
(
6
,
entity
.
getSeqNo
());
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
7
,
createTime
);
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
8
,
createBy
);
}
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
9
,
updateTime
);
}
stmt
.
bindLong
(
10
,
entity
.
getShowType
());
stmt
.
bindLong
(
11
,
entity
.
getAutoNext
());
stmt
.
bindLong
(
12
,
entity
.
getMultipleSelect
());
String
defmodifier
=
entity
.
getDefmodifier
();
if
(
defmodifier
!=
null
)
{
stmt
.
bindString
(
13
,
defmodifier
);
}
String
excmodifier
=
entity
.
getExcmodifier
();
if
(
excmodifier
!=
null
)
{
stmt
.
bindString
(
14
,
excmodifier
);
}
stmt
.
bindLong
(
15
,
entity
.
getConditions
());
stmt
.
bindLong
(
16
,
entity
.
getIsRT
());
stmt
.
bindLong
(
17
,
entity
.
getRestaurantId
());
stmt
.
bindLong
(
18
,
entity
.
getPreferentialPrice
());
stmt
.
bindLong
(
19
,
entity
.
getPosId
());
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
FoodModifier
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindLong
(
2
,
entity
.
getMid
());
Long
fid
=
entity
.
getFid
();
if
(
fid
!=
null
)
{
stmt
.
bindLong
(
3
,
fid
);
}
stmt
.
bindLong
(
4
,
entity
.
getMinQty
());
stmt
.
bindLong
(
5
,
entity
.
getMaxQty
());
stmt
.
bindLong
(
6
,
entity
.
getSeqNo
());
String
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindString
(
7
,
createTime
);
}
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
8
,
createBy
);
}
String
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindString
(
9
,
updateTime
);
}
stmt
.
bindLong
(
10
,
entity
.
getShowType
());
stmt
.
bindLong
(
11
,
entity
.
getAutoNext
());
stmt
.
bindLong
(
12
,
entity
.
getMultipleSelect
());
String
defmodifier
=
entity
.
getDefmodifier
();
if
(
defmodifier
!=
null
)
{
stmt
.
bindString
(
13
,
defmodifier
);
}
String
excmodifier
=
entity
.
getExcmodifier
();
if
(
excmodifier
!=
null
)
{
stmt
.
bindString
(
14
,
excmodifier
);
}
stmt
.
bindLong
(
15
,
entity
.
getConditions
());
stmt
.
bindLong
(
16
,
entity
.
getIsRT
());
stmt
.
bindLong
(
17
,
entity
.
getRestaurantId
());
stmt
.
bindLong
(
18
,
entity
.
getPreferentialPrice
());
stmt
.
bindLong
(
19
,
entity
.
getPosId
());
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
FoodModifier
readEntity
(
Cursor
cursor
,
int
offset
)
{
FoodModifier
entity
=
new
FoodModifier
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
getLong
(
offset
+
1
),
// mid
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getLong
(
offset
+
2
),
// fid
cursor
.
getInt
(
offset
+
3
),
// minQty
cursor
.
getInt
(
offset
+
4
),
// maxQty
cursor
.
getInt
(
offset
+
5
),
// seqNo
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// createTime
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// createBy
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// updateTime
cursor
.
getInt
(
offset
+
9
),
// showType
cursor
.
getInt
(
offset
+
10
),
// autoNext
cursor
.
getInt
(
offset
+
11
),
// multipleSelect
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
),
// defmodifier
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
),
// excmodifier
cursor
.
getInt
(
offset
+
14
),
// conditions
cursor
.
getInt
(
offset
+
15
),
// isRT
cursor
.
getInt
(
offset
+
16
),
// restaurantId
cursor
.
getInt
(
offset
+
17
),
// preferentialPrice
cursor
.
getInt
(
offset
+
18
)
// posId
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
FoodModifier
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setMid
(
cursor
.
getLong
(
offset
+
1
));
entity
.
setFid
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getLong
(
offset
+
2
));
entity
.
setMinQty
(
cursor
.
getInt
(
offset
+
3
));
entity
.
setMaxQty
(
cursor
.
getInt
(
offset
+
4
));
entity
.
setSeqNo
(
cursor
.
getInt
(
offset
+
5
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setCreateBy
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setShowType
(
cursor
.
getInt
(
offset
+
9
));
entity
.
setAutoNext
(
cursor
.
getInt
(
offset
+
10
));
entity
.
setMultipleSelect
(
cursor
.
getInt
(
offset
+
11
));
entity
.
setDefmodifier
(
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
));
entity
.
setExcmodifier
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
));
entity
.
setConditions
(
cursor
.
getInt
(
offset
+
14
));
entity
.
setIsRT
(
cursor
.
getInt
(
offset
+
15
));
entity
.
setRestaurantId
(
cursor
.
getInt
(
offset
+
16
));
entity
.
setPreferentialPrice
(
cursor
.
getInt
(
offset
+
17
));
entity
.
setPosId
(
cursor
.
getInt
(
offset
+
18
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
FoodModifier
entity
,
long
rowId
)
{
entity
.
setId
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
FoodModifier
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getId
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
FoodModifier
entity
)
{
return
entity
.
getId
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/FunctionDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.Function
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "FUNCTION".
*/
public
class
FunctionDao
extends
AbstractDao
<
Function
,
Long
>
{
public
static
final
String
TABLENAME
=
"FUNCTION"
;
/**
* Properties of entity Function.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Dbid
=
new
Property
(
0
,
Long
.
class
,
"dbid"
,
true
,
"_id"
);
public
final
static
Property
Id
=
new
Property
(
1
,
Long
.
class
,
"id"
,
false
,
"ID"
);
public
final
static
Property
ParentId
=
new
Property
(
2
,
int
.
class
,
"parentId"
,
false
,
"PARENT_ID"
);
public
final
static
Property
GroupId
=
new
Property
(
3
,
int
.
class
,
"groupId"
,
false
,
"GROUP_ID"
);
public
final
static
Property
EffectiveTime
=
new
Property
(
4
,
long
.
class
,
"effectiveTime"
,
false
,
"EFFECTIVE_TIME"
);
public
final
static
Property
ResName
=
new
Property
(
5
,
String
.
class
,
"resName"
,
false
,
"RES_NAME"
);
public
final
static
Property
ResUrl
=
new
Property
(
6
,
String
.
class
,
"resUrl"
,
false
,
"RES_URL"
);
public
final
static
Property
ImageURL
=
new
Property
(
7
,
String
.
class
,
"imageURL"
,
false
,
"IMAGE_URL"
);
public
final
static
Property
IcRes
=
new
Property
(
8
,
int
.
class
,
"icRes"
,
false
,
"IC_RES"
);
public
final
static
Property
Status
=
new
Property
(
9
,
int
.
class
,
"status"
,
false
,
"STATUS"
);
}
public
FunctionDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
FunctionDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"FUNCTION\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: dbid
"\"ID\" INTEGER NOT NULL ,"
+
// 1: id
"\"PARENT_ID\" INTEGER NOT NULL ,"
+
// 2: parentId
"\"GROUP_ID\" INTEGER NOT NULL ,"
+
// 3: groupId
"\"EFFECTIVE_TIME\" INTEGER NOT NULL ,"
+
// 4: effectiveTime
"\"RES_NAME\" TEXT,"
+
// 5: resName
"\"RES_URL\" TEXT,"
+
// 6: resUrl
"\"IMAGE_URL\" TEXT,"
+
// 7: imageURL
"\"IC_RES\" INTEGER NOT NULL ,"
+
// 8: icRes
"\"STATUS\" INTEGER NOT NULL );"
);
// 9: status
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"FUNCTION\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
Function
entity
)
{
stmt
.
clearBindings
();
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
1
,
dbid
);
}
stmt
.
bindLong
(
2
,
entity
.
getId
());
stmt
.
bindLong
(
3
,
entity
.
getParentId
());
stmt
.
bindLong
(
4
,
entity
.
getGroupId
());
stmt
.
bindLong
(
5
,
entity
.
getEffectiveTime
());
String
resName
=
entity
.
getResName
();
if
(
resName
!=
null
)
{
stmt
.
bindString
(
6
,
resName
);
}
String
resUrl
=
entity
.
getResUrl
();
if
(
resUrl
!=
null
)
{
stmt
.
bindString
(
7
,
resUrl
);
}
String
imageURL
=
entity
.
getImageURL
();
if
(
imageURL
!=
null
)
{
stmt
.
bindString
(
8
,
imageURL
);
}
stmt
.
bindLong
(
9
,
entity
.
getIcRes
());
stmt
.
bindLong
(
10
,
entity
.
getStatus
());
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
Function
entity
)
{
stmt
.
clearBindings
();
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
1
,
dbid
);
}
stmt
.
bindLong
(
2
,
entity
.
getId
());
stmt
.
bindLong
(
3
,
entity
.
getParentId
());
stmt
.
bindLong
(
4
,
entity
.
getGroupId
());
stmt
.
bindLong
(
5
,
entity
.
getEffectiveTime
());
String
resName
=
entity
.
getResName
();
if
(
resName
!=
null
)
{
stmt
.
bindString
(
6
,
resName
);
}
String
resUrl
=
entity
.
getResUrl
();
if
(
resUrl
!=
null
)
{
stmt
.
bindString
(
7
,
resUrl
);
}
String
imageURL
=
entity
.
getImageURL
();
if
(
imageURL
!=
null
)
{
stmt
.
bindString
(
8
,
imageURL
);
}
stmt
.
bindLong
(
9
,
entity
.
getIcRes
());
stmt
.
bindLong
(
10
,
entity
.
getStatus
());
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
Function
readEntity
(
Cursor
cursor
,
int
offset
)
{
Function
entity
=
new
Function
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// dbid
cursor
.
getLong
(
offset
+
1
),
// id
cursor
.
getInt
(
offset
+
2
),
// parentId
cursor
.
getInt
(
offset
+
3
),
// groupId
cursor
.
getLong
(
offset
+
4
),
// effectiveTime
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// resName
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// resUrl
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
),
// imageURL
cursor
.
getInt
(
offset
+
8
),
// icRes
cursor
.
getInt
(
offset
+
9
)
// status
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
Function
entity
,
int
offset
)
{
entity
.
setDbid
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setId
(
cursor
.
getLong
(
offset
+
1
));
entity
.
setParentId
(
cursor
.
getInt
(
offset
+
2
));
entity
.
setGroupId
(
cursor
.
getInt
(
offset
+
3
));
entity
.
setEffectiveTime
(
cursor
.
getLong
(
offset
+
4
));
entity
.
setResName
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setResUrl
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setImageURL
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getString
(
offset
+
7
));
entity
.
setIcRes
(
cursor
.
getInt
(
offset
+
8
));
entity
.
setStatus
(
cursor
.
getInt
(
offset
+
9
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
Function
entity
,
long
rowId
)
{
entity
.
setDbid
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
Function
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getDbid
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
Function
entity
)
{
return
entity
.
getDbid
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/LanguageDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.Language
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "LANGUAGE".
*/
public
class
LanguageDao
extends
AbstractDao
<
Language
,
Long
>
{
public
static
final
String
TABLENAME
=
"LANGUAGE"
;
/**
* Properties of entity Language.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
true
,
"_id"
);
public
final
static
Property
FunctionName
=
new
Property
(
1
,
String
.
class
,
"functionName"
,
false
,
"FUNCTION_NAME"
);
public
final
static
Property
LanguageName
=
new
Property
(
2
,
String
.
class
,
"languageName"
,
false
,
"LANGUAGE_NAME"
);
}
public
LanguageDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
LanguageDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"LANGUAGE\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: id
"\"FUNCTION_NAME\" TEXT NOT NULL ,"
+
// 1: functionName
"\"LANGUAGE_NAME\" TEXT);"
);
// 2: languageName
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"LANGUAGE\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
Language
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindString
(
2
,
entity
.
getFunctionName
());
String
languageName
=
entity
.
getLanguageName
();
if
(
languageName
!=
null
)
{
stmt
.
bindString
(
3
,
languageName
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
Language
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
stmt
.
bindString
(
2
,
entity
.
getFunctionName
());
String
languageName
=
entity
.
getLanguageName
();
if
(
languageName
!=
null
)
{
stmt
.
bindString
(
3
,
languageName
);
}
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
Language
readEntity
(
Cursor
cursor
,
int
offset
)
{
Language
entity
=
new
Language
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
getString
(
offset
+
1
),
// functionName
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
)
// languageName
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
Language
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setFunctionName
(
cursor
.
getString
(
offset
+
1
));
entity
.
setLanguageName
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
Language
entity
,
long
rowId
)
{
entity
.
setId
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
Language
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getId
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
Language
entity
)
{
return
entity
.
getId
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/ModifierDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.Modifier
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "MODIFIER".
*/
public
class
ModifierDao
extends
AbstractDao
<
Modifier
,
Long
>
{
public
static
final
String
TABLENAME
=
"MODIFIER"
;
/**
* Properties of entity Modifier.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Dbid
=
new
Property
(
0
,
Long
.
class
,
"dbid"
,
true
,
"_id"
);
public
final
static
Property
Mid
=
new
Property
(
1
,
long
.
class
,
"mid"
,
false
,
"MID"
);
public
final
static
Property
TopId
=
new
Property
(
2
,
long
.
class
,
"topId"
,
false
,
"TOP_ID"
);
public
final
static
Property
RestaurantId
=
new
Property
(
3
,
long
.
class
,
"restaurantId"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
ModifierName
=
new
Property
(
4
,
String
.
class
,
"modifierName"
,
false
,
"MODIFIER_NAME"
);
public
final
static
Property
SeqNo
=
new
Property
(
5
,
long
.
class
,
"seqNo"
,
false
,
"SEQ_NO"
);
public
final
static
Property
MarketPrice
=
new
Property
(
6
,
double
.
class
,
"marketPrice"
,
false
,
"MARKET_PRICE"
);
public
final
static
Property
Price
=
new
Property
(
7
,
double
.
class
,
"price"
,
false
,
"PRICE"
);
public
final
static
Property
LunchboxPrice
=
new
Property
(
8
,
double
.
class
,
"lunchboxPrice"
,
false
,
"LUNCHBOX_PRICE"
);
public
final
static
Property
ColorId
=
new
Property
(
9
,
long
.
class
,
"colorId"
,
false
,
"COLOR_ID"
);
public
final
static
Property
ImageUrl
=
new
Property
(
10
,
String
.
class
,
"imageUrl"
,
false
,
"IMAGE_URL"
);
public
final
static
Property
Invisible
=
new
Property
(
11
,
long
.
class
,
"invisible"
,
false
,
"INVISIBLE"
);
public
final
static
Property
Cost
=
new
Property
(
12
,
double
.
class
,
"cost"
,
false
,
"COST"
);
public
final
static
Property
StartDate
=
new
Property
(
13
,
java
.
util
.
Date
.
class
,
"startDate"
,
false
,
"START_DATE"
);
public
final
static
Property
EndDate
=
new
Property
(
14
,
java
.
util
.
Date
.
class
,
"endDate"
,
false
,
"END_DATE"
);
public
final
static
Property
Like
=
new
Property
(
15
,
long
.
class
,
"like"
,
false
,
"LIKE"
);
public
final
static
Property
TotalSold
=
new
Property
(
16
,
long
.
class
,
"totalSold"
,
false
,
"TOTAL_SOLD"
);
public
final
static
Property
MajorMainId
=
new
Property
(
17
,
long
.
class
,
"majorMainId"
,
false
,
"MAJOR_MAIN_ID"
);
public
final
static
Property
DeptId
=
new
Property
(
18
,
long
.
class
,
"deptId"
,
false
,
"DEPT_ID"
);
public
final
static
Property
CreateBy
=
new
Property
(
19
,
String
.
class
,
"createBy"
,
false
,
"CREATE_BY"
);
public
final
static
Property
CreateTime
=
new
Property
(
20
,
java
.
util
.
Date
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
UpdateBy
=
new
Property
(
21
,
String
.
class
,
"updateBy"
,
false
,
"UPDATE_BY"
);
public
final
static
Property
UpdateTime
=
new
Property
(
22
,
java
.
util
.
Date
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
PosFid
=
new
Property
(
23
,
String
.
class
,
"posFid"
,
false
,
"POS_FID"
);
public
final
static
Property
PId
=
new
Property
(
24
,
String
.
class
,
"pId"
,
false
,
"P_ID"
);
public
final
static
Property
AutoMod
=
new
Property
(
25
,
long
.
class
,
"autoMod"
,
false
,
"AUTO_MOD"
);
public
final
static
Property
BlueEdit
=
new
Property
(
26
,
long
.
class
,
"blueEdit"
,
false
,
"BLUE_EDIT"
);
public
final
static
Property
AutoMerge
=
new
Property
(
27
,
long
.
class
,
"autoMerge"
,
false
,
"AUTO_MERGE"
);
public
final
static
Property
CustomMsg
=
new
Property
(
28
,
long
.
class
,
"customMsg"
,
false
,
"CUSTOM_MSG"
);
public
final
static
Property
IsParent
=
new
Property
(
29
,
long
.
class
,
"isParent"
,
false
,
"IS_PARENT"
);
public
final
static
Property
ModifierName1
=
new
Property
(
30
,
String
.
class
,
"modifierName1"
,
false
,
"MODIFIER_NAME1"
);
public
final
static
Property
ModifierName2
=
new
Property
(
31
,
String
.
class
,
"modifierName2"
,
false
,
"MODIFIER_NAME2"
);
public
final
static
Property
Multiple
=
new
Property
(
32
,
double
.
class
,
"multiple"
,
false
,
"MULTIPLE"
);
public
final
static
Property
PrintSet
=
new
Property
(
33
,
String
.
class
,
"printSet"
,
false
,
"PRINT_SET"
);
public
final
static
Property
KtSetting
=
new
Property
(
34
,
String
.
class
,
"ktSetting"
,
false
,
"KT_SETTING"
);
public
final
static
Property
ModComm
=
new
Property
(
35
,
long
.
class
,
"modComm"
,
false
,
"MOD_COMM"
);
public
final
static
Property
ModTaste
=
new
Property
(
36
,
long
.
class
,
"modTaste"
,
false
,
"MOD_TASTE"
);
public
final
static
Property
ModMsg
=
new
Property
(
37
,
long
.
class
,
"modMsg"
,
false
,
"MOD_MSG"
);
public
final
static
Property
KtFireCourse
=
new
Property
(
38
,
long
.
class
,
"ktFireCourse"
,
false
,
"KT_FIRE_COURSE"
);
public
final
static
Property
AbleDisCount
=
new
Property
(
39
,
long
.
class
,
"ableDisCount"
,
false
,
"ABLE_DIS_COUNT"
);
public
final
static
Property
PrintToBill
=
new
Property
(
40
,
long
.
class
,
"printToBill"
,
false
,
"PRINT_TO_BILL"
);
public
final
static
Property
KtPrintMainItem
=
new
Property
(
41
,
long
.
class
,
"ktPrintMainItem"
,
false
,
"KT_PRINT_MAIN_ITEM"
);
public
final
static
Property
KtShowPrice
=
new
Property
(
42
,
long
.
class
,
"ktShowPrice"
,
false
,
"KT_SHOW_PRICE"
);
public
final
static
Property
KtFont
=
new
Property
(
43
,
long
.
class
,
"ktFont"
,
false
,
"KT_FONT"
);
public
final
static
Property
Conditions
=
new
Property
(
44
,
long
.
class
,
"conditions"
,
false
,
"CONDITIONS"
);
public
final
static
Property
IsRt
=
new
Property
(
45
,
long
.
class
,
"isRt"
,
false
,
"IS_RT"
);
public
final
static
Property
Visible
=
new
Property
(
46
,
byte
.
class
,
"visible"
,
false
,
"VISIBLE"
);
public
final
static
Property
Deletes
=
new
Property
(
47
,
long
.
class
,
"deletes"
,
false
,
"DELETES"
);
public
final
static
Property
IsStatistic
=
new
Property
(
48
,
long
.
class
,
"isStatistic"
,
false
,
"IS_STATISTIC"
);
}
public
ModifierDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
ModifierDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"MODIFIER\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: dbid
"\"MID\" INTEGER NOT NULL ,"
+
// 1: mid
"\"TOP_ID\" INTEGER NOT NULL ,"
+
// 2: topId
"\"RESTAURANT_ID\" INTEGER NOT NULL ,"
+
// 3: restaurantId
"\"MODIFIER_NAME\" TEXT,"
+
// 4: modifierName
"\"SEQ_NO\" INTEGER NOT NULL ,"
+
// 5: seqNo
"\"MARKET_PRICE\" REAL NOT NULL ,"
+
// 6: marketPrice
"\"PRICE\" REAL NOT NULL ,"
+
// 7: price
"\"LUNCHBOX_PRICE\" REAL NOT NULL ,"
+
// 8: lunchboxPrice
"\"COLOR_ID\" INTEGER NOT NULL ,"
+
// 9: colorId
"\"IMAGE_URL\" TEXT,"
+
// 10: imageUrl
"\"INVISIBLE\" INTEGER NOT NULL ,"
+
// 11: invisible
"\"COST\" REAL NOT NULL ,"
+
// 12: cost
"\"START_DATE\" INTEGER,"
+
// 13: startDate
"\"END_DATE\" INTEGER,"
+
// 14: endDate
"\"LIKE\" INTEGER NOT NULL ,"
+
// 15: like
"\"TOTAL_SOLD\" INTEGER NOT NULL ,"
+
// 16: totalSold
"\"MAJOR_MAIN_ID\" INTEGER NOT NULL ,"
+
// 17: majorMainId
"\"DEPT_ID\" INTEGER NOT NULL ,"
+
// 18: deptId
"\"CREATE_BY\" TEXT,"
+
// 19: createBy
"\"CREATE_TIME\" INTEGER,"
+
// 20: createTime
"\"UPDATE_BY\" TEXT,"
+
// 21: updateBy
"\"UPDATE_TIME\" INTEGER,"
+
// 22: updateTime
"\"POS_FID\" TEXT,"
+
// 23: posFid
"\"P_ID\" TEXT,"
+
// 24: pId
"\"AUTO_MOD\" INTEGER NOT NULL ,"
+
// 25: autoMod
"\"BLUE_EDIT\" INTEGER NOT NULL ,"
+
// 26: blueEdit
"\"AUTO_MERGE\" INTEGER NOT NULL ,"
+
// 27: autoMerge
"\"CUSTOM_MSG\" INTEGER NOT NULL ,"
+
// 28: customMsg
"\"IS_PARENT\" INTEGER NOT NULL ,"
+
// 29: isParent
"\"MODIFIER_NAME1\" TEXT,"
+
// 30: modifierName1
"\"MODIFIER_NAME2\" TEXT,"
+
// 31: modifierName2
"\"MULTIPLE\" REAL NOT NULL ,"
+
// 32: multiple
"\"PRINT_SET\" TEXT,"
+
// 33: printSet
"\"KT_SETTING\" TEXT,"
+
// 34: ktSetting
"\"MOD_COMM\" INTEGER NOT NULL ,"
+
// 35: modComm
"\"MOD_TASTE\" INTEGER NOT NULL ,"
+
// 36: modTaste
"\"MOD_MSG\" INTEGER NOT NULL ,"
+
// 37: modMsg
"\"KT_FIRE_COURSE\" INTEGER NOT NULL ,"
+
// 38: ktFireCourse
"\"ABLE_DIS_COUNT\" INTEGER NOT NULL ,"
+
// 39: ableDisCount
"\"PRINT_TO_BILL\" INTEGER NOT NULL ,"
+
// 40: printToBill
"\"KT_PRINT_MAIN_ITEM\" INTEGER NOT NULL ,"
+
// 41: ktPrintMainItem
"\"KT_SHOW_PRICE\" INTEGER NOT NULL ,"
+
// 42: ktShowPrice
"\"KT_FONT\" INTEGER NOT NULL ,"
+
// 43: ktFont
"\"CONDITIONS\" INTEGER NOT NULL ,"
+
// 44: conditions
"\"IS_RT\" INTEGER NOT NULL ,"
+
// 45: isRt
"\"VISIBLE\" INTEGER NOT NULL ,"
+
// 46: visible
"\"DELETES\" INTEGER NOT NULL ,"
+
// 47: deletes
"\"IS_STATISTIC\" INTEGER NOT NULL );"
);
// 48: isStatistic
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"MODIFIER\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
Modifier
entity
)
{
stmt
.
clearBindings
();
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
1
,
dbid
);
}
stmt
.
bindLong
(
2
,
entity
.
getMid
());
stmt
.
bindLong
(
3
,
entity
.
getTopId
());
stmt
.
bindLong
(
4
,
entity
.
getRestaurantId
());
String
modifierName
=
entity
.
getModifierName
();
if
(
modifierName
!=
null
)
{
stmt
.
bindString
(
5
,
modifierName
);
}
stmt
.
bindLong
(
6
,
entity
.
getSeqNo
());
stmt
.
bindDouble
(
7
,
entity
.
getMarketPrice
());
stmt
.
bindDouble
(
8
,
entity
.
getPrice
());
stmt
.
bindDouble
(
9
,
entity
.
getLunchboxPrice
());
stmt
.
bindLong
(
10
,
entity
.
getColorId
());
String
imageUrl
=
entity
.
getImageUrl
();
if
(
imageUrl
!=
null
)
{
stmt
.
bindString
(
11
,
imageUrl
);
}
stmt
.
bindLong
(
12
,
entity
.
getInvisible
());
stmt
.
bindDouble
(
13
,
entity
.
getCost
());
java
.
util
.
Date
startDate
=
entity
.
getStartDate
();
if
(
startDate
!=
null
)
{
stmt
.
bindLong
(
14
,
startDate
.
getTime
());
}
java
.
util
.
Date
endDate
=
entity
.
getEndDate
();
if
(
endDate
!=
null
)
{
stmt
.
bindLong
(
15
,
endDate
.
getTime
());
}
stmt
.
bindLong
(
16
,
entity
.
getLike
());
stmt
.
bindLong
(
17
,
entity
.
getTotalSold
());
stmt
.
bindLong
(
18
,
entity
.
getMajorMainId
());
stmt
.
bindLong
(
19
,
entity
.
getDeptId
());
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
20
,
createBy
);
}
java
.
util
.
Date
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
21
,
createTime
.
getTime
());
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
22
,
updateBy
);
}
java
.
util
.
Date
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
23
,
updateTime
.
getTime
());
}
String
posFid
=
entity
.
getPosFid
();
if
(
posFid
!=
null
)
{
stmt
.
bindString
(
24
,
posFid
);
}
String
pId
=
entity
.
getPId
();
if
(
pId
!=
null
)
{
stmt
.
bindString
(
25
,
pId
);
}
stmt
.
bindLong
(
26
,
entity
.
getAutoMod
());
stmt
.
bindLong
(
27
,
entity
.
getBlueEdit
());
stmt
.
bindLong
(
28
,
entity
.
getAutoMerge
());
stmt
.
bindLong
(
29
,
entity
.
getCustomMsg
());
stmt
.
bindLong
(
30
,
entity
.
getIsParent
());
String
modifierName1
=
entity
.
getModifierName1
();
if
(
modifierName1
!=
null
)
{
stmt
.
bindString
(
31
,
modifierName1
);
}
String
modifierName2
=
entity
.
getModifierName2
();
if
(
modifierName2
!=
null
)
{
stmt
.
bindString
(
32
,
modifierName2
);
}
stmt
.
bindDouble
(
33
,
entity
.
getMultiple
());
String
printSet
=
entity
.
getPrintSet
();
if
(
printSet
!=
null
)
{
stmt
.
bindString
(
34
,
printSet
);
}
String
ktSetting
=
entity
.
getKtSetting
();
if
(
ktSetting
!=
null
)
{
stmt
.
bindString
(
35
,
ktSetting
);
}
stmt
.
bindLong
(
36
,
entity
.
getModComm
());
stmt
.
bindLong
(
37
,
entity
.
getModTaste
());
stmt
.
bindLong
(
38
,
entity
.
getModMsg
());
stmt
.
bindLong
(
39
,
entity
.
getKtFireCourse
());
stmt
.
bindLong
(
40
,
entity
.
getAbleDisCount
());
stmt
.
bindLong
(
41
,
entity
.
getPrintToBill
());
stmt
.
bindLong
(
42
,
entity
.
getKtPrintMainItem
());
stmt
.
bindLong
(
43
,
entity
.
getKtShowPrice
());
stmt
.
bindLong
(
44
,
entity
.
getKtFont
());
stmt
.
bindLong
(
45
,
entity
.
getConditions
());
stmt
.
bindLong
(
46
,
entity
.
getIsRt
());
stmt
.
bindLong
(
47
,
entity
.
getVisible
());
stmt
.
bindLong
(
48
,
entity
.
getDeletes
());
stmt
.
bindLong
(
49
,
entity
.
getIsStatistic
());
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
Modifier
entity
)
{
stmt
.
clearBindings
();
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
1
,
dbid
);
}
stmt
.
bindLong
(
2
,
entity
.
getMid
());
stmt
.
bindLong
(
3
,
entity
.
getTopId
());
stmt
.
bindLong
(
4
,
entity
.
getRestaurantId
());
String
modifierName
=
entity
.
getModifierName
();
if
(
modifierName
!=
null
)
{
stmt
.
bindString
(
5
,
modifierName
);
}
stmt
.
bindLong
(
6
,
entity
.
getSeqNo
());
stmt
.
bindDouble
(
7
,
entity
.
getMarketPrice
());
stmt
.
bindDouble
(
8
,
entity
.
getPrice
());
stmt
.
bindDouble
(
9
,
entity
.
getLunchboxPrice
());
stmt
.
bindLong
(
10
,
entity
.
getColorId
());
String
imageUrl
=
entity
.
getImageUrl
();
if
(
imageUrl
!=
null
)
{
stmt
.
bindString
(
11
,
imageUrl
);
}
stmt
.
bindLong
(
12
,
entity
.
getInvisible
());
stmt
.
bindDouble
(
13
,
entity
.
getCost
());
java
.
util
.
Date
startDate
=
entity
.
getStartDate
();
if
(
startDate
!=
null
)
{
stmt
.
bindLong
(
14
,
startDate
.
getTime
());
}
java
.
util
.
Date
endDate
=
entity
.
getEndDate
();
if
(
endDate
!=
null
)
{
stmt
.
bindLong
(
15
,
endDate
.
getTime
());
}
stmt
.
bindLong
(
16
,
entity
.
getLike
());
stmt
.
bindLong
(
17
,
entity
.
getTotalSold
());
stmt
.
bindLong
(
18
,
entity
.
getMajorMainId
());
stmt
.
bindLong
(
19
,
entity
.
getDeptId
());
String
createBy
=
entity
.
getCreateBy
();
if
(
createBy
!=
null
)
{
stmt
.
bindString
(
20
,
createBy
);
}
java
.
util
.
Date
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
21
,
createTime
.
getTime
());
}
String
updateBy
=
entity
.
getUpdateBy
();
if
(
updateBy
!=
null
)
{
stmt
.
bindString
(
22
,
updateBy
);
}
java
.
util
.
Date
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
23
,
updateTime
.
getTime
());
}
String
posFid
=
entity
.
getPosFid
();
if
(
posFid
!=
null
)
{
stmt
.
bindString
(
24
,
posFid
);
}
String
pId
=
entity
.
getPId
();
if
(
pId
!=
null
)
{
stmt
.
bindString
(
25
,
pId
);
}
stmt
.
bindLong
(
26
,
entity
.
getAutoMod
());
stmt
.
bindLong
(
27
,
entity
.
getBlueEdit
());
stmt
.
bindLong
(
28
,
entity
.
getAutoMerge
());
stmt
.
bindLong
(
29
,
entity
.
getCustomMsg
());
stmt
.
bindLong
(
30
,
entity
.
getIsParent
());
String
modifierName1
=
entity
.
getModifierName1
();
if
(
modifierName1
!=
null
)
{
stmt
.
bindString
(
31
,
modifierName1
);
}
String
modifierName2
=
entity
.
getModifierName2
();
if
(
modifierName2
!=
null
)
{
stmt
.
bindString
(
32
,
modifierName2
);
}
stmt
.
bindDouble
(
33
,
entity
.
getMultiple
());
String
printSet
=
entity
.
getPrintSet
();
if
(
printSet
!=
null
)
{
stmt
.
bindString
(
34
,
printSet
);
}
String
ktSetting
=
entity
.
getKtSetting
();
if
(
ktSetting
!=
null
)
{
stmt
.
bindString
(
35
,
ktSetting
);
}
stmt
.
bindLong
(
36
,
entity
.
getModComm
());
stmt
.
bindLong
(
37
,
entity
.
getModTaste
());
stmt
.
bindLong
(
38
,
entity
.
getModMsg
());
stmt
.
bindLong
(
39
,
entity
.
getKtFireCourse
());
stmt
.
bindLong
(
40
,
entity
.
getAbleDisCount
());
stmt
.
bindLong
(
41
,
entity
.
getPrintToBill
());
stmt
.
bindLong
(
42
,
entity
.
getKtPrintMainItem
());
stmt
.
bindLong
(
43
,
entity
.
getKtShowPrice
());
stmt
.
bindLong
(
44
,
entity
.
getKtFont
());
stmt
.
bindLong
(
45
,
entity
.
getConditions
());
stmt
.
bindLong
(
46
,
entity
.
getIsRt
());
stmt
.
bindLong
(
47
,
entity
.
getVisible
());
stmt
.
bindLong
(
48
,
entity
.
getDeletes
());
stmt
.
bindLong
(
49
,
entity
.
getIsStatistic
());
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
Modifier
readEntity
(
Cursor
cursor
,
int
offset
)
{
Modifier
entity
=
new
Modifier
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// dbid
cursor
.
getLong
(
offset
+
1
),
// mid
cursor
.
getLong
(
offset
+
2
),
// topId
cursor
.
getLong
(
offset
+
3
),
// restaurantId
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
),
// modifierName
cursor
.
getLong
(
offset
+
5
),
// seqNo
cursor
.
getDouble
(
offset
+
6
),
// marketPrice
cursor
.
getDouble
(
offset
+
7
),
// price
cursor
.
getDouble
(
offset
+
8
),
// lunchboxPrice
cursor
.
getLong
(
offset
+
9
),
// colorId
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getString
(
offset
+
10
),
// imageUrl
cursor
.
getLong
(
offset
+
11
),
// invisible
cursor
.
getDouble
(
offset
+
12
),
// cost
cursor
.
isNull
(
offset
+
13
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
13
)),
// startDate
cursor
.
isNull
(
offset
+
14
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
14
)),
// endDate
cursor
.
getLong
(
offset
+
15
),
// like
cursor
.
getLong
(
offset
+
16
),
// totalSold
cursor
.
getLong
(
offset
+
17
),
// majorMainId
cursor
.
getLong
(
offset
+
18
),
// deptId
cursor
.
isNull
(
offset
+
19
)
?
null
:
cursor
.
getString
(
offset
+
19
),
// createBy
cursor
.
isNull
(
offset
+
20
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
20
)),
// createTime
cursor
.
isNull
(
offset
+
21
)
?
null
:
cursor
.
getString
(
offset
+
21
),
// updateBy
cursor
.
isNull
(
offset
+
22
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
22
)),
// updateTime
cursor
.
isNull
(
offset
+
23
)
?
null
:
cursor
.
getString
(
offset
+
23
),
// posFid
cursor
.
isNull
(
offset
+
24
)
?
null
:
cursor
.
getString
(
offset
+
24
),
// pId
cursor
.
getLong
(
offset
+
25
),
// autoMod
cursor
.
getLong
(
offset
+
26
),
// blueEdit
cursor
.
getLong
(
offset
+
27
),
// autoMerge
cursor
.
getLong
(
offset
+
28
),
// customMsg
cursor
.
getLong
(
offset
+
29
),
// isParent
cursor
.
isNull
(
offset
+
30
)
?
null
:
cursor
.
getString
(
offset
+
30
),
// modifierName1
cursor
.
isNull
(
offset
+
31
)
?
null
:
cursor
.
getString
(
offset
+
31
),
// modifierName2
cursor
.
getDouble
(
offset
+
32
),
// multiple
cursor
.
isNull
(
offset
+
33
)
?
null
:
cursor
.
getString
(
offset
+
33
),
// printSet
cursor
.
isNull
(
offset
+
34
)
?
null
:
cursor
.
getString
(
offset
+
34
),
// ktSetting
cursor
.
getLong
(
offset
+
35
),
// modComm
cursor
.
getLong
(
offset
+
36
),
// modTaste
cursor
.
getLong
(
offset
+
37
),
// modMsg
cursor
.
getLong
(
offset
+
38
),
// ktFireCourse
cursor
.
getLong
(
offset
+
39
),
// ableDisCount
cursor
.
getLong
(
offset
+
40
),
// printToBill
cursor
.
getLong
(
offset
+
41
),
// ktPrintMainItem
cursor
.
getLong
(
offset
+
42
),
// ktShowPrice
cursor
.
getLong
(
offset
+
43
),
// ktFont
cursor
.
getLong
(
offset
+
44
),
// conditions
cursor
.
getLong
(
offset
+
45
),
// isRt
(
byte
)
cursor
.
getShort
(
offset
+
46
),
// visible
cursor
.
getLong
(
offset
+
47
),
// deletes
cursor
.
getLong
(
offset
+
48
)
// isStatistic
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
Modifier
entity
,
int
offset
)
{
entity
.
setDbid
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setMid
(
cursor
.
getLong
(
offset
+
1
));
entity
.
setTopId
(
cursor
.
getLong
(
offset
+
2
));
entity
.
setRestaurantId
(
cursor
.
getLong
(
offset
+
3
));
entity
.
setModifierName
(
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
));
entity
.
setSeqNo
(
cursor
.
getLong
(
offset
+
5
));
entity
.
setMarketPrice
(
cursor
.
getDouble
(
offset
+
6
));
entity
.
setPrice
(
cursor
.
getDouble
(
offset
+
7
));
entity
.
setLunchboxPrice
(
cursor
.
getDouble
(
offset
+
8
));
entity
.
setColorId
(
cursor
.
getLong
(
offset
+
9
));
entity
.
setImageUrl
(
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getString
(
offset
+
10
));
entity
.
setInvisible
(
cursor
.
getLong
(
offset
+
11
));
entity
.
setCost
(
cursor
.
getDouble
(
offset
+
12
));
entity
.
setStartDate
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
13
)));
entity
.
setEndDate
(
cursor
.
isNull
(
offset
+
14
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
14
)));
entity
.
setLike
(
cursor
.
getLong
(
offset
+
15
));
entity
.
setTotalSold
(
cursor
.
getLong
(
offset
+
16
));
entity
.
setMajorMainId
(
cursor
.
getLong
(
offset
+
17
));
entity
.
setDeptId
(
cursor
.
getLong
(
offset
+
18
));
entity
.
setCreateBy
(
cursor
.
isNull
(
offset
+
19
)
?
null
:
cursor
.
getString
(
offset
+
19
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
20
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
20
)));
entity
.
setUpdateBy
(
cursor
.
isNull
(
offset
+
21
)
?
null
:
cursor
.
getString
(
offset
+
21
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
22
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
22
)));
entity
.
setPosFid
(
cursor
.
isNull
(
offset
+
23
)
?
null
:
cursor
.
getString
(
offset
+
23
));
entity
.
setPId
(
cursor
.
isNull
(
offset
+
24
)
?
null
:
cursor
.
getString
(
offset
+
24
));
entity
.
setAutoMod
(
cursor
.
getLong
(
offset
+
25
));
entity
.
setBlueEdit
(
cursor
.
getLong
(
offset
+
26
));
entity
.
setAutoMerge
(
cursor
.
getLong
(
offset
+
27
));
entity
.
setCustomMsg
(
cursor
.
getLong
(
offset
+
28
));
entity
.
setIsParent
(
cursor
.
getLong
(
offset
+
29
));
entity
.
setModifierName1
(
cursor
.
isNull
(
offset
+
30
)
?
null
:
cursor
.
getString
(
offset
+
30
));
entity
.
setModifierName2
(
cursor
.
isNull
(
offset
+
31
)
?
null
:
cursor
.
getString
(
offset
+
31
));
entity
.
setMultiple
(
cursor
.
getDouble
(
offset
+
32
));
entity
.
setPrintSet
(
cursor
.
isNull
(
offset
+
33
)
?
null
:
cursor
.
getString
(
offset
+
33
));
entity
.
setKtSetting
(
cursor
.
isNull
(
offset
+
34
)
?
null
:
cursor
.
getString
(
offset
+
34
));
entity
.
setModComm
(
cursor
.
getLong
(
offset
+
35
));
entity
.
setModTaste
(
cursor
.
getLong
(
offset
+
36
));
entity
.
setModMsg
(
cursor
.
getLong
(
offset
+
37
));
entity
.
setKtFireCourse
(
cursor
.
getLong
(
offset
+
38
));
entity
.
setAbleDisCount
(
cursor
.
getLong
(
offset
+
39
));
entity
.
setPrintToBill
(
cursor
.
getLong
(
offset
+
40
));
entity
.
setKtPrintMainItem
(
cursor
.
getLong
(
offset
+
41
));
entity
.
setKtShowPrice
(
cursor
.
getLong
(
offset
+
42
));
entity
.
setKtFont
(
cursor
.
getLong
(
offset
+
43
));
entity
.
setConditions
(
cursor
.
getLong
(
offset
+
44
));
entity
.
setIsRt
(
cursor
.
getLong
(
offset
+
45
));
entity
.
setVisible
((
byte
)
cursor
.
getShort
(
offset
+
46
));
entity
.
setDeletes
(
cursor
.
getLong
(
offset
+
47
));
entity
.
setIsStatistic
(
cursor
.
getLong
(
offset
+
48
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
Modifier
entity
,
long
rowId
)
{
entity
.
setDbid
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
Modifier
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getDbid
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
Modifier
entity
)
{
return
entity
.
getDbid
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrintCurrencyBeanDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.PrintCurrencyBean
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "PRINT_CURRENCY_BEAN".
*/
public
class
PrintCurrencyBeanDao
extends
AbstractDao
<
PrintCurrencyBean
,
Long
>
{
public
static
final
String
TABLENAME
=
"PRINT_CURRENCY_BEAN"
;
/**
* Properties of entity PrintCurrencyBean.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
false
,
"ID"
);
public
final
static
Property
Dbid
=
new
Property
(
1
,
Long
.
class
,
"dbid"
,
true
,
"_id"
);
public
final
static
Property
Name
=
new
Property
(
2
,
String
.
class
,
"name"
,
false
,
"NAME"
);
public
final
static
Property
RestaurantId
=
new
Property
(
3
,
Integer
.
class
,
"restaurantId"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
Type
=
new
Property
(
4
,
int
.
class
,
"type"
,
false
,
"TYPE"
);
public
final
static
Property
FoodComplexion
=
new
Property
(
5
,
int
.
class
,
"foodComplexion"
,
false
,
"FOOD_COMPLEXION"
);
public
final
static
Property
ModifierComplexion
=
new
Property
(
6
,
int
.
class
,
"modifierComplexion"
,
false
,
"MODIFIER_COMPLEXION"
);
public
final
static
Property
Deletes
=
new
Property
(
7
,
int
.
class
,
"deletes"
,
false
,
"DELETES"
);
public
final
static
Property
Uid
=
new
Property
(
8
,
Integer
.
class
,
"uid"
,
false
,
"UID"
);
public
final
static
Property
CreateTime
=
new
Property
(
9
,
Long
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
UpdateTime
=
new
Property
(
10
,
Long
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
FontId
=
new
Property
(
11
,
Long
.
class
,
"fontId"
,
false
,
"FONT_ID"
);
public
final
static
Property
FoodIsBold
=
new
Property
(
12
,
int
.
class
,
"foodIsBold"
,
false
,
"FOOD_IS_BOLD"
);
public
final
static
Property
FoodFont
=
new
Property
(
13
,
String
.
class
,
"foodFont"
,
false
,
"FOOD_FONT"
);
public
final
static
Property
FoodIsItalic
=
new
Property
(
14
,
int
.
class
,
"foodIsItalic"
,
false
,
"FOOD_IS_ITALIC"
);
public
final
static
Property
ModifierIsBold
=
new
Property
(
15
,
int
.
class
,
"modifierIsBold"
,
false
,
"MODIFIER_IS_BOLD"
);
public
final
static
Property
ModifierFont
=
new
Property
(
16
,
String
.
class
,
"modifierFont"
,
false
,
"MODIFIER_FONT"
);
public
final
static
Property
ModifierIsItalic
=
new
Property
(
17
,
int
.
class
,
"modifierIsItalic"
,
false
,
"MODIFIER_IS_ITALIC"
);
public
final
static
Property
NumberIsFlip
=
new
Property
(
18
,
int
.
class
,
"numberIsFlip"
,
false
,
"NUMBER_IS_FLIP"
);
}
public
PrintCurrencyBeanDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
PrintCurrencyBeanDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"PRINT_CURRENCY_BEAN\" ("
+
//
"\"ID\" INTEGER,"
+
// 0: id
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 1: dbid
"\"NAME\" TEXT,"
+
// 2: name
"\"RESTAURANT_ID\" INTEGER,"
+
// 3: restaurantId
"\"TYPE\" INTEGER NOT NULL ,"
+
// 4: type
"\"FOOD_COMPLEXION\" INTEGER NOT NULL ,"
+
// 5: foodComplexion
"\"MODIFIER_COMPLEXION\" INTEGER NOT NULL ,"
+
// 6: modifierComplexion
"\"DELETES\" INTEGER NOT NULL ,"
+
// 7: deletes
"\"UID\" INTEGER,"
+
// 8: uid
"\"CREATE_TIME\" INTEGER,"
+
// 9: createTime
"\"UPDATE_TIME\" INTEGER,"
+
// 10: updateTime
"\"FONT_ID\" INTEGER,"
+
// 11: fontId
"\"FOOD_IS_BOLD\" INTEGER NOT NULL ,"
+
// 12: foodIsBold
"\"FOOD_FONT\" TEXT,"
+
// 13: foodFont
"\"FOOD_IS_ITALIC\" INTEGER NOT NULL ,"
+
// 14: foodIsItalic
"\"MODIFIER_IS_BOLD\" INTEGER NOT NULL ,"
+
// 15: modifierIsBold
"\"MODIFIER_FONT\" TEXT,"
+
// 16: modifierFont
"\"MODIFIER_IS_ITALIC\" INTEGER NOT NULL ,"
+
// 17: modifierIsItalic
"\"NUMBER_IS_FLIP\" INTEGER NOT NULL );"
);
// 18: numberIsFlip
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"PRINT_CURRENCY_BEAN\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
PrintCurrencyBean
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
2
,
dbid
);
}
String
name
=
entity
.
getName
();
if
(
name
!=
null
)
{
stmt
.
bindString
(
3
,
name
);
}
Integer
restaurantId
=
entity
.
getRestaurantId
();
if
(
restaurantId
!=
null
)
{
stmt
.
bindLong
(
4
,
restaurantId
);
}
stmt
.
bindLong
(
5
,
entity
.
getType
());
stmt
.
bindLong
(
6
,
entity
.
getFoodComplexion
());
stmt
.
bindLong
(
7
,
entity
.
getModifierComplexion
());
stmt
.
bindLong
(
8
,
entity
.
getDeletes
());
Integer
uid
=
entity
.
getUid
();
if
(
uid
!=
null
)
{
stmt
.
bindLong
(
9
,
uid
);
}
Long
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
10
,
createTime
);
}
Long
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
11
,
updateTime
);
}
Long
fontId
=
entity
.
getFontId
();
if
(
fontId
!=
null
)
{
stmt
.
bindLong
(
12
,
fontId
);
}
stmt
.
bindLong
(
13
,
entity
.
getFoodIsBold
());
String
foodFont
=
entity
.
getFoodFont
();
if
(
foodFont
!=
null
)
{
stmt
.
bindString
(
14
,
foodFont
);
}
stmt
.
bindLong
(
15
,
entity
.
getFoodIsItalic
());
stmt
.
bindLong
(
16
,
entity
.
getModifierIsBold
());
String
modifierFont
=
entity
.
getModifierFont
();
if
(
modifierFont
!=
null
)
{
stmt
.
bindString
(
17
,
modifierFont
);
}
stmt
.
bindLong
(
18
,
entity
.
getModifierIsItalic
());
stmt
.
bindLong
(
19
,
entity
.
getNumberIsFlip
());
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
PrintCurrencyBean
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
2
,
dbid
);
}
String
name
=
entity
.
getName
();
if
(
name
!=
null
)
{
stmt
.
bindString
(
3
,
name
);
}
Integer
restaurantId
=
entity
.
getRestaurantId
();
if
(
restaurantId
!=
null
)
{
stmt
.
bindLong
(
4
,
restaurantId
);
}
stmt
.
bindLong
(
5
,
entity
.
getType
());
stmt
.
bindLong
(
6
,
entity
.
getFoodComplexion
());
stmt
.
bindLong
(
7
,
entity
.
getModifierComplexion
());
stmt
.
bindLong
(
8
,
entity
.
getDeletes
());
Integer
uid
=
entity
.
getUid
();
if
(
uid
!=
null
)
{
stmt
.
bindLong
(
9
,
uid
);
}
Long
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
10
,
createTime
);
}
Long
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
11
,
updateTime
);
}
Long
fontId
=
entity
.
getFontId
();
if
(
fontId
!=
null
)
{
stmt
.
bindLong
(
12
,
fontId
);
}
stmt
.
bindLong
(
13
,
entity
.
getFoodIsBold
());
String
foodFont
=
entity
.
getFoodFont
();
if
(
foodFont
!=
null
)
{
stmt
.
bindString
(
14
,
foodFont
);
}
stmt
.
bindLong
(
15
,
entity
.
getFoodIsItalic
());
stmt
.
bindLong
(
16
,
entity
.
getModifierIsBold
());
String
modifierFont
=
entity
.
getModifierFont
();
if
(
modifierFont
!=
null
)
{
stmt
.
bindString
(
17
,
modifierFont
);
}
stmt
.
bindLong
(
18
,
entity
.
getModifierIsItalic
());
stmt
.
bindLong
(
19
,
entity
.
getNumberIsFlip
());
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
);
}
@Override
public
PrintCurrencyBean
readEntity
(
Cursor
cursor
,
int
offset
)
{
PrintCurrencyBean
entity
=
new
PrintCurrencyBean
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
),
// dbid
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
),
// name
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getInt
(
offset
+
3
),
// restaurantId
cursor
.
getInt
(
offset
+
4
),
// type
cursor
.
getInt
(
offset
+
5
),
// foodComplexion
cursor
.
getInt
(
offset
+
6
),
// modifierComplexion
cursor
.
getInt
(
offset
+
7
),
// deletes
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getInt
(
offset
+
8
),
// uid
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getLong
(
offset
+
9
),
// createTime
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getLong
(
offset
+
10
),
// updateTime
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getLong
(
offset
+
11
),
// fontId
cursor
.
getInt
(
offset
+
12
),
// foodIsBold
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
),
// foodFont
cursor
.
getInt
(
offset
+
14
),
// foodIsItalic
cursor
.
getInt
(
offset
+
15
),
// modifierIsBold
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
),
// modifierFont
cursor
.
getInt
(
offset
+
17
),
// modifierIsItalic
cursor
.
getInt
(
offset
+
18
)
// numberIsFlip
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
PrintCurrencyBean
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setDbid
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
));
entity
.
setName
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
entity
.
setRestaurantId
(
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getInt
(
offset
+
3
));
entity
.
setType
(
cursor
.
getInt
(
offset
+
4
));
entity
.
setFoodComplexion
(
cursor
.
getInt
(
offset
+
5
));
entity
.
setModifierComplexion
(
cursor
.
getInt
(
offset
+
6
));
entity
.
setDeletes
(
cursor
.
getInt
(
offset
+
7
));
entity
.
setUid
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getInt
(
offset
+
8
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getLong
(
offset
+
9
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getLong
(
offset
+
10
));
entity
.
setFontId
(
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getLong
(
offset
+
11
));
entity
.
setFoodIsBold
(
cursor
.
getInt
(
offset
+
12
));
entity
.
setFoodFont
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
));
entity
.
setFoodIsItalic
(
cursor
.
getInt
(
offset
+
14
));
entity
.
setModifierIsBold
(
cursor
.
getInt
(
offset
+
15
));
entity
.
setModifierFont
(
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
));
entity
.
setModifierIsItalic
(
cursor
.
getInt
(
offset
+
17
));
entity
.
setNumberIsFlip
(
cursor
.
getInt
(
offset
+
18
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
PrintCurrencyBean
entity
,
long
rowId
)
{
entity
.
setDbid
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
PrintCurrencyBean
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getDbid
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
PrintCurrencyBean
entity
)
{
return
entity
.
getDbid
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrintModelBeanDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.PrintModelBean
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "PRINT_MODEL_BEAN".
*/
public
class
PrintModelBeanDao
extends
AbstractDao
<
PrintModelBean
,
Long
>
{
public
static
final
String
TABLENAME
=
"PRINT_MODEL_BEAN"
;
/**
* Properties of entity PrintModelBean.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Dbid
=
new
Property
(
0
,
Long
.
class
,
"dbid"
,
true
,
"_id"
);
public
final
static
Property
Id
=
new
Property
(
1
,
int
.
class
,
"id"
,
false
,
"ID"
);
public
final
static
Property
PaperSpecification
=
new
Property
(
2
,
String
.
class
,
"paperSpecification"
,
false
,
"PAPER_SPECIFICATION"
);
public
final
static
Property
PrinterName
=
new
Property
(
3
,
String
.
class
,
"printerName"
,
false
,
"PRINTER_NAME"
);
public
final
static
Property
Model
=
new
Property
(
4
,
String
.
class
,
"model"
,
false
,
"MODEL"
);
}
public
PrintModelBeanDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
PrintModelBeanDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"PRINT_MODEL_BEAN\" ("
+
//
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 0: dbid
"\"ID\" INTEGER NOT NULL ,"
+
// 1: id
"\"PAPER_SPECIFICATION\" TEXT,"
+
// 2: paperSpecification
"\"PRINTER_NAME\" TEXT,"
+
// 3: printerName
"\"MODEL\" TEXT);"
);
// 4: model
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"PRINT_MODEL_BEAN\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
PrintModelBean
entity
)
{
stmt
.
clearBindings
();
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
1
,
dbid
);
}
stmt
.
bindLong
(
2
,
entity
.
getId
());
String
paperSpecification
=
entity
.
getPaperSpecification
();
if
(
paperSpecification
!=
null
)
{
stmt
.
bindString
(
3
,
paperSpecification
);
}
String
printerName
=
entity
.
getPrinterName
();
if
(
printerName
!=
null
)
{
stmt
.
bindString
(
4
,
printerName
);
}
String
model
=
entity
.
getModel
();
if
(
model
!=
null
)
{
stmt
.
bindString
(
5
,
model
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
PrintModelBean
entity
)
{
stmt
.
clearBindings
();
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
1
,
dbid
);
}
stmt
.
bindLong
(
2
,
entity
.
getId
());
String
paperSpecification
=
entity
.
getPaperSpecification
();
if
(
paperSpecification
!=
null
)
{
stmt
.
bindString
(
3
,
paperSpecification
);
}
String
printerName
=
entity
.
getPrinterName
();
if
(
printerName
!=
null
)
{
stmt
.
bindString
(
4
,
printerName
);
}
String
model
=
entity
.
getModel
();
if
(
model
!=
null
)
{
stmt
.
bindString
(
5
,
model
);
}
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
);
}
@Override
public
PrintModelBean
readEntity
(
Cursor
cursor
,
int
offset
)
{
PrintModelBean
entity
=
new
PrintModelBean
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// dbid
cursor
.
getInt
(
offset
+
1
),
// id
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
),
// paperSpecification
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getString
(
offset
+
3
),
// printerName
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
)
// model
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
PrintModelBean
entity
,
int
offset
)
{
entity
.
setDbid
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setId
(
cursor
.
getInt
(
offset
+
1
));
entity
.
setPaperSpecification
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
entity
.
setPrinterName
(
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getString
(
offset
+
3
));
entity
.
setModel
(
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
PrintModelBean
entity
,
long
rowId
)
{
entity
.
setDbid
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
PrintModelBean
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getDbid
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
PrintModelBean
entity
)
{
return
entity
.
getDbid
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/greendao/PrinterDeviceBeanDao.java
deleted
100644 → 0
View file @
5aab5e4e
package
com
.
gingersoft
.
gsa
.
cloud
.
greendao
;
import
android.database.Cursor
;
import
android.database.sqlite.SQLiteStatement
;
import
org.greenrobot.greendao.AbstractDao
;
import
org.greenrobot.greendao.Property
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.database.Database
;
import
org.greenrobot.greendao.database.DatabaseStatement
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "PRINTER_DEVICE_BEAN".
*/
public
class
PrinterDeviceBeanDao
extends
AbstractDao
<
PrinterDeviceBean
,
Long
>
{
public
static
final
String
TABLENAME
=
"PRINTER_DEVICE_BEAN"
;
/**
* Properties of entity PrinterDeviceBean.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public
static
class
Properties
{
public
final
static
Property
Id
=
new
Property
(
0
,
Long
.
class
,
"id"
,
false
,
"ID"
);
public
final
static
Property
Dbid
=
new
Property
(
1
,
Long
.
class
,
"dbid"
,
true
,
"_id"
);
public
final
static
Property
Name
=
new
Property
(
2
,
String
.
class
,
"name"
,
false
,
"NAME"
);
public
final
static
Property
RestaurantId
=
new
Property
(
3
,
Integer
.
class
,
"restaurantId"
,
false
,
"RESTAURANT_ID"
);
public
final
static
Property
Ip
=
new
Property
(
4
,
String
.
class
,
"ip"
,
false
,
"IP"
);
public
final
static
Property
Uid
=
new
Property
(
5
,
Long
.
class
,
"uid"
,
false
,
"UID"
);
public
final
static
Property
Port
=
new
Property
(
6
,
Integer
.
class
,
"port"
,
false
,
"PORT"
);
public
final
static
Property
Type
=
new
Property
(
7
,
Integer
.
class
,
"type"
,
false
,
"TYPE"
);
public
final
static
Property
PrinterModelId
=
new
Property
(
8
,
Long
.
class
,
"printerModelId"
,
false
,
"PRINTER_MODEL_ID"
);
public
final
static
Property
PaperSpecification
=
new
Property
(
9
,
String
.
class
,
"paperSpecification"
,
false
,
"PAPER_SPECIFICATION"
);
public
final
static
Property
LineFontStop
=
new
Property
(
10
,
int
.
class
,
"lineFontStop"
,
false
,
"LINE_FONT_STOP"
);
public
final
static
Property
PrinterName
=
new
Property
(
11
,
String
.
class
,
"printerName"
,
false
,
"PRINTER_NAME"
);
public
final
static
Property
Model
=
new
Property
(
12
,
String
.
class
,
"model"
,
false
,
"MODEL"
);
public
final
static
Property
NoteContent
=
new
Property
(
13
,
String
.
class
,
"noteContent"
,
false
,
"NOTE_CONTENT"
);
public
final
static
Property
PrinterDeviceDefaultId
=
new
Property
(
14
,
Long
.
class
,
"printerDeviceDefaultId"
,
false
,
"PRINTER_DEVICE_DEFAULT_ID"
);
public
final
static
Property
PrinterDeviceType
=
new
Property
(
15
,
int
.
class
,
"printerDeviceType"
,
false
,
"PRINTER_DEVICE_TYPE"
);
public
final
static
Property
FlyPrinterDeviceId
=
new
Property
(
16
,
Long
.
class
,
"flyPrinterDeviceId"
,
false
,
"FLY_PRINTER_DEVICE_ID"
);
public
final
static
Property
FlyPrinterDeviceId2
=
new
Property
(
17
,
Long
.
class
,
"flyPrinterDeviceId2"
,
false
,
"FLY_PRINTER_DEVICE_ID2"
);
public
final
static
Property
FoodComplexion
=
new
Property
(
18
,
int
.
class
,
"foodComplexion"
,
false
,
"FOOD_COMPLEXION"
);
public
final
static
Property
ModifierComplexion
=
new
Property
(
19
,
int
.
class
,
"modifierComplexion"
,
false
,
"MODIFIER_COMPLEXION"
);
public
final
static
Property
FoodIsBold
=
new
Property
(
20
,
int
.
class
,
"foodIsBold"
,
false
,
"FOOD_IS_BOLD"
);
public
final
static
Property
FoodFont
=
new
Property
(
21
,
String
.
class
,
"foodFont"
,
false
,
"FOOD_FONT"
);
public
final
static
Property
FoodIsItalic
=
new
Property
(
22
,
int
.
class
,
"foodIsItalic"
,
false
,
"FOOD_IS_ITALIC"
);
public
final
static
Property
ModifierIsBold
=
new
Property
(
23
,
int
.
class
,
"modifierIsBold"
,
false
,
"MODIFIER_IS_BOLD"
);
public
final
static
Property
ModifierFont
=
new
Property
(
24
,
String
.
class
,
"modifierFont"
,
false
,
"MODIFIER_FONT"
);
public
final
static
Property
ModifierIsItalic
=
new
Property
(
25
,
int
.
class
,
"modifierIsItalic"
,
false
,
"MODIFIER_IS_ITALIC"
);
public
final
static
Property
NumberIsFlip
=
new
Property
(
26
,
int
.
class
,
"numberIsFlip"
,
false
,
"NUMBER_IS_FLIP"
);
public
final
static
Property
LanguageType
=
new
Property
(
27
,
String
.
class
,
"languageType"
,
false
,
"LANGUAGE_TYPE"
);
}
public
PrinterDeviceBeanDao
(
DaoConfig
config
)
{
super
(
config
);
}
public
PrinterDeviceBeanDao
(
DaoConfig
config
,
DaoSession
daoSession
)
{
super
(
config
,
daoSession
);
}
/** Creates the underlying database table. */
public
static
void
createTable
(
Database
db
,
boolean
ifNotExists
)
{
String
constraint
=
ifNotExists
?
"IF NOT EXISTS "
:
""
;
db
.
execSQL
(
"CREATE TABLE "
+
constraint
+
"\"PRINTER_DEVICE_BEAN\" ("
+
//
"\"ID\" INTEGER,"
+
// 0: id
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ,"
+
// 1: dbid
"\"NAME\" TEXT,"
+
// 2: name
"\"RESTAURANT_ID\" INTEGER,"
+
// 3: restaurantId
"\"IP\" TEXT,"
+
// 4: ip
"\"UID\" INTEGER,"
+
// 5: uid
"\"PORT\" INTEGER,"
+
// 6: port
"\"TYPE\" INTEGER,"
+
// 7: type
"\"PRINTER_MODEL_ID\" INTEGER,"
+
// 8: printerModelId
"\"PAPER_SPECIFICATION\" TEXT,"
+
// 9: paperSpecification
"\"LINE_FONT_STOP\" INTEGER NOT NULL ,"
+
// 10: lineFontStop
"\"PRINTER_NAME\" TEXT,"
+
// 11: printerName
"\"MODEL\" TEXT,"
+
// 12: model
"\"NOTE_CONTENT\" TEXT,"
+
// 13: noteContent
"\"PRINTER_DEVICE_DEFAULT_ID\" INTEGER,"
+
// 14: printerDeviceDefaultId
"\"PRINTER_DEVICE_TYPE\" INTEGER NOT NULL ,"
+
// 15: printerDeviceType
"\"FLY_PRINTER_DEVICE_ID\" INTEGER,"
+
// 16: flyPrinterDeviceId
"\"FLY_PRINTER_DEVICE_ID2\" INTEGER,"
+
// 17: flyPrinterDeviceId2
"\"FOOD_COMPLEXION\" INTEGER NOT NULL ,"
+
// 18: foodComplexion
"\"MODIFIER_COMPLEXION\" INTEGER NOT NULL ,"
+
// 19: modifierComplexion
"\"FOOD_IS_BOLD\" INTEGER NOT NULL ,"
+
// 20: foodIsBold
"\"FOOD_FONT\" TEXT,"
+
// 21: foodFont
"\"FOOD_IS_ITALIC\" INTEGER NOT NULL ,"
+
// 22: foodIsItalic
"\"MODIFIER_IS_BOLD\" INTEGER NOT NULL ,"
+
// 23: modifierIsBold
"\"MODIFIER_FONT\" TEXT,"
+
// 24: modifierFont
"\"MODIFIER_IS_ITALIC\" INTEGER NOT NULL ,"
+
// 25: modifierIsItalic
"\"NUMBER_IS_FLIP\" INTEGER NOT NULL ,"
+
// 26: numberIsFlip
"\"LANGUAGE_TYPE\" TEXT);"
);
// 27: languageType
}
/** Drops the underlying database table. */
public
static
void
dropTable
(
Database
db
,
boolean
ifExists
)
{
String
sql
=
"DROP TABLE "
+
(
ifExists
?
"IF EXISTS "
:
""
)
+
"\"PRINTER_DEVICE_BEAN\""
;
db
.
execSQL
(
sql
);
}
@Override
protected
final
void
bindValues
(
DatabaseStatement
stmt
,
PrinterDeviceBean
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
2
,
dbid
);
}
String
name
=
entity
.
getName
();
if
(
name
!=
null
)
{
stmt
.
bindString
(
3
,
name
);
}
Integer
restaurantId
=
entity
.
getRestaurantId
();
if
(
restaurantId
!=
null
)
{
stmt
.
bindLong
(
4
,
restaurantId
);
}
String
ip
=
entity
.
getIp
();
if
(
ip
!=
null
)
{
stmt
.
bindString
(
5
,
ip
);
}
Long
uid
=
entity
.
getUid
();
if
(
uid
!=
null
)
{
stmt
.
bindLong
(
6
,
uid
);
}
Integer
port
=
entity
.
getPort
();
if
(
port
!=
null
)
{
stmt
.
bindLong
(
7
,
port
);
}
Integer
type
=
entity
.
getType
();
if
(
type
!=
null
)
{
stmt
.
bindLong
(
8
,
type
);
}
Long
printerModelId
=
entity
.
getPrinterModelId
();
if
(
printerModelId
!=
null
)
{
stmt
.
bindLong
(
9
,
printerModelId
);
}
String
paperSpecification
=
entity
.
getPaperSpecification
();
if
(
paperSpecification
!=
null
)
{
stmt
.
bindString
(
10
,
paperSpecification
);
}
stmt
.
bindLong
(
11
,
entity
.
getLineFontStop
());
String
printerName
=
entity
.
getPrinterName
();
if
(
printerName
!=
null
)
{
stmt
.
bindString
(
12
,
printerName
);
}
String
model
=
entity
.
getModel
();
if
(
model
!=
null
)
{
stmt
.
bindString
(
13
,
model
);
}
String
noteContent
=
entity
.
getNoteContent
();
if
(
noteContent
!=
null
)
{
stmt
.
bindString
(
14
,
noteContent
);
}
Long
printerDeviceDefaultId
=
entity
.
getPrinterDeviceDefaultId
();
if
(
printerDeviceDefaultId
!=
null
)
{
stmt
.
bindLong
(
15
,
printerDeviceDefaultId
);
}
stmt
.
bindLong
(
16
,
entity
.
getPrinterDeviceType
());
Long
flyPrinterDeviceId
=
entity
.
getFlyPrinterDeviceId
();
if
(
flyPrinterDeviceId
!=
null
)
{
stmt
.
bindLong
(
17
,
flyPrinterDeviceId
);
}
Long
flyPrinterDeviceId2
=
entity
.
getFlyPrinterDeviceId2
();
if
(
flyPrinterDeviceId2
!=
null
)
{
stmt
.
bindLong
(
18
,
flyPrinterDeviceId2
);
}
stmt
.
bindLong
(
19
,
entity
.
getFoodComplexion
());
stmt
.
bindLong
(
20
,
entity
.
getModifierComplexion
());
stmt
.
bindLong
(
21
,
entity
.
getFoodIsBold
());
String
foodFont
=
entity
.
getFoodFont
();
if
(
foodFont
!=
null
)
{
stmt
.
bindString
(
22
,
foodFont
);
}
stmt
.
bindLong
(
23
,
entity
.
getFoodIsItalic
());
stmt
.
bindLong
(
24
,
entity
.
getModifierIsBold
());
String
modifierFont
=
entity
.
getModifierFont
();
if
(
modifierFont
!=
null
)
{
stmt
.
bindString
(
25
,
modifierFont
);
}
stmt
.
bindLong
(
26
,
entity
.
getModifierIsItalic
());
stmt
.
bindLong
(
27
,
entity
.
getNumberIsFlip
());
String
languageType
=
entity
.
getLanguageType
();
if
(
languageType
!=
null
)
{
stmt
.
bindString
(
28
,
languageType
);
}
}
@Override
protected
final
void
bindValues
(
SQLiteStatement
stmt
,
PrinterDeviceBean
entity
)
{
stmt
.
clearBindings
();
Long
id
=
entity
.
getId
();
if
(
id
!=
null
)
{
stmt
.
bindLong
(
1
,
id
);
}
Long
dbid
=
entity
.
getDbid
();
if
(
dbid
!=
null
)
{
stmt
.
bindLong
(
2
,
dbid
);
}
String
name
=
entity
.
getName
();
if
(
name
!=
null
)
{
stmt
.
bindString
(
3
,
name
);
}
Integer
restaurantId
=
entity
.
getRestaurantId
();
if
(
restaurantId
!=
null
)
{
stmt
.
bindLong
(
4
,
restaurantId
);
}
String
ip
=
entity
.
getIp
();
if
(
ip
!=
null
)
{
stmt
.
bindString
(
5
,
ip
);
}
Long
uid
=
entity
.
getUid
();
if
(
uid
!=
null
)
{
stmt
.
bindLong
(
6
,
uid
);
}
Integer
port
=
entity
.
getPort
();
if
(
port
!=
null
)
{
stmt
.
bindLong
(
7
,
port
);
}
Integer
type
=
entity
.
getType
();
if
(
type
!=
null
)
{
stmt
.
bindLong
(
8
,
type
);
}
Long
printerModelId
=
entity
.
getPrinterModelId
();
if
(
printerModelId
!=
null
)
{
stmt
.
bindLong
(
9
,
printerModelId
);
}
String
paperSpecification
=
entity
.
getPaperSpecification
();
if
(
paperSpecification
!=
null
)
{
stmt
.
bindString
(
10
,
paperSpecification
);
}
stmt
.
bindLong
(
11
,
entity
.
getLineFontStop
());
String
printerName
=
entity
.
getPrinterName
();
if
(
printerName
!=
null
)
{
stmt
.
bindString
(
12
,
printerName
);
}
String
model
=
entity
.
getModel
();
if
(
model
!=
null
)
{
stmt
.
bindString
(
13
,
model
);
}
String
noteContent
=
entity
.
getNoteContent
();
if
(
noteContent
!=
null
)
{
stmt
.
bindString
(
14
,
noteContent
);
}
Long
printerDeviceDefaultId
=
entity
.
getPrinterDeviceDefaultId
();
if
(
printerDeviceDefaultId
!=
null
)
{
stmt
.
bindLong
(
15
,
printerDeviceDefaultId
);
}
stmt
.
bindLong
(
16
,
entity
.
getPrinterDeviceType
());
Long
flyPrinterDeviceId
=
entity
.
getFlyPrinterDeviceId
();
if
(
flyPrinterDeviceId
!=
null
)
{
stmt
.
bindLong
(
17
,
flyPrinterDeviceId
);
}
Long
flyPrinterDeviceId2
=
entity
.
getFlyPrinterDeviceId2
();
if
(
flyPrinterDeviceId2
!=
null
)
{
stmt
.
bindLong
(
18
,
flyPrinterDeviceId2
);
}
stmt
.
bindLong
(
19
,
entity
.
getFoodComplexion
());
stmt
.
bindLong
(
20
,
entity
.
getModifierComplexion
());
stmt
.
bindLong
(
21
,
entity
.
getFoodIsBold
());
String
foodFont
=
entity
.
getFoodFont
();
if
(
foodFont
!=
null
)
{
stmt
.
bindString
(
22
,
foodFont
);
}
stmt
.
bindLong
(
23
,
entity
.
getFoodIsItalic
());
stmt
.
bindLong
(
24
,
entity
.
getModifierIsBold
());
String
modifierFont
=
entity
.
getModifierFont
();
if
(
modifierFont
!=
null
)
{
stmt
.
bindString
(
25
,
modifierFont
);
}
stmt
.
bindLong
(
26
,
entity
.
getModifierIsItalic
());
stmt
.
bindLong
(
27
,
entity
.
getNumberIsFlip
());
String
languageType
=
entity
.
getLanguageType
();
if
(
languageType
!=
null
)
{
stmt
.
bindString
(
28
,
languageType
);
}
}
@Override
public
Long
readKey
(
Cursor
cursor
,
int
offset
)
{
return
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
);
}
@Override
public
PrinterDeviceBean
readEntity
(
Cursor
cursor
,
int
offset
)
{
PrinterDeviceBean
entity
=
new
PrinterDeviceBean
(
//
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
),
// id
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
),
// dbid
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
),
// name
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getInt
(
offset
+
3
),
// restaurantId
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
),
// ip
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getLong
(
offset
+
5
),
// uid
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getInt
(
offset
+
6
),
// port
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getInt
(
offset
+
7
),
// type
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getLong
(
offset
+
8
),
// printerModelId
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
),
// paperSpecification
cursor
.
getInt
(
offset
+
10
),
// lineFontStop
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
),
// printerName
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
),
// model
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
),
// noteContent
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getLong
(
offset
+
14
),
// printerDeviceDefaultId
cursor
.
getInt
(
offset
+
15
),
// printerDeviceType
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getLong
(
offset
+
16
),
// flyPrinterDeviceId
cursor
.
isNull
(
offset
+
17
)
?
null
:
cursor
.
getLong
(
offset
+
17
),
// flyPrinterDeviceId2
cursor
.
getInt
(
offset
+
18
),
// foodComplexion
cursor
.
getInt
(
offset
+
19
),
// modifierComplexion
cursor
.
getInt
(
offset
+
20
),
// foodIsBold
cursor
.
isNull
(
offset
+
21
)
?
null
:
cursor
.
getString
(
offset
+
21
),
// foodFont
cursor
.
getInt
(
offset
+
22
),
// foodIsItalic
cursor
.
getInt
(
offset
+
23
),
// modifierIsBold
cursor
.
isNull
(
offset
+
24
)
?
null
:
cursor
.
getString
(
offset
+
24
),
// modifierFont
cursor
.
getInt
(
offset
+
25
),
// modifierIsItalic
cursor
.
getInt
(
offset
+
26
),
// numberIsFlip
cursor
.
isNull
(
offset
+
27
)
?
null
:
cursor
.
getString
(
offset
+
27
)
// languageType
);
return
entity
;
}
@Override
public
void
readEntity
(
Cursor
cursor
,
PrinterDeviceBean
entity
,
int
offset
)
{
entity
.
setId
(
cursor
.
isNull
(
offset
+
0
)
?
null
:
cursor
.
getLong
(
offset
+
0
));
entity
.
setDbid
(
cursor
.
isNull
(
offset
+
1
)
?
null
:
cursor
.
getLong
(
offset
+
1
));
entity
.
setName
(
cursor
.
isNull
(
offset
+
2
)
?
null
:
cursor
.
getString
(
offset
+
2
));
entity
.
setRestaurantId
(
cursor
.
isNull
(
offset
+
3
)
?
null
:
cursor
.
getInt
(
offset
+
3
));
entity
.
setIp
(
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
));
entity
.
setUid
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getLong
(
offset
+
5
));
entity
.
setPort
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getInt
(
offset
+
6
));
entity
.
setType
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getInt
(
offset
+
7
));
entity
.
setPrinterModelId
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getLong
(
offset
+
8
));
entity
.
setPaperSpecification
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getString
(
offset
+
9
));
entity
.
setLineFontStop
(
cursor
.
getInt
(
offset
+
10
));
entity
.
setPrinterName
(
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getString
(
offset
+
11
));
entity
.
setModel
(
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
));
entity
.
setNoteContent
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
));
entity
.
setPrinterDeviceDefaultId
(
cursor
.
isNull
(
offset
+
14
)
?
null
:
cursor
.
getLong
(
offset
+
14
));
entity
.
setPrinterDeviceType
(
cursor
.
getInt
(
offset
+
15
));
entity
.
setFlyPrinterDeviceId
(
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getLong
(
offset
+
16
));
entity
.
setFlyPrinterDeviceId2
(
cursor
.
isNull
(
offset
+
17
)
?
null
:
cursor
.
getLong
(
offset
+
17
));
entity
.
setFoodComplexion
(
cursor
.
getInt
(
offset
+
18
));
entity
.
setModifierComplexion
(
cursor
.
getInt
(
offset
+
19
));
entity
.
setFoodIsBold
(
cursor
.
getInt
(
offset
+
20
));
entity
.
setFoodFont
(
cursor
.
isNull
(
offset
+
21
)
?
null
:
cursor
.
getString
(
offset
+
21
));
entity
.
setFoodIsItalic
(
cursor
.
getInt
(
offset
+
22
));
entity
.
setModifierIsBold
(
cursor
.
getInt
(
offset
+
23
));
entity
.
setModifierFont
(
cursor
.
isNull
(
offset
+
24
)
?
null
:
cursor
.
getString
(
offset
+
24
));
entity
.
setModifierIsItalic
(
cursor
.
getInt
(
offset
+
25
));
entity
.
setNumberIsFlip
(
cursor
.
getInt
(
offset
+
26
));
entity
.
setLanguageType
(
cursor
.
isNull
(
offset
+
27
)
?
null
:
cursor
.
getString
(
offset
+
27
));
}
@Override
protected
final
Long
updateKeyAfterInsert
(
PrinterDeviceBean
entity
,
long
rowId
)
{
entity
.
setDbid
(
rowId
);
return
rowId
;
}
@Override
public
Long
getKey
(
PrinterDeviceBean
entity
)
{
if
(
entity
!=
null
)
{
return
entity
.
getDbid
();
}
else
{
return
null
;
}
}
@Override
public
boolean
hasKey
(
PrinterDeviceBean
entity
)
{
return
entity
.
getDbid
()
!=
null
;
}
@Override
protected
final
boolean
isEntityUpdateable
()
{
return
true
;
}
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/SoldoutCtrlActivity.java
View file @
b6bfdbd5
...
...
@@ -233,7 +233,6 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
//总的页数向上取整
totalPage
=
(
int
)
Math
.
ceil
(
foodGroupList
.
size
()
*
1.0
/
GoldConstants
.
foodGriupPageSize
);
int
Rows
=
foodGroupRow
;
if
(
foodGroupList
.
size
()
<=
foodGroupColumn
)
{
Rows
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment