public int doCopyFieldsCommand(Script recScript, Map<String,Object> properties)
    {
        int iErrorCode = DBConstants.NORMAL_RETURN;
        Record recSource = recScript.getTargetRecord(properties, DBParams.RECORD);
        if (recSource == null)
            return DBConstants.ERROR_RETURN;
        Record recDestination = recScript.getTargetRecord(properties, Script.DESTINATION_RECORD);
        if (recDestination == null)
            return DBConstants.ERROR_RETURN;
        String strSourceField = (String)properties.get(Script.SOURCE_PARAM);
        String strDestField = (String)properties.get(Script.DESTINATION_PARAM);
        if (strDestField == null)
            strDestField = strSourceField;
        if (strSourceField == null)
            return DBConstants.ERROR_RETURN;
        BaseField fldSource = recSource.getField(strSourceField);
        BaseField fldDest = recDestination.getField(strDestField);
        if ((fldSource == null) || (fldDest == null))
            return DBConstants.ERROR_RETURN;
        iErrorCode = fldDest.moveFieldToThis(fldSource);
        return iErrorCode;
    }
public int doCopyFieldsCommand ( Script recScript , Map < String , Object > properties ) { int iErrorCode = DBConstants . NORMAL_RETURN ; Record recSource = recScript . getTargetRecord ( properties , DBParams . RECORD ) ; if ( recSource == null ) return DBConstants . ERROR_RETURN ; Record recDestination = recScript . getTargetRecord ( properties , Script . DESTINATION_RECORD ) ; if ( recDestination == null ) return DBConstants . ERROR_RETURN ; String strSourceField = ( String ) properties . get ( Script . SOURCE_PARAM ) ; String strDestField = ( String ) properties . get ( Script . DESTINATION_PARAM ) ; if ( strDestField == null ) strDestField = strSourceField ; if ( strSourceField == null ) return DBConstants . ERROR_RETURN ; BaseField fldSource = recSource . getField ( strSourceField ) ; BaseField fldDest = recDestination . getField ( strDestField ) ; if ( ( fldSource == null ) || ( fldDest == null ) ) return DBConstants . ERROR_RETURN ; iErrorCode = fldDest . moveFieldToThis ( fldSource ) ; return iErrorCode ; }
DoCopyFieldsCommand Method.