;SQLStat.PRStockABCKwotering.1 ;(C)InterSystems, generated for class SQLStat.PRStockABCKwotering. Do NOT edit. 10/01/2002 05:52PM ;;58C49E05537E0FF5;SQLStat.PRStockABCKwotering q ; #classcontext SQLStat.PRStockABCKwotering #; method code import packages begin #import %Library #import SQLStat #; method code import packages end #; method code include files begin #include %occExtent #include %occInclude #include %occTransaction #; method code include files end %AcquireLock(%this,locktype) ; q $$$OK #classmethod %BuildIndices(idxlist) s idxlist=$g(idxlist,"") QUIT $$$ERROR($$$MethodNotImplemented,"%Persistent::%BuildIndices") q "" #endclassmethod #classmethod %CheckUnique(idxlist) s idxlist=$g(idxlist,"") QUIT $$$ERROR($$$MethodNotImplemented,"%Persistent::%CheckUnique") q "" #endclassmethod %ClassName(%this,fullname) s fullname=$g(fullname,0) q $s(fullname:"SQLStat.PRStockABCKwotering",1:"PRStockABCKwotering") %Close(%this) ; n a s a=$$$objReferenceCount(%this) q:'a $$$OK i a'>$ll($g($$$objReferenceList(%this))) q $$$ERROR($$$TooManyCallsToClose) s $$$objReferenceCount(%this)=a-1 i a>1 q:(a-1)>$ll($g($$$objReferenceList(%this))) $$$OK d q:'a $$$OK s $$$objReferenceCount(%this)=0 . n checklist,checkobj,list,oreffrom,close,i s checklist=$lb(%this),close(%this)="" . f s checkobj=$li(checklist) s checklist=$li(checklist,2,-1) d q:checklist=""!'a . . s list=$g($$$objReferenceList(checkobj)),oreffrom="" f i=1:1:$ll(list) s oreffrom=$li(list,i) i '$d(close(oreffrom)) s:$$$objReferenceCount(oreffrom)=0 a=0 q:'a s:$$$objReferenceCount(oreffrom)>$ll($g($$$objReferenceList(oreffrom))) a=0 q:'a s close(oreffrom)="",checklist=checklist_$lb(oreffrom) i ..%Concurrency=3 d ..%ReleaseLock("s") i ..%Concurrency=4 d ..%ReleaseLock("e") s a=$$$objOID(%this) $$$DeleteObject(%this) i a'="" $$$ActiveOidRemove(a,%this) k $$$txLIST(%this),$$$txOIDASSIGNED(%this),$$$txMODIFIED(%this) QUIT $$$OK q "" #classmethod %Delete(oid,concurrency) s oid=$g(oid,""),concurrency=$g(concurrency,$zu(115,10)) n class,id,sc,traninit QUIT:oid="" $$$ERROR($$$NullOid) s id=$$$oidPrimary(oid) QUIT:id="" $$$ERROR($$$NullId) s class=$$$oidClassName(oid) i class'="" s class=$$$NormalizeClassname(class) i class="" s class="SQLStat.PRStockABCKwotering",oid=$$$oidInsertClassName(oid,"SQLStat.PRStockABCKwotering") i "SQLStat.PRStockABCKwotering"'=class q $zobjclassmethod(class,"%Delete",oid) s traninit=0 i $zu(115,9) s traninit=1 tstart s sc=..%DeleteData(id,concurrency) %DeleteEnd i traninit DO . i $$$ISOK(sc) tcommit . i $$$ISERR(sc) trollback i $$$ISERR(sc) QUIT sc n oref $$$ActiveOidModified(oid,oref) QUIT sc q "" #endclassmethod #classmethod %DeleteData(id,concurrency) ; QUIT:id="" $$$ERROR($$$NullId) n %sc s %sc=$$$OK n id1,id2 s id1=$p(id,"||",1),id2=$p(id,"||",2) n %ROWID,SQLCODE &sql(DELETE FROM SQLStat.StockABCKwotering WHERE Product=:id1 AND Datum=:id2) i SQLCODE s %sc=$$$ERROR($$$SQLError,SQLCODE) QUIT %sc q "" #endclassmethod #classmethod %DeleteExtent(concurrency,deletecount,instancecount) s concurrency=$g(concurrency,$zu(115,10)) n atend,id,qh,row,rs,sc s deletecount=0,instancecount=0 s sc=..ExtentExecute(.qh) QUIT:$$$ISERR(sc) sc f s sc=..ExtentFetch(.qh,.row,.atend) q:$s(row="":1,$$$ISERR(sc):1,1:0) s id=$lg(row) i id'="" s sc=..%Delete($lb(id),concurrency) s instancecount=instancecount+1 s:$$$ISOK(sc) deletecount=deletecount+1 q:atend d ..ExtentClose(qh) QUIT $$$OK q "" #endclassmethod #classmethod %DeleteId(id,concurrency) s concurrency=$g(concurrency,$zu(115,10)) q ..%Delete($$$oidForm(id),concurrency) #endclassmethod %DowngradeConcurrency(%this,concurrency) ; n current,sc s current=..%Concurrency #; If the requested setting is greater than the current setting, then do nothing If concurrency>current QUIT $$$OK #; Locks are not retained for any setting less than 3 and if the old and new #; setting are the same, nothing is to done except update the concurrency setting i current<3!(current=concurrency) s:concurrency2 s sc=..%AcquireLock($s(concurrency=3:"s",1:"e")) QUIT:$$$ISERR(sc) sc #; the following line releases the old lock which we know must be there #; because we process and quit above for current<3 Do ..%ReleaseLock($s(current=3:"s",1:"e")) #; Update the concurrency setting: s ..%Concurrency=concurrency QUIT $$$OK q "" #classmethod %Exists(oid) ; New oref Set oref=..%Open(oid,0) Quit:oref=$$$NULLOREF 0 Do oref.%Close() Quit 1 q "" #endclassmethod #classmethod %ExistsId(id) ; QUIT ..%Exists($lb(id)) q "" #endclassmethod %GetSwizzleObject(%this,force,oid) s force=$g(force,0) n sc s oid="" i force=0 s oid=..%Oid() QUIT $$$OK i force=2 s sc=..%Save(1) s:$$$ISOK(sc) oid=..%Oid() QUIT sc s oid=..%Oid() QUIT:oid'="" $$$OK s sc=..%Save(0) s:$$$ISOK(sc) oid=..%Oid() QUIT sc q "" %Id(%this) ; q $$$oidPrimary($$$objOID(##this)) %IdSet(%this,id) ; n oid s oid=$$$oidCompose(id,"SQLStat.PRStockABCKwotering") i $$$objOID(##this)'="",$$$objOID(##this)'=oid QUIT $$$ERROR($$$OidPreviouslyAssigned) s $$$objOID(##this)=oid $$$ActiveOidInsert(oid,##this) QUIT $$$OK q "" %IncrementCount(%this) ; $$$IncrementReferenceCount(%this) q q #classmethod %IsA(isclass) ; q "~SQLStat.PRStockABCKwotering~%Library.Persistent~%Library.RegisteredObject~"[("~"_$$$NormalizeClassname(isclass)_"~") #endclassmethod %IsModified(%this) ; q $$$objModAll(##this) #classmethod %KillExtent() ; QUIT $$$ERROR($$$MethodNotImplemented,"%Persistent::%KillExtent") q "" #endclassmethod %Load(%this,id) ; n sc s sc=..%IdSet(id) QUIT:$$$ISERR(sc) sc s sc=..%LoadData(id) QUIT:$$$ISERR(sc) sc QUIT $$$OK q "" %LoadData(%this,id) ; n %ROWID,%sc,SQLCODE,id1,id2 s id1=$p(id,"||",1),id2=$p(id,"||",2) s %sc=$$$ERROR($$$LoadObjectNotFound) #sqlcompile select=logical &sql(SELECT ABCWaarde,CiffPPL,Datum,FysStock,GemFysStock,GemGewogenWVK,GemWVK,Kwotering,Product,Rotatie,StockType INTO :i%ABCWaarde,:i%CiffPPL,:i%Datum,:i%FysStock,:i%GemFysStock,:i%GemGewogenWVK,:i%GemWVK,:i%Kwotering,:i%Product,:i%Rotatie,:i%StockType FROM SQLStat.StockABCKwotering WHERE Product=:id1 AND Datum=:id2) i SQLCODE s i%ABCWaarde="",i%CiffPPL="",i%Datum="",i%FysStock="",i%GemFysStock="",i%GemGewogenWVK="",i%GemWVK="",i%Kwotering="",i%Product="",i%Rotatie="",i%StockType="" e d . s %sc=$$$OK QUIT %sc q "" #classmethod %New(initvalue) ; n %this,sc,oref #endclassmethod s %this=$$$CreateObject("SQLStat.PRStockABCKwotering") s $$$objReferenceCount(%this)=1,$$$objOID(%this)="" s i%%Concurrency=$zu(115,10),i%%IsInSave=0,i%ABCWaarde="",i%CiffPPL="",i%Datum="" s i%FysStock="",i%GemFysStock="",i%GemGewogenWVK="",i%GemWVK="",i%Kwotering="" s i%Product="",i%Rotatie="",i%StockType="" $$$objModAllSet(##this,1) QUIT %this #classmethod q "" #endclassmethod %NormalizeObject(%this) ; i i%ABCWaarde'="" s i%ABCWaarde=(..ABCWaardeNormalize(i%ABCWaarde)) i i%CiffPPL'="" s i%CiffPPL=(..CiffPPLNormalize(i%CiffPPL)) i i%Datum'="" s i%Datum=(..DatumNormalize(i%Datum)) i i%FysStock'="" s i%FysStock=(..FysStockNormalize(i%FysStock)) i i%GemFysStock'="" s i%GemFysStock=(..GemFysStockNormalize(i%GemFysStock)) i i%GemGewogenWVK'="" s i%GemGewogenWVK=(..GemGewogenWVKNormalize(i%GemGewogenWVK)) i i%GemWVK'="" s i%GemWVK=(..GemWVKNormalize(i%GemWVK)) i i%Kwotering'="" s i%Kwotering=(..KwoteringNormalize(i%Kwotering)) i i%Product'="" s i%Product=(..ProductNormalize(i%Product)) i i%Rotatie'="" s i%Rotatie=(..RotatieNormalize(i%Rotatie)) i i%StockType'="" s i%StockType=(..StockTypeNormalize(i%StockType)) QUIT $$$OK q "" %Oid(%this) ; q $$$objOID(##this) #classmethod %Open(oid,concurrency) s concurrency=$g(concurrency,$zu(115,10)) i $$$oidPrimary($g(oid))="" QUIT $$$NULLOREF n sc,%this,class s class=$$$oidClassName(oid) i class'="" s class=$$$NormalizeClassname(class) i class="" s class="SQLStat.PRStockABCKwotering",oid=$$$oidInsertClassName(oid,"SQLStat.PRStockABCKwotering") i "SQLStat.PRStockABCKwotering"'=class q $zobjclassmethod(class,"%Open",oid,concurrency) #endclassmethod $$$ActiveOidSearch(oid,%this) i %this DO QUIT %this . i concurrency>..%Concurrency i '..%UpgradeConcurrency(concurrency) s %this="" q . $$$IncrementReferenceCount(%this) s %this=$$$CreateObject("SQLStat.PRStockABCKwotering") s $$$objReferenceCount(%this)=1,$$$objOID(%this)="" s i%%Concurrency="",..%Concurrency=concurrency s sc=..%Load($$$oidPrimary(oid)) i $$$ISERR(sc) d ..%Close() QUIT $$$NULLOREF s i%%IsInSave=0 $$$objModAllSet(##this,0) QUIT %this #classmethod q "" #endclassmethod #classmethod %OpenId(id,concurrency) s concurrency=$g(concurrency,$zu(115,10)) q ..%Open($$$oidForm(id),concurrency) #endclassmethod %PackageName(%this) ; q "SQLStat" #classmethod %PurgeIndices(idxlist) s idxlist=$g(idxlist,"") QUIT $$$ERROR($$$MethodNotImplemented,"%Persistent::%PurgeIndices") q "" #endclassmethod %ReleaseLock(%this,locktype) ; q $$$OK %ResetAllObject(%this,force) s force=$g(force,0) q 1 %RollBack(%this) ; n sc s sc=$$$OK i $d($$$txMODIFIED(##this)) $$$objModStateRestore(##this,$$$txMODIFIED(##this)) QUIT sc q "" %Save(%this,related) s related=$g(related,1) n id,oid,ok,sc,traninit s oid=..%Oid(),id=$$$oidPrimary(oid) i 'i%%IsInSave d s i%%IsInSave=0 QUIT sc . s oid="",sc=$$$OK,traninit=0 . i $$$txNOTINTRAN DO . . s traninit=1 . . k $$$txSTATUS,$$$txLISTroot,$$$txOIDASSIGNEDroot,$$$txMODIFIEDroot . . i '$zu(115,9) s $$$txSTATUS=1 q . . s $$$txSTATUS=2 tstart . s:$$$txON $$$txLIST(##this)="" . s i%%IsInSave=1 . s sc=..%ValidateObject(related+1) i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q . s sc=..%NormalizeObject() i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q . s sc=..%ResetAllObject(related+1) i $$$ISERR(sc) d i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q . . s sc=..%SaveData(id) q:$$$ISERR(sc) . . s sc=..%ResetAllObject(related+1) . i ..%IsModified()!(related=0) s sc=..%SaveData(id) s:$$$ISOK(sc) oid=..%Oid() i $$$ISERR(sc) k:$$$txON $$$txLIST(##this),$$$txMODIFIED(##this) s:traninit sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()) q . i ..%IsModified(),$$$txON $$$objModStateSave(##this,$$$txMODIFIED(##this)) . $$$objModAllSet(##this,0) i traninit d i $$$ISERR(ok) s sc=$$$ADDSC(sc,$$%TRollBack^%occTransaction()),oid="" q . . i $$$txOFF k $$$txSTATUS s ok=$$$OK q . . tcommit . . k $$$txSTATUS,$$$txLISTroot,$$$txOIDASSIGNEDroot,$$$txMODIFIEDroot . . s ok=$$$OK,sc=$$$OK . s:oid="" oid=..%Oid() . q QUIT:oid'="" $$$OK s sc=..%ValidateObject(0) QUIT:$$$ISERR(sc) sc i ..%ResetAllObject(0) s sc=..%SaveData(id) i $$$ISOK(sc) QUIT $$$OK QUIT sc q "" %SaveData(%this,id) ; s id=..%Id() i id="" QUIT ..%SaveDataInsert(id) QUIT ..%SaveDataUpdate(id) q "" %SaveDataInsert(%this,id) ; n %ROWID,%sc,SQLCODE,id1,id2,lock,temp1 s lock=0,%sc=$$$OK s id1=$p(id,"||",1),id2=$p(id,"||",2) &sql(INSERT INTO SQLStat.StockABCKwotering(ABCWaarde,CiffPPL,Datum,FysStock,GemFysStock,GemGewogenWVK,GemWVK,Kwotering,Product,Rotatie,StockType) VALUES (:i%ABCWaarde,:i%CiffPPL,:i%Datum,:i%FysStock,:i%GemFysStock,:i%GemGewogenWVK,:i%GemWVK,:i%Kwotering,:i%Product,:i%Rotatie,:i%StockType)) i SQLCODE q $$$ERROR($$$SQLError,SQLCODE_":"_$g(%msg)) s id=i%Product_"||"_i%Datum s %sc=..%IdSet(id) QUIT:$$$ISERR(%sc) %sc s:$$$txON $$$txOIDASSIGNED(##this)="" QUIT %sc q "" %SaveDataUpdate(%this,id) ; n %ROWID,%sc,SQLCODE,id1,id2,lock,temp1 s lock=0,%sc=$$$OK s id1=$p(id,"||",1),id2=$p(id,"||",2) &sql(UPDATE SQLStat.StockABCKwotering SET ABCWaarde = :i%ABCWaarde, CiffPPL = :i%CiffPPL, Datum = :i%Datum, FysStock = :i%FysStock, GemFysStock = :i%GemFysStock, GemGewogenWVK = :i%GemGewogenWVK, GemWVK = :i%GemWVK, Kwotering = :i%Kwotering, Product = :i%Product, Rotatie = :i%Rotatie, StockType = :i%StockType WHERE Product=:id1 AND Datum=:id2) i SQLCODE q $$$ERROR($$$SQLError,SQLCODE_":"_$g(%msg)) QUIT %sc q "" #classmethod %SortBegin(idxlist,excludeunique) s idxlist=$g(idxlist,""),excludeunique=$g(excludeunique,0) QUIT $$$OK q "" #endclassmethod #classmethod %SortEnd(idxlist,commit) s idxlist=$g(idxlist,""),commit=$g(commit,1) QUIT $$$OK q "" #endclassmethod %UpgradeConcurrency(%this,concurrency) ; n current,sc #; Locks are not retained for any setting #; less than 3 and if the old and new #; setting are the same, nothing is to done! s current=..%Concurrency Quit:concurrencycurrent ..%Concurrency=concurrency QUIT $$$OK #; Get the new lock s sc=..%AcquireLock($s(concurrency=3:"s",1:"e")) QUIT:$$$ISERR(sc) sc #; the following line releases the old lock #; which must be a shared lock as that is the #; only possible condition. i current=3 d ..%ReleaseLock("s") #; Update the concurrency setting: s ..%Concurrency=concurrency QUIT $$$OK q "" %ValidateObject(%this,force) s force=$g(force,0) #; VALIDATE=2, modified=3 n iv i ..%IsModified() DO QUIT:'iv iv . s iv=..%Concurrency i iv'="" s iv=(..%ConcurrencyIsValid(iv)) q:$$$ISERR(iv) . s iv=..%IsInSave i iv'="" s iv=(..%IsInSaveIsValid(iv)) q:$$$ISERR(iv) . s iv=..ABCWaarde i iv'="" s iv=(..ABCWaardeIsValid(iv)) q:$$$ISERR(iv) . s iv=..CiffPPL i iv'="" s iv=(..CiffPPLIsValid(iv)) q:$$$ISERR(iv) . s iv=..Datum i iv="" s iv=$$$ERROR($$$PropertyRequired,"Datum") q . s iv=(..DatumIsValid(iv)) q:$$$ISERR(iv) . s iv=..FysStock i iv'="" s iv=(..FysStockIsValid(iv)) q:$$$ISERR(iv) . s iv=..GemFysStock i iv'="" s iv=(..GemFysStockIsValid(iv)) q:$$$ISERR(iv) . s iv=..GemGewogenWVK i iv'="" s iv=(..GemGewogenWVKIsValid(iv)) q:$$$ISERR(iv) . s iv=..GemWVK i iv'="" s iv=(..GemWVKIsValid(iv)) q:$$$ISERR(iv) . s iv=..Kwotering i iv'="" s iv=(..KwoteringIsValid(iv)) q:$$$ISERR(iv) . s iv=..Product i iv="" s iv=$$$ERROR($$$PropertyRequired,"Product") q . s iv=(..ProductIsValid(iv)) q:$$$ISERR(iv) . s iv=..Rotatie i iv'="" s iv=(..RotatieIsValid(iv)) q:$$$ISERR(iv) . s iv=..StockType i iv'="" s iv=(..StockTypeIsValid(iv)) q:$$$ISERR(iv) . s iv=$$$OK QUIT $$$OK q "" %ConcurrencyGet(%this) ; q i%%Concurrency %ConcurrencyIsModified(%this) ; q $$$objModBit(##this,1) #classmethod %ConcurrencyIsValid(value) ; q 1 #endclassmethod %ConcurrencySet(%this,newvalue) ; s:newvalue'=i%%Concurrency $$$objModBit(##this,1)=1 s i%%Concurrency=newvalue QUIT $$$OK q "" %ConcurrencySetModified(%this,newvalue) ; s $$$objModBit(##this,1)=''newvalue QUIT $$$OK q "" %IsInSaveGet(%this) ; q i%%IsInSave %IsInSaveIsModified(%this) ; q $$$objModBit(##this,2) #classmethod %IsInSaveIsValid(value) ; q 1 #endclassmethod %IsInSaveSet(%this,newvalue) ; s:newvalue'=i%%IsInSave $$$objModBit(##this,2)=1 s i%%IsInSave=newvalue QUIT $$$OK q "" %IsInSaveSetModified(%this,newvalue) ; s $$$objModBit(##this,2)=''newvalue QUIT $$$OK q "" #classcontext ..ABCWaarde #classmethod ABCWaardeDisplayToLogical(%val) ; q %val #endclassmethod #endclasscontext ..ABCWaarde ABCWaardeGet(%this) ; q i%ABCWaarde ABCWaardeIsModified(%this) ; q $$$objModBit(##this,3) #classmethod ABCWaardeIsValid(value) ; q $s(..ABCWaardeIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.ABCWaarde")) #endclassmethod #classcontext ..ABCWaarde #classmethod ABCWaardeIsValidDT(%val) ; q 1 #endclassmethod #endclasscontext ..ABCWaarde #classcontext ..ABCWaarde #classmethod ABCWaardeLogicalToDisplay(%val) ; q %val #endclassmethod #endclasscontext ..ABCWaarde #classcontext ..ABCWaarde #classmethod ABCWaardeNormalize(%val) ; q $e(%val,1,1) #endclassmethod #endclasscontext ..ABCWaarde ABCWaardeSet(%this,newvalue) ; s:newvalue'=i%ABCWaarde $$$objModBit(##this,3)=1 s i%ABCWaarde=newvalue QUIT $$$OK q "" ABCWaardeSetModified(%this,newvalue) ; s $$$objModBit(##this,3)=''newvalue QUIT $$$OK q "" #classcontext ..CiffPPL #classmethod CiffPPLDisplayToLogical(%val) ; q $in(%val,"","") #endclassmethod #endclasscontext ..CiffPPL CiffPPLGet(%this) ; q i%CiffPPL CiffPPLIsModified(%this) ; q $$$objModBit(##this,4) #classmethod CiffPPLIsValid(value) ; q $s(..CiffPPLIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.CiffPPL")) #endclassmethod #classcontext ..CiffPPL #classmethod CiffPPLIsValidDT(%val) ; q $isvalidnum(%val,,,) #endclassmethod #endclasscontext ..CiffPPL #classcontext ..CiffPPL #classmethod CiffPPLLogicalToDisplay(%val) ; q %val #endclassmethod #endclasscontext ..CiffPPL #classcontext ..CiffPPL #classmethod CiffPPLNormalize(%val) ; q +%val #endclassmethod #endclasscontext ..CiffPPL CiffPPLSet(%this,newvalue) ; s:newvalue'=i%CiffPPL $$$objModBit(##this,4)=1 s i%CiffPPL=newvalue QUIT $$$OK q "" CiffPPLSetModified(%this,newvalue) ; s $$$objModBit(##this,4)=''newvalue QUIT $$$OK q "" #classcontext ..Datum #classmethod DatumDisplayToLogical(%val) ; q %val #endclassmethod #endclasscontext ..Datum DatumGet(%this) ; q i%Datum DatumIsModified(%this) ; q $$$objModBit(##this,5) #classmethod DatumIsValid(value) ; q $s(..DatumIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.Datum")) #endclassmethod #classcontext ..Datum #classmethod DatumIsValidDT(%val) ; i %val=(%val\1) s %val=$zd(%val,3,,,,,,,"error")_" 00:00:00" i $l(%val)=10 s %val=%val_" 00:00:00" i $l(%val)=8 s %val=$zd($h,3)_" "_%val q ($l(%val)>18)&''$zdth(%val,3,,,,,,,,"") q "" #endclassmethod #endclasscontext ..Datum #classcontext ..Datum #classmethod DatumLogicalToDisplay(%val) ; q %val #endclassmethod #endclasscontext ..Datum #classcontext ..Datum #classmethod DatumNormalize(%val) ; q $s(%val="":"",%val=(%val\1):$zd(%val,3,,,,,,,"error")_" 00:00:00",$l(%val)=8:$zd($h,3)_" "_%val,$l(%val)=10:%val_" 00:00:00",1:%val) #endclassmethod #endclasscontext ..Datum #classcontext ..Datum #classmethod DatumOdbcToLogical(%val) ; q $s(%val="":"",$zdth(%val,3,,,,,,,,"")'="":$zdt($zdth(%val,3),3),$zdth(%val,-1,,,,,,,,"")'="":$zdt($zdth(%val,-1),3),1:%val) #endclassmethod #endclasscontext ..Datum DatumSet(%this,newvalue) ; s:newvalue'=i%Datum $$$objModBit(##this,5)=1 s i%Datum=newvalue QUIT $$$OK q "" DatumSetModified(%this,newvalue) ; s $$$objModBit(##this,5)=''newvalue QUIT $$$OK q "" #classcontext ..FysStock #classmethod FysStockDisplayToLogical(%val) ; q $in(%val,"#.0","") #endclassmethod #endclasscontext ..FysStock FysStockGet(%this) ; q i%FysStock FysStockIsModified(%this) ; q $$$objModBit(##this,6) #classmethod FysStockIsValid(value) ; q $s(..FysStockIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.FysStock")) #endclassmethod #classcontext ..FysStock #classmethod FysStockIsValidDT(%val) ; q $isvalidnum(%val,1,-99999999999999999.9,99999999999999999.9) #endclassmethod #endclasscontext ..FysStock #classcontext ..FysStock #classmethod FysStockLogicalToDisplay(%val) ; q $s(%val="":"",1:$fn(%val,"#.0",1)) #endclassmethod #endclasscontext ..FysStock #classcontext ..FysStock #classmethod FysStockNormalize(%val) ; q +$fn(%val,"",1) #endclassmethod #endclasscontext ..FysStock FysStockSet(%this,newvalue) ; s:newvalue'=i%FysStock $$$objModBit(##this,6)=1 s i%FysStock=newvalue QUIT $$$OK q "" FysStockSetModified(%this,newvalue) ; s $$$objModBit(##this,6)=''newvalue QUIT $$$OK q "" #classcontext ..GemFysStock #classmethod GemFysStockDisplayToLogical(%val) ; q $in(%val,"#.0","") #endclassmethod #endclasscontext ..GemFysStock GemFysStockGet(%this) ; q i%GemFysStock GemFysStockIsModified(%this) ; q $$$objModBit(##this,7) #classmethod GemFysStockIsValid(value) ; q $s(..GemFysStockIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.GemFysStock")) #endclassmethod #classcontext ..GemFysStock #classmethod GemFysStockIsValidDT(%val) ; q $isvalidnum(%val,1,-99999999999999999.9,99999999999999999.9) #endclassmethod #endclasscontext ..GemFysStock #classcontext ..GemFysStock #classmethod GemFysStockLogicalToDisplay(%val) ; q $s(%val="":"",1:$fn(%val,"#.0",1)) #endclassmethod #endclasscontext ..GemFysStock #classcontext ..GemFysStock #classmethod GemFysStockNormalize(%val) ; q +$fn(%val,"",1) #endclassmethod #endclasscontext ..GemFysStock GemFysStockSet(%this,newvalue) ; s:newvalue'=i%GemFysStock $$$objModBit(##this,7)=1 s i%GemFysStock=newvalue QUIT $$$OK q "" GemFysStockSetModified(%this,newvalue) ; s $$$objModBit(##this,7)=''newvalue QUIT $$$OK q "" #classcontext ..GemGewogenWVK #classmethod GemGewogenWVKDisplayToLogical(%val) ; q $in(%val,"#.0","") #endclassmethod #endclasscontext ..GemGewogenWVK GemGewogenWVKGet(%this) ; q i%GemGewogenWVK GemGewogenWVKIsModified(%this) ; q $$$objModBit(##this,8) #classmethod GemGewogenWVKIsValid(value) ; q $s(..GemGewogenWVKIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.GemGewogenWVK")) #endclassmethod #classcontext ..GemGewogenWVK #classmethod GemGewogenWVKIsValidDT(%val) ; q $isvalidnum(%val,1,-99999999999999999.9,99999999999999999.9) #endclassmethod #endclasscontext ..GemGewogenWVK #classcontext ..GemGewogenWVK #classmethod GemGewogenWVKLogicalToDisplay(%val) ; q $s(%val="":"",1:$fn(%val,"#.0",1)) #endclassmethod #endclasscontext ..GemGewogenWVK #classcontext ..GemGewogenWVK #classmethod GemGewogenWVKNormalize(%val) ; q +$fn(%val,"",1) #endclassmethod #endclasscontext ..GemGewogenWVK GemGewogenWVKSet(%this,newvalue) ; s:newvalue'=i%GemGewogenWVK $$$objModBit(##this,8)=1 s i%GemGewogenWVK=newvalue QUIT $$$OK q "" GemGewogenWVKSetModified(%this,newvalue) ; s $$$objModBit(##this,8)=''newvalue QUIT $$$OK q "" #classcontext ..GemWVK #classmethod GemWVKDisplayToLogical(%val) ; q $in(%val,"#.0","") #endclassmethod #endclasscontext ..GemWVK GemWVKGet(%this) ; q i%GemWVK GemWVKIsModified(%this) ; q $$$objModBit(##this,9) #classmethod GemWVKIsValid(value) ; q $s(..GemWVKIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.GemWVK")) #endclassmethod #classcontext ..GemWVK #classmethod GemWVKIsValidDT(%val) ; q $isvalidnum(%val,1,-99999999999999999.9,99999999999999999.9) #endclassmethod #endclasscontext ..GemWVK #classcontext ..GemWVK #classmethod GemWVKLogicalToDisplay(%val) ; q $s(%val="":"",1:$fn(%val,"#.0",1)) #endclassmethod #endclasscontext ..GemWVK #classcontext ..GemWVK #classmethod GemWVKNormalize(%val) ; q +$fn(%val,"",1) #endclassmethod #endclasscontext ..GemWVK GemWVKSet(%this,newvalue) ; s:newvalue'=i%GemWVK $$$objModBit(##this,9)=1 s i%GemWVK=newvalue QUIT $$$OK q "" GemWVKSetModified(%this,newvalue) ; s $$$objModBit(##this,9)=''newvalue QUIT $$$OK q "" #classcontext ..Kwotering #classmethod KwoteringDisplayToLogical(%val) ; q %val #endclassmethod #endclasscontext ..Kwotering KwoteringGet(%this) ; q i%Kwotering KwoteringIsModified(%this) ; q $$$objModBit(##this,10) #classmethod KwoteringIsValid(value) ; q $s(..KwoteringIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.Kwotering")) #endclassmethod #classcontext ..Kwotering #classmethod KwoteringIsValidDT(%val) ; q 1 #endclassmethod #endclasscontext ..Kwotering #classcontext ..Kwotering #classmethod KwoteringLogicalToDisplay(%val) ; q %val #endclassmethod #endclasscontext ..Kwotering #classcontext ..Kwotering #classmethod KwoteringNormalize(%val) ; q $e(%val,1,1) #endclassmethod #endclasscontext ..Kwotering KwoteringSet(%this,newvalue) ; s:newvalue'=i%Kwotering $$$objModBit(##this,10)=1 s i%Kwotering=newvalue QUIT $$$OK q "" KwoteringSetModified(%this,newvalue) ; s $$$objModBit(##this,10)=''newvalue QUIT $$$OK q "" #classcontext ..Product #classmethod ProductDisplayToLogical(%val) ; q $in(%val,"#.","") #endclassmethod #endclasscontext ..Product ProductGet(%this) ; q i%Product ProductIsModified(%this) ; q $$$objModBit(##this,11) #classmethod ProductIsValid(value) ; q $s(..ProductIsValidDT(value):1,1:$$$ERROR($$$DatatypeValidationFailed,"SQLStat.PRStockABCKwotering.Product")) #endclassmethod #classcontext ..Product #classmethod ProductIsValidDT(%val) ; q $isvalidnum(%val,0,-999999999999999999,999999999999999999) #endclassmethod #endclasscontext ..Product #classcontext ..Product #classmethod ProductLogicalToDisplay(%val) ; q $s(%val="":"",1:$fn(%val,"#.",0)) #endclassmethod #endclasscontext ..Product #classcontext ..Product #classmethod ProductNormalize(%val) ; q +$fn(%val,"",0) #endclassmethod #endclasscontext ..Product ProductSet(%this,newvalue) ; s:newvalue'=i%Product $$$objModBit(##this,11)=1 s i%Product=newvalue QUIT $$$OK q "" #endclasscontext SQLStat.PRStockABCKwotering