#804 - Remove API - findMap(property, type) ... migrate to query.setMapKey()

This commit is contained in:
Robin Bygrave
2016-08-04 20:30:18 +12:00
parent 81de83a6e7
commit 876476fdc1
7 changed files with 1 additions and 37 deletions
@@ -205,11 +205,6 @@ public interface ExpressionList<T> {
*/
<K> Map<K, T> findMap();
/**
* Return a typed map specifying the key property and type.
*/
<K> Map<K, T> findMap(String keyProperty, Class<K> keyType);
/**
* Execute the query returning a list of values for a single property.
*
-10
View File
@@ -664,16 +664,6 @@ public abstract class Model {
return query().findMap();
}
/**
* Executes the query and returns the results as a map of the objects specifying the map key
* property.
* <p>
* Equivalent to {@link Query#findMap(String, Class)}
*/
public <K> Map<K, T> findMap(String keyProperty, Class<K> keyType) {
return query().findMap(keyProperty, keyType);
}
/**
* Executes a find row count query in a background thread.
* <p>
-5
View File
@@ -672,11 +672,6 @@ public interface Query<T> {
*/
<K> Map<K, T> findMap();
/**
* Return a typed map specifying the key property and type.
*/
<K> Map<K, T> findMap(String keyProperty, Class<K> keyType);
/**
* Execute the query returning a list of values for a single property.
*
@@ -383,11 +383,6 @@ public class DefaultExpressionList<T> implements SpiExpressionList<T> {
return query.findMap();
}
@Override
public <K> Map<K, T> findMap(String keyProperty, Class<K> keyType) {
return query.findMap(keyProperty, keyType);
}
@Override
public <A> List<A> findSingleAttributeList() {
return query.findSingleAttributeList();
@@ -395,11 +395,6 @@ class JunctionExpression<T> implements SpiJunction<T>, SpiExpression, Expression
return exprList.findMap();
}
@Override
public <K> Map<K, T> findMap(String keyProperty, Class<K> keyType) {
return exprList.findMap(keyProperty, keyType);
}
@Override
public <A> List<A> findSingleAttributeList() {
return exprList.findSingleAttributeList();
@@ -1148,12 +1148,6 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
@Override
@SuppressWarnings("unchecked")
public <K> Map<K, T> findMap(String keyProperty, Class<K> keyType) {
setMapKey(keyProperty);
return (Map<K, T>) findMap();
}
@Override
public <A> List<A> findSingleAttributeList() {
return (List<A>)server.findSingleAttributeList(this, null);
}
@@ -41,7 +41,7 @@ public class TestJsonMap extends BaseTestCase {
ResetBasicData.reset();
Map<String, Customer> map = Ebean.find(Customer.class).findMap("id", String.class);
Map<String, Customer> map = Ebean.find(Customer.class).findMap();
JsonContext jsonContext = Ebean.json();
JsonWriteOptions options = JsonWriteOptions.parsePath("(id,status,name)");