Checks if is find key only.

@param metadata
the metadata
@param colToOutput
the col to output
@return true, if is find key only
500204
public static boolean isFindKeyOnly(EntityMetadata metadata, List<Map<String, Object>> colToOutput)
    {
        if (colToOutput != null && colToOutput.size() == 1)
        {
            String idCol = ((AbstractAttribute) metadata.getIdAttribute()).getJPAColumnName();
            return idCol.equals(colToOutput.get(0).get(Constants.DB_COL_NAME)) && !(boolean) colToOutput.get(0).get(Constants.IS_EMBEDDABLE);
        }
        else
        {
            return false;
        }
    }
952078
private boolean matchMetadata(MetaData metadata)
    {
        boolean match;

        if (this.metadataValue != null) {
            Object value = metadata.getMetaData(this.metadataKey);
            match = value != null && value.equals(this.metadataValue);
        } else {
            match = metadata.contains(this.metadataKey);
        }

        return match;
    }
1308749
public void meta(MetaMessage meta) {
		//System.out.println("Meta Message detected : " + meta.getType());
		if (meta.getType()==MidiMessageType.TEMPO_CHANGE ||
				// Work around part with generic meta message work around
				(meta.getType()==MidiMessageType.MARKER && MetaMessageWA.isTempoMessage(meta))
				) {
			int expectdNotesNbPerMn = TempoMessage.getTempo(meta.getData()).getNotesNumberPerMinute();
			//System.out.println("detected tempo change : " + expectdNotesNbPerMn +
			//		" current seq tempo : " + seq.getTempoInBPM());
			// Work around for JDK 1.5 (seems to work in JDK 1.4....)
			if ((int)seq.getTempoInBPM()!=expectdNotesNbPerMn)
				seq.setTempoInBPM(expectdNotesNbPerMn);
			notifyForTempoChange((int)seq.getTempoInBPM());
		}
		else
			if (meta.getType()==MidiMessageType.NOTE_INDEX_MARKER) {
				//FIXME notifyNotePlayedChange, use MusicReference? what is NoteIndexMessage.getIndex
				//notifyNotePlayedChanged((NoteAbstract)m_tune.getMusic().elementAt(NoteIndexMessage.getIndex(meta.getData())));
			}
			else
				if (MetaMessageWA.isNotationMarker(meta)) {
					//System.out.println("NOTATION MARKER");
					int begin = NotationMarkerMessage.getBeginOffset(meta.getData());
					int end = NotationMarkerMessage.getEndOffset(meta.getData());
					notifyForPartPlayedChanged (begin, end);
				}
				else
					if (meta.getType()==MidiMessageType.END_OF_TRACK) {
						notifyForPlayEnd();
					}
  }
41792
private boolean readMetaData()
      throws IOException
  {
    SegmentExtent10 segment = _metaSegment;
    
    try (ReadStream is = openRead(segment.address(), segment.length())) {
      is.position(META_OFFSET);
      
      while (readMetaEntry(is)) {
      }
    }
    
    return true;
  }
960586
public static boolean isGetterMethod(Method m) {

        String methodName = m.getName();

        if (methodName.equals("getClass")) {
            return false;
        }

        if (!methodName.startsWith(GET_METHOD_PREFIX) && !methodName.startsWith(IS_METHOD_PREFIX)) {
            return false;
        }
        if (m.getParameterCount() > 0) {
            return false;
        }

        return true;
    }
1190953
public boolean containsKey(Object key)
    {
        if (key==null)
            return _nullEntry!=null;
        return
            getEntry(key.toString(),0,key==null?0:key.toString().length())!=null;
    }
1307418
public void validate(CFMetaData metadata) {
        for (Map.Entry<String, ColumnMapper> entry : columnMappers.entrySet()) {

            String name = entry.getKey();
            ColumnMapper columnMapper = entry.getValue();
            ByteBuffer columnName = UTF8Type.instance.decompose(name);

            ColumnDefinition columnDefinition = metadata.getColumnDefinition(columnName);
            if (columnDefinition == null) {
                throw new RuntimeException("No column definition for mapper " + name);
            }

            if (columnDefinition.isStatic()) {
                throw new RuntimeException("Lucene indexes are not allowed on static columns as " + name);
            }

            AbstractType<?> type = columnDefinition.type;
            if (!columnMapper.supports(type)) {
                throw new RuntimeException(String.format("Type '%s' is not supported by mapper '%s'", type, name));
            }
        }
    }
771484
function (key) {
                var map = this._getMap(key, false);
                if (map == null) {
                    return false;
                }
                var item;
                if (map == this._objectKeys) {
                    item = key[this._metaDataName];
                } else if (map != this._otherKeys) {
                    item = map[key];
                } else {
                    for (var i in map) {
                        if (map.hasOwnProperty(i)) {
                            var elt = map[i];
                            if (key === elt.key) {
                                item = elt;
                                break;
                            }
                        }
                    }
                }
                if (item) {
                    return true;
                } else {
                    return false;
                }
            }
1276232
public boolean isEveryOwnedOutputSpent(TransactionBag transactionBag) {
        for (TransactionOutput output : outputs) {
            if (output.isAvailableForSpending() && output.isMineOrWatched(transactionBag))
                return false;
        }
        return true;
    }
513312
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
    public static boolean hasInputMethodsFeature(Context context) {
        return hasInputMethodsFeature(context.getPackageManager());
    }
796713
private static void validate(@NotNull EntityMetadata entityMetadata) {
        if (StringUtils.isEmpty(entityMetadata.getTableName())) {
            throw new MetadataException(String.format("Invalid table name: \"%s\"", entityMetadata.getTableName()));
        }

        if (entityMetadata.getPartitionKeySize() < 1) {
            throw new MetadataException(String.format("Entity \"%s\"must contains primary key", entityMetadata.getTableName()));
        }
    }
557519
function(key, done) {
      if(!this._key) {
        done('no key found for metadata');
        return;
      }
      var ret = null; // if not found return null
      for(var i = 0; i < this._data.length; i++) {
        if(this._data[i][this._key.getName()] === key) {
          ret = this._clone(this._data[i]);
          break;
        }
      }
      done(null, ret);
    }
297958
public void indexUIDMeta(final UIDMeta meta) {
    if (search != null) {
      search.indexUIDMeta(meta).addErrback(new PluginError());
    }
  }
1085474
private function isInheritanceSupported(ClassMetadata $metadata)
    {
        if ($metadata->inheritanceType === InheritanceType::SINGLE_TABLE
            && in_array($metadata->getClassName(), $metadata->discriminatorMap, true)) {
            return true;
        }

        return ! in_array($metadata->inheritanceType, [InheritanceType::SINGLE_TABLE, InheritanceType::JOINED], true);
    }
818993
private void checkJdbcSupport(DatabaseMetaData metaData) throws SQLException {

        if (_getGeneratedKeys && !metaData.supportsGetGeneratedKeys()) {
            throw new ControlException("The database does not support getGeneratedKeys.");
        }

        if (_batchUpdate && !metaData.supportsBatchUpdates()) {
            throw new ControlException("The database does not support batchUpdates.");
        }

        if (_scrollType != JdbcControl.ScrollType.DRIVER_DEFAULT
                && !metaData.supportsResultSetConcurrency(_scrollType.getType(), _scrollType.getConcurrencyType())) {
            throw new ControlException("The database does not support the ResultSet concurrecy type: " + _scrollType.toString());
        }

        if (_holdability != JdbcControl.HoldabilityType.DRIVER_DEFAULT
                && !metaData.supportsResultSetHoldability(_holdability.getHoldability())) {
            throw new ControlException("The database does not support the ResultSet holdability type: " + _holdability.toString());
        }
    }
644483
public boolean isCql3Enabled(EntityMetadata metadata) {
        if (metadata != null) {

            MetamodelImpl metaModel =
                (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(metadata.getPersistenceUnit());

            if (metaModel.isEmbeddable(metadata.getIdAttribute().getBindableJavaType())) {
                return true;
            }
            // added for embeddables support on cql3
            AbstractManagedType managedType = (AbstractManagedType) metaModel.entity(metadata.getEntityClazz());
            if (managedType.hasEmbeddableAttribute()) {
                return getCqlVersion().equalsIgnoreCase(CassandraConstants.CQL_VERSION_3_0);
            }

            if (getCqlVersion().equalsIgnoreCase(CassandraConstants.CQL_VERSION_3_0)
                && metadata.getType().equals(Type.SUPER_COLUMN_FAMILY)) {
                log.warn(
                    "Super Columns not supported by cql, Any operation on supercolumn family will be executed using thrift, returning false.");
                return false;
            }
            return getCqlVersion().equalsIgnoreCase(CassandraConstants.CQL_VERSION_3_0);
        }
        return getCqlVersion().equalsIgnoreCase(CassandraConstants.CQL_VERSION_3_0);
    }
1229840
public boolean inferPrintableFromMetadata(Metadata md) {
    String inferredCharset = "BINARY";
    List<String> transferEncoding = md.getGlobalMetadata().getTransferEncoding();

    if (transferEncoding != null) {
      inferredCharset = getCharset(transferEncoding.get(transferEncoding.size() - 1));
    } else if (md.getGlobalMetadata().getContentType() != null) {
      inferredCharset = getCharset(md.getGlobalMetadata().getContentType());
    }

    return inferredCharset.equals("UTF-8");
  }