Commit 443b6946 by lsk

cacheRead String类型方法修改

parent 3dbed902
......@@ -4,7 +4,9 @@ void gridSetValues(IDatafield argstg,String argtds)
//! ArgStg
//! ArgTds Tdsname to identify the configuration used to load the stream
String stgVal = "";
Platform.cacheRead( stgVal, "stgmod", argtds, "StreamGridValues" );
Argument<String> stgValBox=new Argument<>("","");
Platform.cacheRead( stgValBox, "stgmod", argtds, "StreamGridValues" );
stgVal=stgValBox.value;
Platform.setFieldValue( argstg, stgVal );
}
\ No newline at end of file
......@@ -7,13 +7,17 @@ String gridGetSql(String argtds,IModule argrec,String argaddtbl,String argcon,St
//! ArgCon holds the condition to select the fitting entries
//! ArgOrder holds an optional order specification as list of comma separated fieldinstances
String sqlFld = "";
Platform.cacheRead( sqlFld, "stgmod", argtds, "SqlSelectFields" );
Argument<String> sqlFldBox=new Argument<>("","");
Platform.cacheRead( sqlFldBox, "stgmod", argtds, "SqlSelectFields" );
sqlFld=sqlFldBox.value;
if( Platform.errorCode() > 0 )
{
Platform.sysDump( Platform.formatText( "STGMOD.GridGetSql: tds id '$1' is not yet defined with GridCfgStore.", argtds ) );
}
String sqlTbl = "";
Platform.cacheRead( sqlTbl, "stgmod", argtds, "SqlSelectTables" );
Argument<String> sqlTblBox=new Argument<>("","");
Platform.cacheRead( sqlTblBox, "stgmod", argtds, "SqlSelectTables" );
sqlTbl=sqlTblBox.value;
String argTbl = NULLSTR;
if( ! Platform.isEmpty( argaddtbl ) )
{
......@@ -34,7 +38,9 @@ String gridGetSql(String argtds,IModule argrec,String argaddtbl,String argcon,St
String sql = "select " + sqlFld + " from " + sqlTbl + " ";
String conDel = " where ";
String sqlCon = "";
Platform.cacheRead( sqlCon, "stgmod", argtds, "SqlSelectCondition" );
Argument<String> sqlConBox=new Argument<>("","");
Platform.cacheRead( sqlConBox, "stgmod", argtds, "SqlSelectCondition" );
sqlCon=sqlConBox.value;
if( ! Platform.isEmpty( sqlCon ) )
{
sql = sql + conDel + sqlCon;
......@@ -56,7 +62,9 @@ String gridGetSql(String argtds,IModule argrec,String argaddtbl,String argcon,St
int ignore = 0;
if( Platform.isEmpty( sqlOrd ) )
{
Platform.cacheRead( sqlOrd, "stgmod", argtds, "SqlSelectOrder" );
Argument<String> sqlOrdBox=new Argument<>("","");
Platform.cacheRead( sqlOrdBox, "stgmod", argtds, "SqlSelectOrder" );
sqlOrd=sqlOrdBox.value;
ignore = Platform.errorCode();
}
if( ! Platform.isEmpty( sqlOrd ) )
......
......@@ -78,7 +78,9 @@ void gridEtyLoad(IStream argstg,String argtds,IModule argrec,String argetyins,St
// reset MaxStepCount to old value
Platform.setContext( tdContextMAXSTEPCOUNT, -1, true );
String pstFkt = "";
Platform.cacheRead( pstFkt, "stgmod", argtds, "Postprocessing" );
Argument<String> pstFktBox=new Argument<>("","");
Platform.cacheRead( pstFktBox, "stgmod", argtds, "Postprocessing" );
pstFkt=pstFktBox.value;
String modPth = NULLSTR;
if( Platform.errorCode() != tdCacheNotFound )
{
......
......@@ -53,15 +53,25 @@ void gridEtySelect(IModule argrec,String argtds,String argcon,String argorder)
grdTop = "";
grdLft = "";
grdWth = "";
Platform.cacheRead( grdHea, "stgmod", argtds, "FormCaption" );
Argument<String> grdHeaBox=new Argument<>("","");
Platform.cacheRead( grdHeaBox, "stgmod", argtds, "FormCaption" );
grdHea=grdHeaBox.value;
ignore = Platform.errorCode();
Platform.cacheRead( grdLft, "stgmod", argtds, "Grid-Left" );
Argument<String> grdLftBox=new Argument<>("","");
Platform.cacheRead( grdLftBox, "stgmod", argtds, "Grid-Left" );
grdLft=grdLftBox.value;
ignore = Platform.errorCode();
Platform.cacheRead( grdTop, "stgmod", argtds, "Grid-Top" );
Argument<String> grdTopBox=new Argument<>("","");
Platform.cacheRead( grdTopBox, "stgmod", argtds, "Grid-Top" );
grdTop=grdTopBox.value;
ignore = Platform.errorCode();
Platform.cacheRead( grdWth, "stgmod", argtds, "Grid-Width" );
Argument<String> grdWthBox=new Argument<>("","");
Platform.cacheRead( grdWthBox, "stgmod", argtds, "Grid-Width" );
grdWth=grdWthBox.value;
ignore = Platform.errorCode();
Platform.cacheRead( grdVal, "stgmod", argtds, "StreamGridValues" );
Argument<String> grdValBox=new Argument<>("","");
Platform.cacheRead( grdValBox, "stgmod", argtds, "StreamGridValues" );
grdVal=grdValBox.value;
ignore = Platform.errorCode();
que = Platform.promptStream( stgStm, grdHea, grdVal, Platform.parseInt( grdLft ), Platform.parseInt( grdTop ) );
if( Platform.isEmpty( que ) )
......
......@@ -3,7 +3,9 @@ boolean gridIsConfigured(String argtds)
//! routine to check whether a tdsname is configured
//! ArgTds Tdsname to identify the configuration used to load the stream
String stgVal = "";
Platform.cacheRead( stgVal, "stgmod", argtds, "StreamGridValues" );
Argument<String> stgValBox=new Argument<>("","");
Platform.cacheRead( stgValBox, "stgmod", argtds, "StreamGridValues" );
stgVal=stgValBox.value;
if( Platform.errorCode() > 0 )
{
return false;
......
......@@ -74,7 +74,9 @@ void gridCfgStore(String argtds)
Platform.cacheWrite( conSql, "stgmod", argtds, "SqlSelectCondition" );
// check whether a default order is defined
String defSrt = "";
Platform.cacheRead( defSrt, "stgmod", argtds, "SqlSelectOrder" );
Argument<String> defSrtBox=new Argument<>("","");
Platform.cacheRead( defSrtBox, "stgmod", argtds, "SqlSelectOrder" );
defSrt=defSrtBox.value;
int max = 0;
int idx = 0;
int fldIdx = 0;
......
......@@ -5,7 +5,9 @@ void gridLoadLinks(IStream argstg,String argtds)
//! ArgTds Tdsname to identify the configuration used to load the stream
// Execute access to defined link fields
String lnkTxt = "";
Platform.cacheRead( lnkTxt, "stgmod", argtds, "SqlLinks" );
Argument<String> lnkTxtBox=new Argument<>("","");
Platform.cacheRead( lnkTxtBox, "stgmod", argtds, "SqlLinks" );
lnkTxt=lnkTxtBox.value;
int grdMax = 0;
IStream lnkStm = new StreamImpl();
int fldMax = 0;
......
......@@ -44,16 +44,27 @@ void gridEtySelectofBch(IModule argrec,String argtds,String argcon,String argord
grdTop = "";
grdLft = "";
grdWth = "";
Platform.cacheRead( grdHea, "stgmod", argtds, "FormCaption" );
Argument<String> grdHeaBox=new Argument<>("","");
Platform.cacheRead( grdHeaBox, "stgmod", argtds, "FormCaption" );
grdHea=grdHeaBox.value;
ignore = Platform.errorCode();
Platform.cacheRead( grdLft, "stgmod", argtds, "Grid-Left" );
Argument<String> grdLftBox=new Argument<>("","");
Platform.cacheRead( grdLftBox, "stgmod", argtds, "Grid-Left" );
grdLft=grdLftBox.value;
ignore = Platform.errorCode();
Platform.cacheRead( grdTop, "stgmod", argtds, "Grid-Top" );
Argument<String> grdTopBox=new Argument<>("","");
Platform.cacheRead( grdTopBox, "stgmod", argtds, "Grid-Top" );
grdTop=grdTopBox.value;
ignore = Platform.errorCode();
Platform.cacheRead( grdWth, "stgmod", argtds, "Grid-Width" );
Argument<String> grdWthBox=new Argument<>("","");
Platform.cacheRead( grdWthBox, "stgmod", argtds, "Grid-Width" );
grdWth=grdWthBox.value;
ignore = Platform.errorCode();
Platform.cacheRead( grdVal, "stgmod", argtds, "StreamGridValues" );
Argument<String> grdValBox=new Argument<>("","");
Platform.cacheRead( grdValBox, "stgmod", argtds, "StreamGridValues" );
grdVal=grdValBox.value;
ignore = Platform.errorCode();
que = Platform.promptStream( stgStm, grdHea, grdVal, Platform.parseInt( grdLft ), Platform.parseInt( grdTop ) );
if( Platform.isEmpty( que ) )
{
......
......@@ -50,7 +50,9 @@ String svsGetFieldContent(String fieldname,String savetype)
**/
fldPth = Platform.getAttributeText( field, tdAttrFullName );
fld = "";
Platform.cacheRead( fld, "DATMOD", Platform.getTransName(), Platform.toUpper( fldPth ) );
Argument<String> fldBox=new Argument<>("","");
Platform.cacheRead( fldBox, "DATMOD", Platform.getTransName(), Platform.toUpper( fldPth ) );
fld=fldBox.value;
if( Platform.errorCode() != tdCacheNotFound )
{
content = "D" + Platform.format( date, "YYYY-MM-DD" );
......
......@@ -34,7 +34,9 @@ static String sdbEtyGetInsEtyFlg(IModule argrec,String argtbl)
}
// preset the return value to empty
String rtn = "";
Platform.cacheRead( rtn, "sysmod.EtyFlg", tbl );
Argument<String> rtnBox=new Argument<>("","");
Platform.cacheRead( rtnBox, "sysmod.EtyFlg", tbl );
rtn=rtnBox.value;
String chk = NULLSTR;
IDatafield fld = null;
if( Platform.errorCode() == tdCacheNotFound )
......
......@@ -3,7 +3,9 @@ String getHlpTrn()
//! Function to return the contents of transaction name to be used on access to table HLP
// return the ID in capital letters
String trn = Platform.getTransName();
Platform.cacheRead( trn, "HLP.TRN" );
Argument<String> trnBox=new Argument<>("","");
Platform.cacheRead( trnBox, "HLP.TRN" );
trn=trnBox.value;
int ignore = Platform.errorCode();
return Platform.toUpper( trn );
......
......@@ -2,7 +2,9 @@ String getHlpAddPfx()
{
//! Function to return the contents of an optional prefix to be used
String pfx = "";
Platform.cacheRead( pfx, "HLP.PFX" );
Argument<String> pfxBox=new Argument<>("","");
Platform.cacheRead( pfxBox, "HLP.PFX" );
pfx=pfxBox.value;
if( Platform.errorCode() == 0 )
{
if( ! Platform.isEmpty( pfx ) && Platform.compareTo(Platform.mid( pfx, 1, 1 ), "\\") != 0 )
......
......@@ -52,7 +52,9 @@ static String getFieldDesc(String argfld,String argtbl,String arguil)
seaPth = Platform.mid( seaPth, 1, beg - 1 ) + Platform.mid( seaPth, beg + len );
}
String txt = "";
Platform.cacheRead( txt, "FldDsc", uil, tbl, seaPth, fld );
Argument<String> txtBox=new Argument<>("","");
Platform.cacheRead( txtBox, "FldDsc", uil, tbl, seaPth, fld );
txt=txtBox.value;
IStream keyList = new StreamImpl();
int idx = 0;
String lin = NULLSTR;
......
......@@ -3,7 +3,9 @@ String getHlpPkg()
//! Function to return the contents of KEY1 (=Pakage) in table HLP
// return the ID in capital letters
String pkg = "DOK";
Platform.cacheRead( pkg, "HLP.PKG" );
Argument<String> pkgBox=new Argument<>("","");
Platform.cacheRead( pkgBox, "HLP.PKG" );
pkg=pkgBox.value;
int ignore = Platform.errorCode();
return pkg;
......
......@@ -12,7 +12,9 @@ void dbCommitStateCheck()
comStaOld = "";
msg = "";
// reload the original commit state as on the call to DbCommitStateSave
Platform.cacheRead( comStaOld, "SYSMOD_COMMIT", tdContextDBTransactionInfo );
Argument<String> comStaOldBox=new Argument<>("","");
Platform.cacheRead( comStaOldBox, "SYSMOD_COMMIT", tdContextDBTransactionInfo );
comStaOld=comStaOldBox.value;
if( Platform.errorCode() == tdCacheNotFound )
{
msg = "DbCommitStateCheck: Check of the DB-transaction issued without previously saved status info.\nA call to DbCommitStateSave is missing";
......
......@@ -4,7 +4,9 @@ static String cacheIniRead(String ini,String sec,String entry)
String iniNam = Platform.toLower( ini );
sec = Platform.toLower( sec );
entry = Platform.toLower( entry );
Platform.cacheRead( value, iniNam, sec, entry );
Argument<String> valueBox=new Argument<>("","");
Platform.cacheRead( valueBox, iniNam, sec, entry );
value=valueBox.value;
if( Platform.errorCode() > 0 )
{
value = Platform.getIniStr( iniNam, sec, entry );
......
......@@ -4,7 +4,9 @@ static String cacheIniReadBlock(String ini,String sec,String entry)
String iniNam = Platform.toLower( ini );
sec = Platform.toLower( sec );
entry = Platform.toLower( entry );
Platform.cacheRead( value, iniNam, sec, entry );
Argument<String> valueBox=new Argument<>("","");
Platform.cacheRead( valueBox, iniNam, sec, entry );
value=valueBox.value;
if( Platform.errorCode() > 0 )
{
value = Platform.getIniBlock( iniNam, sec, entry );
......
......@@ -6,7 +6,9 @@ String getBchFields(String argfld,String whrsql)
int err = 0;
if( ! Platform.isEmpty( argfld ) )
{
Platform.cacheRead( fldval, "BCHVALUE", argfld, "SQL", whrsql );
Argument<String> fldvalBox=new Argument<>("","");
Platform.cacheRead( fldvalBox, "BCHVALUE", argfld, "SQL", whrsql );
fldval=fldvalBox.value;
if( Platform.errorCode() > 0 )
{
sql = "SELECT " + argfld + " FROM BCH " + whrsql;
......
......@@ -46,13 +46,21 @@ event $sel order 1000
grdLft = "";
grdWth = "";
grdVal = Platform.toString( stgStm1 );
Platform.cacheRead( grdHea, "stgmod", "SELGB", "FormCaption" );
Argument<String> grdHeaBox=new Argument<>("","");
Platform.cacheRead( grdHeaBox, "stgmod", "SELGB", "FormCaption" );
grdHea=grdHeaBox.value;
ignore = Platform.errorCode();
Platform.cacheRead( grdLft, "stgmod", "SELGB", "Grid-Left" );
Argument<String> grdLftBox=new Argument<>("","");
Platform.cacheRead( grdLftBox, "stgmod", "SELGB", "Grid-Left" );
grdLft=grdLftBox.value;
ignore = Platform.errorCode();
Platform.cacheRead( grdTop, "stgmod", "SELGB", "Grid-Top" );
Argument<String> grdTopBox=new Argument<>("","");
Platform.cacheRead( grdTopBox, "stgmod", "SELGB", "Grid-Top" );
grdTop=grdTopBox.value;
ignore = Platform.errorCode();
Platform.cacheRead( grdWth, "stgmod", "SELGB", "Grid-Width" );
Argument<String> grdWthBox=new Argument<>("","");
Platform.cacheRead( grdWthBox, "stgmod", "SELGB", "Grid-Width" );
grdWth=grdWthBox.value;
ignore = Platform.errorCode();
count = Platform.streamCount( stgStm );
if( count > 100 )
......
......@@ -9,7 +9,9 @@ static String cacheGetIniStr(String argfil,String argsec,String arglab)
String fil = Platform.toLower( argfil );
String sec = Platform.toLower( argsec );
String lab = Platform.toLower( arglab );
Platform.cacheRead( rtn, "SYSPTH.CacheGetIniStr", fil + "." + sec + "." + lab );
Argument<String> rtnBox=new Argument<>("","");
Platform.cacheRead( rtnBox, "SYSPTH.CacheGetIniStr", fil + "." + sec + "." + lab );
rtn=rtnBox.value;
if( Platform.errorCode() == tdCacheNotFound )
{
rtn = Platform.getIniStr( fil, sec, lab );
......
......@@ -3,7 +3,9 @@ String internalGetArgs()
//! Function to return the type and group prefix of the currently removed group of entries
//! The returned text holds the typliste followed by "/" and the prefix
String dbg = "";
Platform.cacheRead( dbg, "SYSWRN", "ARGS" );
Argument<String> dbgBox=new Argument<>("","");
Platform.cacheRead( dbgBox, "SYSWRN", "ARGS" );
dbg=dbgBox.value;
if( Platform.errorCode() == 0 )
{
return dbg;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment