Code example for Collection

Methods: contains

0
		 
		if (map.getAttributes().size() == 1) {
			EOAttribute att = map.getMostFrequentAttribute();
			EORelationship rel = EOUtilities.getRelationshipForSourceAttribute(entity, att);
			Collection<?> values = map.getValuesForAttribute(att);
			boolean containsNulls = values.contains(null);
			 
			if (! containsNulls) {
				if (entity.primaryKeyAttributes().size() == 1 && att.equals(EOUtilities.primaryKeyAttribute(entity))) {
					// it's primary key 
					Results<T> filter = (Results<T>) primaryKeyReference(db, (Collection<? extends Number>) values);
					 
					return new EvaluatingFilter<T>(filter, entity, qualifier);
				} 
				if (rel != null 
						&& ! RelationshipStore.shouldBeStoredAsRelationship(rel.entity()) 
						&& ! RelationshipStore.shouldBeStoredAsRelationship(rel.destinationEntity()) ) {
					// it's using foreign key 
					Results<T> filter = (Results<T>) foreignKeyReference(db, rel, (Collection<? extends Number>) values);
					 
					return new EvaluatingFilter<T>(filter, entity, qualifier);
				} 
			} 
		}