Parameters:
     - db_name
     - tbl_name
     - part_vals
     - eventType
544419
def markPartitionForEvent(self, db_name, tbl_name, part_vals, eventType):
    
    self.send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType)
    self.recv_markPartitionForEvent()
1301541
def inputChecks(**_params_):
    
    def checkTypes(_func_, _params_ = _params_):
        log = clog.error_log
        @wraps(_func_)
        def wrapped(*args, **kw):
            arg_names = _func_.__code__.co_varnames[:_func_.__code__.co_argcount]
            ka = {}
            ka.update(list(zip(arg_names, args)))
            ka.update(kw)
            #print ka
            for name, value in ka.iteritems():
                #In fact the framework removes all the input variables that is not in the args list of _addMethod.
                #So DBS list API will never see these variables. For example, if one has
                #http://hostname/cms_dbs/DBS/datatiers?name=abc, the API will get a request to list all the datatiers because
                #"name=abc" is removed by the framework since name is not a key work for the api.
                if name !='self':
                    types = _params_[name]
                    #if name =='lumi_list': value = cjson.decode(value)
                    if not isinstance(value, types):
                        serverlog = "Expected '%s' to be %s; was %s." % (name, types, type(value))
                        #raise TypeError, "Expected '%s' to be %s; was %s." % (name, types, type(value))
                        dbsExceptionHandler("dbsException-invalid-input2", message="Invalid Input DataType %s for %s..." %(type(value), name[:10]),\
                                            logger=log.error, serverError=serverlog)
                    else:
                        try:
                            if isinstance(value, basestring):
                                try:
                                    value = str(value)
                                except:
                                    dbsExceptionHandler("dbsException-invalid-input", "invalid value for %s" %name)
                                if name == 'dataset':
                                    if '*' in value:
                                        searchdataset(value)
                                    else:
                                        reading_dataset_check(value)
                                elif name =='lumi_list': value = cjson.decode(value)
                                elif name =='validFileOnly': 
				    try:
				        int(value)
				    except Exception as e:
				        dbsExceptionHandler("dbsException-invalid-input2", message="invalid value for %s" %name, serverError="invalid value %s for %s" %(value, name), logger=log.error)	
                                elif name =='sumOverLumi':
                                    try:
                                        int(value)
                                    except Exception as e:
                                        dbsExceptionHandler("dbsException-invalid-input2", message="invalid value for %s" %name, serverError="invalid value %s for %s" %(value, name), logger=log.error)    
                                elif name =='block_name':
                                    if '*' in value:
                                        searchblock(value)
                                    else:
                                        reading_block_check(value)
                                elif name =='primary_ds_name':
                                    if '*' in value: searchstr(value)
                                    else: primdataset(value)
                                elif name =='processed_ds_name':
                                    if '*' in value:
                                        searchstr(value)
                                    else:
                                        reading_procds_check(value)
                                elif name=='logical_file_name':
                                    if '*' in value:
                                        searchstr(value)
                                    else:
                                        reading_lfn_check(value)
                                elif name=='processing_version':
                                    procversion(value)
                                elif name=='global_tag':
                                    if '*' in value: searchstr(value)
                                    else: globalTag(value)
                                elif name == 'create_by':
                                    DBSUser(value)
                                elif name == 'last_modified_by':
                                    DBSUser(value)
                                else:
                                    searchstr(value)
                            elif type(value) == list:
                                if name == 'logical_file_name':
                                    for f in value:
                                        if '*' in f:
                                            searchstr(f)
                                        else:
                                            reading_lfn_check(f)
                                elif name == 'block_names':
                                    for block_name in value:
                                        reading_block_check(block_name)
                                elif name == 'run_num':
                                    for run_num in value:
                                        try: 
                                            int(run_num)
                                        except Exception:
                                            try:
                                                min_run, max_run = run_num.split('-', 1)
                                                int(min_run)
                                                int(max_run)
                                            except Exception as e:
                                                serverLog = str(e) + "\n run_num=%s is an invalid run number." %run_num 
                                                dbsExceptionHandler("dbsException-invalid-input2", message="Invalid input data %s...: invalid run number." %run_num[:10],\
                                                        serverError=serverLog, logger=log.error)
				elif name == 'dataset_id':
				    for id in value:
					try:
					    int(id)
					except Exception :
					    try: 
						min_id, max_id = id.split('-', 1)
						int(min_id)
						int(max_id)
					    except Exception as e :		
						serverLog = str(e) + "\n dataset_id=%s is an invalid oracle id." %dataset_id
						dbsExceptionHandler("dbsException-invalid-input2", message="Invalid input data %s...: invalid dataset_id." %id[:10], \
							serverError=serverLog, logger=log.error)		
                        except AssertionError as ae:
                            serverLog = str(ae) + " key-value pair (%s, %s) cannot pass input checking" %(name, value)
                            #print ae
                            dbsExceptionHandler("dbsException-invalid-input2", message="Invalid Input Data %s...: Not Match Required Format" %value[:10],\
                                        serverError=serverLog, logger=log.error)
			except Exception as e1:
			    raise	
			
            return _func_(*args, **kw)
        return wrapped
    return checkTypes
144230
def event_type=(event_type)
      validator = EnumAttributeValidator.new('String', ["API_CREATE", "API_EDIT", "API_DELETE", "REGISTER_CLOCKIN", "REGISTER_CLOCKOUT", "DASHBOARD_SUPERVISOR_CLOSE", "DASHBOARD_EDIT", "DASHBOARD_DELETE"])
      unless validator.valid?(event_type)
        fail ArgumentError, "invalid value for 'event_type', must be one of #{validator.allowable_values}."
      end
      @event_type = event_type
    end
1225726
def libvlc_event_type_name(event_type):
    '''
    '''
    f = _Cfunctions.get('libvlc_event_type_name', None) or \
        _Cfunction('libvlc_event_type_name', ((1,),), None,
                    ctypes.c_char_p, ctypes.c_uint)
    return f(event_type)
462409
function Part(name, priority, urlTemplate) {
    this.name = name;
    this.isActive = true;
    this.tables = {};
    this.priority = priority || 0;
    this.langPromises = {};
    this.urlTemplate = urlTemplate;
  }
751618
def getEventTypeNameFromEnum(self, eType):
        """"""

        fn = self.function_table.getEventTypeNameFromEnum
        result = fn(eType)
        return result
699703
def GetEvents(self):
    
    for event in self._GetAttributeContainers('event'):
      if hasattr(event, 'event_data_row_identifier'):
        event_data_identifier = identifiers.SQLTableIdentifier(
            'event_data', event.event_data_row_identifier)
        event.SetEventDataIdentifier(event_data_identifier)

        del event.event_data_row_identifier

      yield event
189813
def record(self,
               event_type: str,
               event_data: Mapping = None,
               instance: Any = None,
               **kwargs) -> 'Event':
        
        if not self.is_setup:
            return
        if not self.can_handle(event_type=event_type):
            return

        event = self.get_event(event_type=event_type,
                               event_data=event_data,
                               instance=instance,
                               **kwargs)
        self.record_event(event)
        return event
1288170
private void cmdExecuteActionPerformed(java.awt.event.ActionEvent evt) {
		releaseResultset();
		try {
			if (selectedSource == null) {
				JOptionPane.showMessageDialog(this, "Please select data source first", "Error", JOptionPane.ERROR_MESSAGE);
			} else {
				OBDAProgressMonitor progMonitor = new OBDAProgressMonitor("Executing query...", getRootPane());
				CountDownLatch latch = new CountDownLatch(1);
				ExecuteSQLQueryAction action = new ExecuteSQLQueryAction(latch);
				progMonitor.addProgressListener(action);
				progMonitor.start();
				action.run();
				latch.await();
				progMonitor.stop();
				ResultSet set = action.getResult();
				if (set != null) {
					ResultSetTableModel model = new ResultSetTableModel(set);
					tblQueryResult.setModel(model);
					set.close();
				}
			}
		} catch (Exception e) {
			OptionPaneUtils.showPrettyMessageDialog(null, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
			log.error("Error while executing query.", e);
		}
	}
595282
def get_part_specs_by_filter(self, db_name, tbl_name, filter, max_parts):
    
    self.send_get_part_specs_by_filter(db_name, tbl_name, filter, max_parts)
    return self.recv_get_part_specs_by_filter()
19244
def append_partition(self, db_name, tbl_name, part_vals):
    
    self.send_append_partition(db_name, tbl_name, part_vals)
    return self.recv_append_partition()
1185985
@Override protected void handleEvents(final String EVENT_TYPE) {
        super.handleEvents(EVENT_TYPE);

        if ("VISIBILITY".equals(EVENT_TYPE)) {
            Helper.enableNode(titleText, !tile.getTitle().isEmpty());
            Helper.enableNode(valueText, tile.isValueVisible());
            Helper.enableNode(sectionPane, tile.getSectionsVisible());
            Helper.enableNode(thresholdRect, tile.isThresholdVisible());
            Helper.enableNode(thresholdText, tile.isThresholdVisible());
            Helper.enableNode(unitText, !tile.getUnit().isEmpty());
            sectionsVisible = tile.getSectionsVisible();
        } else if ("SECTION".equals(EVENT_TYPE)) {
            sections = tile.getSections();
            sectionMap.clear();
            for(Section section : sections) { sectionMap.put(section, new Arc()); }
        } else if ("ALERT".equals(EVENT_TYPE)) {
            Helper.enableNode(valueText, tile.isValueVisible() && !tile.isAlert());
            Helper.enableNode(unitText, tile.isValueVisible() && !tile.isAlert());
            Helper.enableNode(alertIcon, tile.isAlert());
            alertTooltip.setText(tile.getAlertMessage());
        }
    }
1122382
def get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts):
    
    self.send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts)
    return self.recv_get_partitions_ps()
83601
def namedb_query_execute( cur, query, values, abort=True):
    
    return db_query_execute(cur, query, values, abort=abort)
1009037
function(db) {
		return db.query('SELECT name FROM types WHERE name IS NOT NULL').then(function(db) {
			var types = db.fetch();
			debug.assert(types).is('array');

			var queries = ARRAY(types).map(function step_builder(type) {
				if(type && type.name) {
					return NoPg.createTriggerQueriesForType(type.name);
				}
				return [];
			}).reduce(function(a, b) {
				return a.concat(b);
			}, []);

			return queries.map(function(q) {
				return db.query(q);
			}).reduce(_Q.when, _Q(db));
		});
	}
742714
public void logSdkEvent(String eventName, Double valueToSum, Bundle parameters) {
        logEvent(eventName, valueToSum, parameters, true);
    }
12706
protected int subscribe_data_ready_event(String attr_name, String[] filters, boolean stateless)
            throws DevFailed {
        return event_supplier.subscribe_event(attr_name,
                DATA_READY_EVENT, this, filters, stateless);
    }