public class SetHeadZero extends AbstractCommon
値の先頭部分にゼロを設定する。
例えばParameterに6を指定し、InRecordに527を設定した場合は、
000527という値を返す。
Parameterに『4,2,2』等カンマ区切りで列ごとに設定をすることも可能。
またParameterを省略した場合は、OutItemのgetLength()(バイト長)を使用する。
桁数以上の桁を持つデータがわたってきた場合、頭の0を外せるだけ外します。
例えばParameterに3を指定した場合はこのようになります。
[2] → [002]
[00053] → [053]
[00753] → [753]
[02323] → [2323]
Parameterに1を指定することで、頭についた0を全て取り除くことも可能です。
このロジッククラスは小数点を含む数には対応してません。
InputRecord | OutputRecord |
---|---|
|
|
Parameter | 桁数の指定 or カンマ区切りで各列の桁数を指定(省略可能) |
---|
controlRecord, engineManager, errorMessage, executeType, id, inputRecord, logicalName, logicClassDelegate, outputRecord, physicalName, ruleParameter, ruleType, serverParameter, userConstant
CANCEL, ERROR, EXECUTE_BOTH, EXECUTE_CLIENT, EXECUTE_DEBUG, EXECUTE_HTMLGATEWAY, EXECUTE_SERVER, EXECUTE_SERVERDC, IO_ERROR, IO_ERROR_EXECUTE_PARAMETER, IO_ERROR_IN, IO_ERROR_IO_MUST_SAME_COUNT, IO_ERROR_ITEM_TYPE, IO_ERROR_OUT, IO_ERROR_PARAMETER, NONE, OK, PARAMETER_DELIMITER, SKIP, USER_ERROR
コンストラクタと説明 |
---|
SetHeadZero() |
修飾子とタイプ | メソッドと説明 |
---|---|
int |
execute()
処理を実行。
|
void |
exit()
終了処理。
|
int |
getIOParameter()
IOパラメータ取得。
|
protected int |
loopInOutRecordSub(jp.ne.mki.wedge.run.interfaces.DataInterface inItem,
jp.ne.mki.wedge.run.interfaces.DataInterface outItem,
int index)
loopInOutRecord()から呼び出されるメソッドです。
|
getLogicClassType, getManager, terminate
callDispose, checkDelegate, createErrorMessage, createLogicErrorLogRecord, createLogicExceptionLogRecord, createLogicLogRecord, dataClearOfOutRecord, dataClearOfRecord, dispose, executeRule, getAppAccount, getAppAuthority, getAppMenu, getAppPassword, getClassErrorName, getClientId, getConnectionId, getConnectionPoolId, getConstantKeys, getConstantValue, getConstantValueAsStringArray, getControlRecord, getDbAccessCount, getDbErrorCode, getDbErrorMessage, getDbStatus, getDbUpdatedRecordCount, getEngineManager, getErrorMessage, getErrorMessage, getErrorMessage, getExceptionMessage, getExecuteType, getId, getInputRecordIterator, getInRecord, getInRecord, getInRecord, getInRecordCount, getInRecordList, getIpAddress_G_Index, getIpAddress_P_Index, getLogicalErrorName, getLogicalName, getLogicClassDelegate, getOutputHtml, getOutputRecordIterator, getOutRecord, getOutRecord, getOutRecord, getOutRecordCount, getOutRecordList, getPhysicalErrorName, getPhysicalName, getProjectId, getQueryEndLine, getQueryMaxCount, getQueryPageCount, getQueryStartLine, getReturnString, getRowSize, getRowSizeOfInRecord, getRuleParameter, getRuleParameters, getRuleParameters, getRuleParameters, getRuleType, getRuleTypeName, getServerMessage, getServerParameter, getServerStatus, getServerSubName, getServerSubRevision, getServerTran, getUpdateErrorLine, getUpdateTargetCount, getWebServerIpAddress, isExecutable, isJDK15, log, logDebug, logError, logError, logFatal, logFatal, logInfo, logTrace, logWarn, logWarn, loopInOutRecord, loopInRecord, loopInRecordSub, loopOutRecord, loopOutRecordSub, setControlRecord, setEngineManager, setErrorMessage, setErrorMessageMustInRecord, setErrorMessageMustOutRecord, setErrorMessageMustParamIsNumber, setExecuteType, setFatalError, setId, setInRecord, setLogicalName, setLogicClassDelegate, setOutputHtml, setOutRecord, setPhysicalName, setPropertyFromEngine, setRuleParameter, setRuleType, setServerParameter, setUserConstant, showErrorDialog, showErrorDialogAddRuleName, writeErrorLog, writeErrorLog, writeLog, writeLog, writeLog, writeTraceLog
public int getIOParameter()
CommonInterface
execute
の前に実行される。public int execute()
CommonInterface
protected int loopInOutRecordSub(jp.ne.mki.wedge.run.interfaces.DataInterface inItem, jp.ne.mki.wedge.run.interfaces.DataInterface outItem, int index)
AbstractBase
loopInOutRecordSub
クラス内 AbstractBase
public void exit()
CommonInterface