public class BaseQueryImpl extends BaseCommonBoImpl implements BaseQuery, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
codebuffertype_by代碼加名稱 |
static java.lang.String |
codebuffertype_default |
static java.lang.String |
codeidvarString |
static java.lang.String |
codename_formatString |
static java.lang.String |
codenamevarString |
static java.lang.String |
KEY_aliasName |
| Constructor and Description |
|---|
BaseQueryImpl() |
BaseQueryImpl(MaliContext inContext) |
BaseQueryImpl(MaliContext inContext,
java.lang.String intable) |
BaseQueryImpl(java.lang.String intable) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEqualBooleanYN(java.lang.String inkey,
java.lang.Boolean infieldvalue)
equal boolean 轉換成 Y/N 若 BOOEALN 為 false ,資料庫有可能為null 或是 N , 因此用此FUNCTION 轉換
|
void |
addNotEqualCondition(java.lang.String infieldName,
java.lang.Object infieldvalue)
不等於
|
void |
addWhereBetweenCondition(java.lang.String infieldName,
java.lang.Object inminfieldvalue,
java.lang.Object inmaxfieldvalue) |
void |
addWhereBetweenKeyCondition(java.lang.Object fieldvalue,
java.lang.String inminKeyFieldName,
java.lang.String inmaxKeyFieldName)
data 內容大於等於 minKeyField(欄位) and data內容小於等於 maxKeyField
|
void |
addWhereBetweenMoreCondition(java.lang.String infieldName,
java.lang.Object inminfieldvalue,
java.lang.Object inmaxfieldvalue) |
void |
addWhereCondition(java.lang.String inCondition) |
void |
addWhereCondition(java.lang.String inCondition,
java.util.Vector inSubKeyVector)
增加子sql and
|
void |
addWhereEqualCondition(java.lang.String infieldName,
java.lang.Object infieldvalue) |
void |
addWhereEqualCondition(java.lang.String infieldName,
java.lang.String infieldvalue) |
void |
addWhereEqualKeyFieldCondition(java.lang.String infieldNames,
java.lang.String infieldNamev)
key field conditoin key部份欄位的 alias 部份自行設定
|
void |
addWhereEqualMoreCondition(java.lang.String infieldName,
java.lang.Object infieldvalue)
equal more equal 多筆時.則使用 or for 相同key時
|
void |
addWhereGrantthanAndEqualCondition(java.lang.String infield,
java.lang.Object infiledvalue) |
void |
addWhereGrantthanAndEqualCondition(java.lang.String infield,
java.lang.String infiledvalue) |
void |
addWhereGrantthanCondition(java.lang.String infield,
java.lang.Object infieldvalue) |
void |
addWhereInCondition(java.lang.String infieldName,
java.lang.String infieldvalue) |
void |
addWhereInCondition(java.lang.String infieldName,
java.lang.String[] infieldvalue) |
void |
addWhereLikeCondition(java.lang.String infieldName,
java.lang.String infieldvalue) |
void |
addWhereLikeKeyFieldCondition(java.lang.String infieldNames,
java.lang.String infieldNamev)
key field condition key 部份欄位的alias 部份自行設定
|
void |
addWhereLikeMoreCondition(clsSqlData[] infieldvalues)
設定多個欄位 like 用 or 方式串起
|
void |
addWhereLikeMoreCondition(java.lang.String infieldName,
java.lang.String infieldvalue) |
void |
addWhereLikeValueLikeLeftKeyFieldCondition(java.lang.String infieldvalue,
java.lang.String infieldNames)
like 放在KeyField 前面 , value like %keyfield
|
void |
addWhereNotEqualCondition(java.lang.String infieldName,
java.lang.Object infieldvalue) |
void |
addWhereNotEqualCondition(java.lang.String infieldName,
java.lang.String infieldvalue) |
void |
addWhereNotInCondition(java.lang.String infieldName,
java.lang.String infieldvalue) |
void |
addWhereNotInCondition(java.lang.String infieldName,
java.lang.String[] infieldvalue) |
void |
addWhereNotLikeCondition(java.lang.String infieldName,
java.lang.String infieldvalue) |
void |
addWhereOrCodition(java.lang.String[] inConditions,
java.util.Vector inSubKeyVector) |
void |
addWhereSmallthanAndEqualCondition(java.lang.String infield,
java.lang.Object infiledvalue) |
void |
addWhereSmallthanAndEqualCondition(java.lang.String infield,
java.lang.String infiledvalue) |
void |
addWhereSmallthanCondition(java.lang.String infield,
java.lang.Object infieldvalue) |
BaseQuery |
CopyNewQuery()
產生新的BaseQuery 包括原來已有的條件值
|
boolean |
executeBatch()
執行batch 動作
|
void |
executeBatch(BaseTable[] indatas) |
java.lang.String |
getAliasName() |
BaseTable[] |
getBaseTableDataContent() |
BaseTable[] |
getBaseTableDataContent(int rowstart,
int maxrownumbers)
若 set usingsession 等於 true 則直接取 暫存記錄中的資料筆數, 若false 則直接由資料庫取記錄
|
java.lang.String[] |
getCodeBuffer(java.lang.String infield_id,
java.lang.String infield_name)
取代碼內容
|
java.lang.String |
getCodeBuffer顯示方式() |
ConnDbCom |
getConnDbCom() |
java.lang.String |
getfieldMergString(java.lang.String[] infields)
合併資料庫欄位或是欄位值,為配合不同資料庫處理方式
|
java.lang.String |
getJoinKeyConditionString() |
java.util.Vector |
getJoinKeyCondtionKeys() |
MaliContext |
getMaliContext() |
java.lang.Object |
getmaxData(java.lang.String infieldname)
取回最大值的資料
|
java.lang.Object |
getminData(java.lang.String infieldname)
取回最小值的資料 找不到欄位時,則return null
|
int |
getRecordCount()
get資料筆數
|
BaseTable |
getRecordFirstRow()
取第一筆資料
|
BaseTable |
getRecordLastRow()
取最後一筆資料
|
java.lang.String[] |
getSelectField() |
java.lang.String[] |
getSortfield() |
java.lang.String |
getSQLString() |
java.lang.String |
getSQLText()
與 getSQLString 相同 function
|
java.lang.String |
getTableName() |
int |
getupdateRecordCount() |
java.util.Vector |
getWhereConditionKeys()
查詢條件值
|
java.lang.String |
getWhereConditionString() |
java.util.Hashtable |
getWhereEqualMoreTable() |
java.lang.String |
getWhereEqualString(java.lang.String infieldName,
java.lang.String infieldvalue) |
java.util.Hashtable |
getWhereKeyVector() |
java.util.Hashtable |
getWhereVector() |
java.lang.String |
getXMLRows()
查詢資料轉成XML格式
轉成xml String 格式
|
java.lang.String |
getXMLRows(java.lang.String inRootName)
查詢資料轉成XML格式
|
boolean |
isaddCondition(java.lang.String Key)
是否己add 查詢條件
|
boolean |
isExistsData()
檢查資料是否存在,不做任何處理
|
boolean |
isnotWhereCondition()
沒有where條件
|
boolean |
isSelectDistinct() |
void |
resetCondition() |
void |
setAliasName(java.lang.String inpara)
設定 table 有alias 別名,若有設定.則where key 欄位均會加上 alias name
|
void |
setCodeBuffer顯示方式(java.lang.String intype)
CodeBuffer顯示方式 若不設定則依正常一般方式顯示
|
void |
setConnDbCom(ConnDbCom inConn) |
void |
setCopyCondition(java.lang.String inWhereString,
java.util.Vector inWhereKey)
固定where 條件, 原條件清除
|
void |
setDataBaseType(java.lang.String intype)
設定資料庫連線代碼
|
void |
setDefaultlogicoperatorsUsingAnd()
sql where condition default using and link, default and
|
void |
setDefaultlogicoperatorsUsingOr()
sql where condition default using or link
|
void |
setDESCSortfield(java.lang.String[] infieldvalue) |
void |
setexecuteToDelete()
設定 execute 為 delete
主要是提供多筆delete
|
void |
setexecuteToQuery()
設定 execute 為Query
|
void |
setexecuteToUpdate()
設定 execute 為 update
主要是提供多筆 update
|
void |
setexecuteType(java.lang.String intype)
default 是 select , 若是要做update 或是 delete 需set
|
void |
setGroupField(java.lang.String[] infieldname)
set group by field
|
void |
setJoinKeyCondition(java.lang.String inCondition) |
void |
setJoinKeyConditoin(java.lang.String inCondition,
java.util.Vector inkeyVector) |
void |
setJoinTableName(java.lang.String[] inpara,
java.lang.String injointype)
set join table(應只有兩個)
|
void |
setMaliContext(MaliContext inContext) |
void |
setSelectDistinct(boolean in)
是否增加distinct
|
void |
setSelectField(java.lang.String[] infieldname) |
void |
setSortfield(java.lang.String[] infieldvalue) |
void |
setSQLText(java.lang.String insql) |
void |
setSQLText(java.lang.String insqltext,
java.util.Vector inKeyVector) |
void |
setTableName(java.lang.String inpara) |
void |
setUpdatefield(java.lang.String infieldname,
java.lang.Object infieldvalue)
要設為update 才可setupdatefield, 若set updatefield 則將execute 設為update
|
void |
setUpdateKeyField(java.lang.String infieldname,
java.lang.String sourcefieldname)
update table 欄位至某個欄位
|
void |
setUsingSession(java.lang.Boolean in)
使用暫存資料
|
void |
sort(int[] in)
只針對 isusesession 為true 處理, 且已有取回過資料,要另外進行sort 時作業
以欄位序號排序,預設由小到大
|
void |
sort(int[] in,
boolean ascsort)
只針對 isusesession 為true 處理, 且已有取回過資料,要另外進行sort 時作業
以欄位序號進行排序動作
|
void |
sort(java.lang.String[] in)
只針對 isusesession 為true 處理, 且已有取回過資料,要另外進行sort 時作業
以欄位名稱進行排序, sort 預設由小到大
|
void |
sort(java.lang.String[] in,
boolean ascsort)
只針對 isusesession 為true 處理, 且已有取回過資料,要另外進行sort 時作業
下 要準備依什麼欄位進行排序動作,針對有做暫存 isusession 的部份去執行 sort, 若有,則sort 進去,可用 BaseTableDataContent() 顯示資料
|
getcreateDateTimeKey, getcreateUserIdKey, getcreateUserOrgIdKey, getmodifyDateTimeKey, getmodifyUserIdKey, getmodifyUserOrgIdKey, getPrimaryIdKey, isFieldbyBaseTable, setcreateDateTimeKey, setcreateUserIdKey, setcreateUserOrgIdKey, setFieldbyBaseTable, setmodifyDateTimeKey, setmodifyUserIdKey, setmodifyUserOrgIdkey, setPrimaryIdKeycreateObjectByByteArray, createObjectByteArray, getHashTableContent, setVectorFielddataequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetcreateDateTimeKey, getcreateUserIdKey, getcreateUserOrgIdKey, getmodifyDateTimeKey, getmodifyUserIdKey, getmodifyUserOrgIdKey, getPrimaryIdKey, isFieldbyBaseTable, setcreateDateTimeKey, setcreateUserIdKey, setcreateUserOrgIdKey, setmodifyDateTimeKey, setmodifyUserIdKey, setmodifyUserOrgIdkey, setPrimaryIdKeypublic static java.lang.String codebuffertype_default
public static java.lang.String codebuffertype_by代碼加名稱
public static java.lang.String codename_formatString
public static java.lang.String codeidvarString
public static java.lang.String codenamevarString
public static java.lang.String KEY_aliasName
public BaseQueryImpl()
public BaseQueryImpl(MaliContext inContext)
public BaseQueryImpl(MaliContext inContext, java.lang.String intable)
public BaseQueryImpl(java.lang.String intable)
public void addWhereCondition(java.lang.String inCondition)
addWhereCondition in interface BaseQuerypublic java.util.Hashtable getWhereEqualMoreTable()
public void addWhereBetweenCondition(java.lang.String infieldName,
java.lang.Object inminfieldvalue,
java.lang.Object inmaxfieldvalue)
addWhereBetweenCondition in interface BaseQuerypublic java.lang.String getWhereEqualString(java.lang.String infieldName,
java.lang.String infieldvalue)
public void addWhereEqualCondition(java.lang.String infieldName,
java.lang.String infieldvalue)
addWhereEqualCondition in interface BaseQuerypublic void addWhereInCondition(java.lang.String infieldName,
java.lang.String infieldvalue)
addWhereInCondition in interface BaseQuerypublic void addWhereLikeCondition(java.lang.String infieldName,
java.lang.String infieldvalue)
addWhereLikeCondition in interface BaseQuerypublic BaseTable[] getBaseTableDataContent()
getBaseTableDataContent in interface BaseQuerypublic java.lang.String getWhereConditionString()
getWhereConditionString in interface BaseQuerypublic void resetCondition()
resetCondition in interface BaseQuerypublic void setSelectField(java.lang.String[] infieldname)
setSelectField in interface BaseQuerypublic void setTableName(java.lang.String inpara)
setTableName in interface BaseQuerypublic void addWhereEqualCondition(java.lang.String infieldName,
java.lang.Object infieldvalue)
addWhereEqualCondition in interface BaseQuerypublic void setSortfield(java.lang.String[] infieldvalue)
setSortfield in interface BaseQuerypublic void setDESCSortfield(java.lang.String[] infieldvalue)
setDESCSortfield in interface BaseQuerypublic java.lang.String getTableName()
getTableName in interface BaseQuerypublic void addWhereSmallthanAndEqualCondition(java.lang.String infield,
java.lang.Object infiledvalue)
addWhereSmallthanAndEqualCondition in interface BaseQuerypublic void addWhereSmallthanAndEqualCondition(java.lang.String infield,
java.lang.String infiledvalue)
addWhereSmallthanAndEqualCondition in interface BaseQuerypublic java.lang.String getSQLString()
getSQLString in interface BaseQuerypublic void setMaliContext(MaliContext inContext)
setMaliContext in interface BaseQuerypublic ConnDbCom getConnDbCom()
getConnDbCom in interface BaseQuerypublic void setConnDbCom(ConnDbCom inConn)
setConnDbCom in interface BaseQuerypublic void addWhereNotInCondition(java.lang.String infieldName,
java.lang.String infieldvalue)
addWhereNotInCondition in interface BaseQuerypublic void addWhereGrantthanAndEqualCondition(java.lang.String infield,
java.lang.Object infiledvalue)
addWhereGrantthanAndEqualCondition in interface BaseQuerypublic void addWhereGrantthanAndEqualCondition(java.lang.String infield,
java.lang.String infiledvalue)
addWhereGrantthanAndEqualCondition in interface BaseQuerypublic void addWhereGrantthanCondition(java.lang.String infield,
java.lang.Object infieldvalue)
addWhereGrantthanCondition in interface BaseQuerypublic void setCodeBuffer顯示方式(java.lang.String intype)
setCodeBuffer顯示方式 in interface BaseQueryintype - 0 是一般 代碼 , 顯示中文, intype 1 是代碼, 顯示 代碼+中文public java.lang.String getCodeBuffer顯示方式()
getCodeBuffer顯示方式 in interface BaseQuerypublic java.lang.String[] getCodeBuffer(java.lang.String infield_id,
java.lang.String infield_name)
BaseQuerygetCodeBuffer in interface BaseQueryinfield_id - 設定 id 欄位名稱infield_name - 設定 name 欄位名稱public void setSQLText(java.lang.String insql)
setSQLText in interface BaseQuerypublic void setSQLText(java.lang.String insqltext,
java.util.Vector inKeyVector)
setSQLText in interface BaseQuerypublic java.lang.String getSQLText()
getSQLText in interface BaseQuerypublic void addNotEqualCondition(java.lang.String infieldName,
java.lang.Object infieldvalue)
BaseQueryaddNotEqualCondition in interface BaseQueryinfieldvalue - String 格式public void addWhereInCondition(java.lang.String infieldName,
java.lang.String[] infieldvalue)
addWhereInCondition in interface BaseQuerypublic int getRecordCount()
BaseQuerygetRecordCount in interface BaseQuerypublic java.lang.String getXMLRows()
BaseQuerygetXMLRows in interface BaseQuerypublic java.lang.String getXMLRows(java.lang.String inRootName)
BaseQuerygetXMLRows in interface BaseQueryinRootName - 可設定 RootNamepublic void addWhereOrCodition(java.lang.String[] inConditions,
java.util.Vector inSubKeyVector)
addWhereOrCodition in interface BaseQuerypublic java.util.Hashtable getWhereVector()
public java.util.Hashtable getWhereKeyVector()
public java.util.Vector getWhereConditionKeys()
BaseQuerygetWhereConditionKeys in interface BaseQuerypublic void setGroupField(java.lang.String[] infieldname)
BaseQuerysetGroupField in interface BaseQuerypublic void addWhereEqualKeyFieldCondition(java.lang.String infieldNames,
java.lang.String infieldNamev)
addWhereEqualKeyFieldCondition in interface BaseQuerypublic void addWhereLikeKeyFieldCondition(java.lang.String infieldNames,
java.lang.String infieldNamev)
addWhereLikeKeyFieldCondition in interface BaseQuerypublic BaseTable[] getBaseTableDataContent(int rowstart, int maxrownumbers)
BaseQuerygetBaseTableDataContent in interface BaseQuerymaxrownumbers - 最多取幾筆public void addWhereCondition(java.lang.String inCondition,
java.util.Vector inSubKeyVector)
BaseQueryaddWhereCondition in interface BaseQuerypublic java.lang.String[] getSortfield()
getSortfield in interface BaseQuerypublic void setJoinTableName(java.lang.String[] inpara,
java.lang.String injointype)
BaseQuerysetJoinTableName in interface BaseQuerypublic void setJoinKeyCondition(java.lang.String inCondition)
setJoinKeyCondition in interface BaseQuerypublic BaseQuery CopyNewQuery()
BaseQueryCopyNewQuery in interface BaseQuerypublic void setCopyCondition(java.lang.String inWhereString,
java.util.Vector inWhereKey)
BaseQuerysetCopyCondition in interface BaseQuerypublic void addWhereLikeValueLikeLeftKeyFieldCondition(java.lang.String infieldvalue,
java.lang.String infieldNames)
BaseQueryaddWhereLikeValueLikeLeftKeyFieldCondition in interface BaseQuerypublic void addWhereNotEqualCondition(java.lang.String infieldName,
java.lang.String infieldvalue)
addWhereNotEqualCondition in interface BaseQuerypublic java.lang.Object getminData(java.lang.String infieldname)
getminData in interface BaseQueryinfieldname - public java.lang.Object getmaxData(java.lang.String infieldname)
getmaxData in interface BaseQueryinfieldname - public void setUsingSession(java.lang.Boolean in)
setUsingSession in interface BaseQuerypublic BaseTable getRecordFirstRow()
BaseQuerygetRecordFirstRow in interface BaseQuerypublic BaseTable getRecordLastRow()
BaseQuerygetRecordLastRow in interface BaseQuerypublic void sort(java.lang.String[] in,
boolean ascsort)
public void sort(java.lang.String[] in)
BaseQuerypublic void sort(int[] in,
boolean ascsort)
BaseQuerypublic void sort(int[] in)
BaseQuerypublic java.lang.String[] getSelectField()
getSelectField in interface BaseQuerypublic void setexecuteToDelete()
BaseQuerysetexecuteToDelete in interface BaseQuerypublic void setexecuteToUpdate()
BaseQuerysetexecuteToUpdate in interface BaseQuerypublic void setexecuteToQuery()
BaseQuerysetexecuteToQuery in interface BaseQuerypublic void setUpdatefield(java.lang.String infieldname,
java.lang.Object infieldvalue)
BaseQuerysetUpdatefield in interface BaseQuerypublic boolean executeBatch()
BaseQueryexecuteBatch in interface BaseQuerypublic void setexecuteType(java.lang.String intype)
BaseQuerysetexecuteType in interface BaseQueryintype - delete or updatepublic void addWhereNotLikeCondition(java.lang.String infieldName,
java.lang.String infieldvalue)
addWhereNotLikeCondition in interface BaseQuerypublic void addWhereLikeMoreCondition(java.lang.String infieldName,
java.lang.String infieldvalue)
addWhereLikeMoreCondition in interface BaseQuerypublic void executeBatch(BaseTable[] indatas) throws java.lang.Exception
executeBatch in interface BaseQueryjava.lang.Exceptionpublic void addWhereBetweenKeyCondition(java.lang.Object fieldvalue,
java.lang.String inminKeyFieldName,
java.lang.String inmaxKeyFieldName)
BaseQueryaddWhereBetweenKeyCondition in interface BaseQuerypublic void addWhereNotInCondition(java.lang.String infieldName,
java.lang.String[] infieldvalue)
addWhereNotInCondition in interface BaseQuerypublic void addWhereBetweenMoreCondition(java.lang.String infieldName,
java.lang.Object inminfieldvalue,
java.lang.Object inmaxfieldvalue)
addWhereBetweenMoreCondition in interface BaseQuerypublic void setDataBaseType(java.lang.String intype)
setDataBaseType in class BaseCommonBoImplpublic void addEqualBooleanYN(java.lang.String inkey,
java.lang.Boolean infieldvalue)
addEqualBooleanYN in interface BaseQueryinkey - infieldvalue - public void addWhereLikeMoreCondition(clsSqlData[] infieldvalues)
BaseQueryaddWhereLikeMoreCondition in interface BaseQuerypublic void setUpdateKeyField(java.lang.String infieldname,
java.lang.String sourcefieldname)
BaseQuerysetUpdateKeyField in interface BaseQueryinfieldname - tokeyfieldsourcefieldname - fromkeyfieldpublic void setAliasName(java.lang.String inpara)
BaseQuerysetAliasName in interface BaseQuerypublic java.lang.String getAliasName()
getAliasName in interface BaseQuerypublic void addWhereEqualMoreCondition(java.lang.String infieldName,
java.lang.Object infieldvalue)
BaseQueryaddWhereEqualMoreCondition in interface BaseQuerypublic void addWhereNotEqualCondition(java.lang.String infieldName,
java.lang.Object infieldvalue)
addWhereNotEqualCondition in interface BaseQuerypublic void setJoinKeyConditoin(java.lang.String inCondition,
java.util.Vector inkeyVector)
setJoinKeyConditoin in interface BaseQuerypublic MaliContext getMaliContext()
public void setDefaultlogicoperatorsUsingOr()
BaseQuerysetDefaultlogicoperatorsUsingOr in interface BaseQuerypublic void setDefaultlogicoperatorsUsingAnd()
BaseQuerysetDefaultlogicoperatorsUsingAnd in interface BaseQuerypublic int getupdateRecordCount()
getupdateRecordCount in interface BaseQuerypublic boolean isaddCondition(java.lang.String Key)
BaseQueryisaddCondition in interface BaseQuerypublic boolean isExistsData()
throws java.lang.Exception
BaseQueryisExistsData in interface BaseQueryjava.lang.Exceptionpublic void setSelectDistinct(boolean in)
BaseQuerysetSelectDistinct in interface BaseQuerypublic boolean isSelectDistinct()
isSelectDistinct in interface BaseQuerypublic java.lang.String getJoinKeyConditionString()
getJoinKeyConditionString in interface BaseQuerypublic java.util.Vector getJoinKeyCondtionKeys()
getJoinKeyCondtionKeys in interface BaseQuerypublic void addWhereSmallthanCondition(java.lang.String infield,
java.lang.Object infieldvalue)
addWhereSmallthanCondition in interface BaseQuerypublic java.lang.String getfieldMergString(java.lang.String[] infields)
BaseQuerygetfieldMergString in interface BaseQuerypublic boolean isnotWhereCondition()
isnotWhereCondition in interface BaseQuery