[weld-commits] Weld SVN: r6584 - extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query.
weld-commits at lists.jboss.org
weld-commits at lists.jboss.org
Mon Jul 5 20:08:39 EDT 2010
Author: shane.bryzak at jboss.com
Date: 2010-07-05 20:08:38 -0400 (Mon, 05 Jul 2010)
New Revision: 6584
Modified:
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java
Log:
add getFirstResult() method
Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java 2010-06-30 19:28:34 UTC (rev 6583)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java 2010-07-06 00:08:38 UTC (rev 6584)
@@ -39,6 +39,12 @@
return this;
}
+ public Property<V> getFirstResult()
+ {
+ List<Property<V>> results = getResultList();
+ return results.isEmpty() ? null : results.get(0);
+ }
+
public List<Property<V>> getResultList()
{
List<Property<V>> results = new ArrayList<Property<V>>();
More information about the weld-commits
mailing list