FIXED - bug 234686: [DataBinding] API for creating observables should not require realm
https://bugs.eclipse.org/bugs/show_bug.cgi?id=234686
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/BeansObservables.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/BeansObservables.java
index bd05b9e..8a22717 100644
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/BeansObservables.java
+++ b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/BeansObservables.java
@@ -7,9 +7,8 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Brad Reynolds - bug 164268, 171616
- * Brad Reynolds - bug 147515
- * Matthew Hall - bug 221704
+ * Brad Reynolds - bugs 164268, 171616, 147515
+ * Matthew Hall - bug 221704, 234686
* Thomas Kratz - bug 213787
*******************************************************************************/
package org.eclipse.core.databinding.beans;
@@ -130,6 +129,22 @@
return new JavaBeanPropertyObservableMap(realm, bean, descriptor);
}
+ /**
+ * Returns an observable map in the default realm tracking the map-typed
+ * named property of the given bean object.
+ *
+ * @param bean
+ * the bean object
+ * @param propertyName
+ * the name of the property
+ * @return an observable map tracking the map-typed named property of the
+ * given bean object
+ * @since 1.2
+ */
+ public static IObservableMap observeMap(Object bean, String propertyName) {
+ return observeMap(Realm.getDefault(), bean, propertyName);
+ }
+
/*package*/ static PropertyDescriptor getPropertyDescriptor(Class beanClass,
String propertyName) {
BeanInfo beanInfo;
@@ -194,6 +209,24 @@
}
/**
+ * Returns an observable list in the default realm tracking the
+ * collection-typed named property of the given bean object. The returned
+ * list is mutable.
+ *
+ * @param bean
+ * the object
+ * @param propertyName
+ * the name of the collection-typed property
+ * @return an observable list tracking the collection-typed named property
+ * of the given bean object
+ * @see #observeList(Realm, Object, String, Class)
+ * @since 1.2
+ */
+ public static IObservableList observeList(Object bean, String propertyName) {
+ return observeList(Realm.getDefault(), bean, propertyName);
+ }
+
+ /**
* Returns an observable list in the given realm tracking the
* collection-typed named property of the given bean object. The returned
* list is mutable. When an item is added or removed the setter is invoked
@@ -227,6 +260,33 @@
}
/**
+ * Returns an observable list in the default realm tracking the
+ * collection-typed named property of the given bean object. The returned
+ * list is mutable. When an item is added or removed the setter is invoked
+ * for the list on the parent bean to provide notification to other
+ * listeners via <code>PropertyChangeEvents</code>. This is done to provide
+ * the same behavior as is expected from arrays as specified in the bean
+ * spec in section 7.2.
+ *
+ * @param bean
+ * the bean object
+ * @param propertyName
+ * the name of the property
+ * @param elementType
+ * type of the elements in the list. If <code>null</code> and the
+ * property is an array the type will be inferred. If
+ * <code>null</code> and the property type cannot be inferred
+ * element type will be <code>null</code>.
+ * @return an observable list tracking the collection-typed named property
+ * of the given bean object
+ * @since 1.2
+ */
+ public static IObservableList observeList(Object bean, String propertyName,
+ Class elementType) {
+ return observeList(Realm.getDefault(), bean, propertyName, elementType);
+ }
+
+ /**
* Returns an observable set in the given realm tracking the
* collection-typed named property of the given bean object
*
@@ -245,8 +305,24 @@
}
/**
- * Returns a factory for creating obervable values tracking the given
- * property of a particular bean object
+ * Returns an observable set in the default realm tracking the
+ * collection-typed named property of the given bean object
+ *
+ * @param bean
+ * the bean object
+ * @param propertyName
+ * the name of the property
+ * @return an observable set tracking the collection-typed named property of
+ * the given bean object
+ * @since 1.2
+ */
+ public static IObservableSet observeSet(Object bean, String propertyName) {
+ return observeSet(Realm.getDefault(), bean, propertyName);
+ }
+
+ /**
+ * Returns a factory for creating observable values in the given realm,
+ * tracking the given property of a particular bean object
*
* @param realm
* the realm to use
@@ -264,8 +340,21 @@
}
/**
- * Returns a factory for creating obervable lists tracking the given
- * property of a particular bean object
+ * Returns a factory for creating observable values in the current default
+ * realm, tracking the given property of a particular bean object
+ *
+ * @param propertyName
+ * the name of the property
+ * @return an observable value factory
+ * @since 1.2
+ */
+ public static IObservableFactory valueFactory(String propertyName) {
+ return valueFactory(Realm.getDefault(), propertyName);
+ }
+
+ /**
+ * Returns a factory for creating observable lists in the given realm,
+ * tracking the given property of a particular bean object
*
* @param realm
* the realm to use
@@ -284,8 +373,23 @@
}
/**
- * Returns a factory for creating obervable sets tracking the given property
- * of a particular bean object
+ * Returns a factory for creating observable lists in the current default
+ * realm, tracking the given property of a particular bean object
+ *
+ * @param propertyName
+ * the name of the property
+ * @param elementType
+ * @return an observable list factory
+ * @since 1.2
+ */
+ public static IObservableFactory listFactory(String propertyName,
+ Class elementType) {
+ return listFactory(Realm.getDefault(), propertyName, elementType);
+ }
+
+ /**
+ * Returns a factory for creating observable sets in the given realm,
+ * tracking the given property of a particular bean object
*
* @param realm
* the realm to use
@@ -303,6 +407,19 @@
}
/**
+ * Returns a factory for creating observable sets in the current default
+ * realm, tracking the given property of a particular bean object
+ *
+ * @param propertyName
+ * the name of the property
+ * @return an observable set factory
+ * @since 1.2
+ */
+ public static IObservableFactory setFactory(String propertyName) {
+ return setFactory(Realm.getDefault(), propertyName);
+ }
+
+ /**
* Helper method for
* <code>MasterDetailObservables.detailValue(master, valueFactory(realm,
propertyName), propertyType)</code>
@@ -331,6 +448,26 @@
/**
* Helper method for
+ * <code>MasterDetailObservables.detailValue(master, valueFactory(Realm.getDefault(), propertyName), propertyType)</code>
+ *
+ * @param master
+ * @param propertyName
+ * @param propertyType
+ * can be <code>null</code>
+ * @return an observable value that tracks the current value of the named
+ * property for the current value of the master observable value
+ *
+ * @see MasterDetailObservables
+ * @since 1.2
+ */
+ public static IObservableValue observeDetailValue(IObservableValue master,
+ String propertyName, Class propertyType) {
+ return observeDetailValue(Realm.getDefault(), master, propertyName,
+ propertyType);
+ }
+
+ /**
+ * Helper method for
* <code>MasterDetailObservables.detailValue(master, valueFactory(realm,
* propertyName), propertyType)</code>.
* This method returns an {@link IBeanObservable} with a
@@ -365,7 +502,35 @@
return decorator;
}
-
+
+ /**
+ * Helper method for
+ * <code>MasterDetailObservables.detailValue(master, valueFactory(Realm.getDefault(), propertyName), propertyType)</code>
+ * . This method returns an {@link IBeanObservable} with a
+ * {@link PropertyDescriptor} based on the given master type and property
+ * name.
+ *
+ * @param master
+ * the master observable value, for example tracking the
+ * selection in a list
+ * @param masterType
+ * the type of the master observable value
+ * @param propertyName
+ * the property name
+ * @param propertyType
+ * can be <code>null</code>
+ * @return an observable value that tracks the current value of the named
+ * property for the current value of the master observable value
+ *
+ * @see MasterDetailObservables
+ * @since 1.2
+ */
+ public static IObservableValue observeDetailValue(IObservableValue master,
+ Class masterType, String propertyName, Class propertyType) {
+ return observeDetailValue(Realm.getDefault(), master, masterType,
+ propertyName, propertyType);
+ }
+
/**
* Helper method for
* <code>MasterDetailObservables.detailList(master, listFactory(realm,
@@ -395,6 +560,26 @@
/**
* Helper method for
+ * <code>MasterDetailObservables.detailList(master, listFactory(Realm.getDefault(), propertyName, propertyType), propertyType)</code>
+ *
+ * @param master
+ * @param propertyName
+ * @param propertyType
+ * can be <code>null</code>
+ * @return an observable list that tracks the named property for the current
+ * value of the master observable value
+ *
+ * @see MasterDetailObservables
+ * @since 1.2
+ */
+ public static IObservableList observeDetailList(IObservableValue master,
+ String propertyName, Class propertyType) {
+ return observeDetailList(Realm.getDefault(), master, propertyName,
+ propertyType);
+ }
+
+ /**
+ * Helper method for
* <code>MasterDetailObservables.detailSet(master, setFactory(realm,
propertyName), propertyType)</code>
*
@@ -423,6 +608,26 @@
/**
* Helper method for
+ * <code>MasterDetailObservables.detailSet(master, setFactory(Realm.getDefault(), propertyName), propertyType)</code>
+ *
+ * @param master
+ * @param propertyName
+ * @param propertyType
+ * can be <code>null</code>
+ * @return an observable set that tracks the named property for the current
+ * value of the master observable value
+ *
+ * @see MasterDetailObservables
+ * @since 1.2
+ */
+ public static IObservableSet observeDetailSet(IObservableValue master,
+ String propertyName, Class propertyType) {
+ return observeDetailSet(Realm.getDefault(), master, propertyName,
+ propertyType);
+ }
+
+ /**
+ * Helper method for
* <code>MasterDetailObservables.detailMap(master, mapFactory(realm, propertyName))</code>
*
* @param realm
@@ -444,13 +649,42 @@
}
/**
- * @param realm
- * @param bean
+ * Helper method for
+ * <code>MasterDetailObservables.detailMap(master, mapFactory(Realm.getDefault(), propertyName))</code>
+ *
+ * @param master
* @param propertyName
+ * @return an observable map that tracks the map-type named property for the
+ * current value of the master observable value.
+ * @since 1.2
+ */
+ public static IObservableMap observeDetailMap(IObservableValue master,
+ String propertyName) {
+ return observeDetailMap(Realm.getDefault(), master, propertyName);
+ }
+
+ /**
+ * Returns an observable set in the given realm tracking the
+ * collection-typed named property of the given bean object. The returned
+ * set is mutable. When an item is added or removed the setter is invoked
+ * for the set on the parent bean to provide notification to other listeners
+ * via <code>PropertyChangeEvents</code>. This is done to provide the same
+ * behavior as is expected from arrays as specified in the bean spec in
+ * section 7.2.
+ *
+ * @param realm
+ * the realm
+ * @param bean
+ * the bean object
+ * @param propertyName
+ * the name of the property
* @param elementType
- * can be <code>null</code>
- * @return an observable set that tracks the current value of the named
- * property for given bean object
+ * type of the elements in the set. If <code>null</code> and the
+ * property is an array the type will be inferred. If
+ * <code>null</code> and the property type cannot be inferred
+ * element type will be <code>null</code>.
+ * @return an observable set tracking the collection-typed named property of
+ * the given bean object
*/
public static IObservableSet observeSet(Realm realm, Object bean,
String propertyName, Class elementType) {
@@ -463,11 +697,47 @@
}
/**
- * @param realm
+ * Returns an observable set in the current default realm tracking the
+ * collection-typed named property of the given bean object. The returned
+ * set is mutable. When an item is added or removed the setter is invoked
+ * for the set on the parent bean to provide notification to other listeners
+ * via <code>PropertyChangeEvents</code>. This is done to provide the same
+ * behavior as is expected from arrays as specified in the bean spec in
+ * section 7.2.
+ *
+ * @param bean
+ * the bean object
* @param propertyName
+ * the name of the property
* @param elementType
- * can be <code>null</code>
- * @return an observable set factory for creating observable sets
+ * type of the elements in the set. If <code>null</code> and the
+ * property is an array the type will be inferred. If
+ * <code>null</code> and the property type cannot be inferred
+ * element type will be <code>null</code>.
+ * @return an observable set tracking the collection-typed named property of
+ * the given bean object
+ * @since 1.2
+ */
+ public static IObservableSet observeSet(Object bean, String propertyName,
+ Class elementType) {
+ return observeSet(Realm.getDefault(), bean, propertyName, elementType);
+ }
+
+ /**
+ * Returns a factory for creating observable sets in the given realm,
+ * tracking the given property of a particular bean object
+ *
+ * @param realm
+ * the realm to use
+ * @param propertyName
+ * the name of the property
+ * @param elementType
+ * type of the elements in the set. If <code>null</code> and the
+ * property is an array the type will be inferred. If
+ * <code>null</code> and the property type cannot be inferred
+ * element type will be <code>null</code>.
+ * @return a factory for creating observable sets in the given realm,
+ * tracking the given property of a particular bean object
*/
public static IObservableFactory setFactory(final Realm realm,
final String propertyName, final Class elementType) {
@@ -479,6 +749,26 @@
}
/**
+ * Returns a factory for creating observable sets in the current default
+ * realm, tracking the given property of a particular bean object
+ *
+ * @param propertyName
+ * the name of the property
+ * @param elementType
+ * type of the elements in the set. If <code>null</code> and the
+ * property is an array the type will be inferred. If
+ * <code>null</code> and the property type cannot be inferred
+ * element type will be <code>null</code>.
+ * @return a factory for creating observable sets in the given realm,
+ * tracking the given property of a particular bean object
+ * @since 1.2
+ */
+ public static IObservableFactory setFactory(String propertyName,
+ Class elementType) {
+ return setFactory(Realm.getDefault(), propertyName, elementType);
+ }
+
+ /**
* Returns a factory for creating an observable map. The factory, when
* provided with an {@link IObservableSet}, will create an
* {@link IObservableMap} in the same realm as the underlying set that
@@ -525,6 +815,21 @@
}
/**
+ * Returns a factory for creating an observable map. The factory, when
+ * provided with a bean object, will create an {@link IObservableMap} in the
+ * current default realm that tracks the map-typed named property for the
+ * specified bean.
+ *
+ * @param propertyName
+ * the name of the property
+ * @return a factory for creating {@link IObservableMap} objects.
+ * @since 1.2
+ */
+ public static IObservableFactory mapPropertyFactory(String propertyName) {
+ return mapPropertyFactory(Realm.getDefault(), propertyName);
+ }
+
+ /**
* @param elementType
* can be <code>null</code>
* @param propertyDescriptor
diff --git a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/PojoObservables.java b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/PojoObservables.java
index cb50822..06d1aba 100644
--- a/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/PojoObservables.java
+++ b/bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/PojoObservables.java
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Matthew Hall - bug 221704
+ * Matthew Hall - bugs 221704, 234686
*******************************************************************************/
package org.eclipse.core.databinding.beans;
@@ -142,6 +142,22 @@
}
/**
+ * Returns an observable map in the default realm tracking the map-typed
+ * named property of the given pojo object.
+ *
+ * @param pojo
+ * the pojo object
+ * @param propertyName
+ * the name of the property
+ * @return an observable map tracking the map-typed named property of the
+ * given pojo object
+ * @since 1.2
+ */
+ public static IObservableMap observeMap(Object pojo, String propertyName) {
+ return observeMap(Realm.getDefault(), pojo, propertyName);
+ }
+
+ /**
* Returns an observable list in the given realm tracking the
* collection-typed named property of the given pojo object. The returned
* list is mutable.
@@ -162,6 +178,24 @@
}
/**
+ * Returns an observable list in the default realm tracking the
+ * collection-typed named property of the given pojo object. The returned
+ * list is mutable.
+ *
+ * @param pojo
+ * the object
+ * @param propertyName
+ * the name of the collection-typed property
+ * @return an observable list tracking the collection-typed named property
+ * of the given pojo object
+ * @see #observeList(Realm, Object, String, Class)
+ * @since 1.2
+ */
+ public static IObservableList observeList(Object pojo, String propertyName) {
+ return observeList(Realm.getDefault(), pojo, propertyName);
+ }
+
+ /**
* Returns an observable list in the given realm tracking the
* collection-typed named property of the given bean object. The returned
* list is mutable. When an item is added or removed the setter is invoked
@@ -196,6 +230,33 @@
}
/**
+ * Returns an observable list in the default realm tracking the
+ * collection-typed named property of the given bean object. The returned
+ * list is mutable. When an item is added or removed the setter is invoked
+ * for the list on the parent bean to provide notification to other
+ * listeners via <code>PropertyChangeEvents</code>. This is done to provide
+ * the same behavior as is expected from arrays as specified in the bean
+ * spec in section 7.2.
+ *
+ * @param pojo
+ * the bean object
+ * @param propertyName
+ * the name of the property
+ * @param elementType
+ * type of the elements in the list. If <code>null</code> and the
+ * property is an array the type will be inferred. If
+ * <code>null</code> and the property type cannot be inferred
+ * element type will be <code>null</code>.
+ * @return an observable list tracking the collection-typed named property
+ * of the given bean object
+ * @since 1.2
+ */
+ public static IObservableList observeList(Object pojo, String propertyName,
+ Class elementType) {
+ return observeList(Realm.getDefault(), pojo, propertyName, elementType);
+ }
+
+ /**
* Returns an observable set in the given realm tracking the
* collection-typed named property of the given pojo object.
*
@@ -214,11 +275,36 @@
}
/**
- * @param realm
+ * Returns an observable set in the default realm tracking the
+ * collection-typed named property of the given pojo object.
+ *
* @param pojo
+ * the pojo object
* @param propertyName
+ * the name of the property
+ * @return an observable set tracking the collection-typed named property of
+ * the given pojo object
+ * @since 1.2
+ */
+ public static IObservableSet observeSet(Object pojo, String propertyName) {
+ return observeSet(Realm.getDefault(), pojo, propertyName);
+ }
+
+ /**
+ * Returns an observable set in the given realm tracking the
+ * collection-typed named property of the given pojo object.
+ *
+ * @param realm
+ * the realm
+ * @param pojo
+ * the pojo object
+ * @param propertyName
+ * the name of the property
* @param elementType
- * can be <code>null</code>
+ * type of the elements in the set. If <code>null</code> and the
+ * property is an array the type will be inferred. If
+ * <code>null</code> and the property type cannot be inferred
+ * element type will be <code>null</code>.
* @return an observable set that tracks the current value of the named
* property for given pojo object
*/
@@ -234,8 +320,30 @@
}
/**
- * Returns a factory for creating obervable values tracking the given
- * property of a particular pojo object
+ * Returns an observable set in the default realm, tracking the
+ * collection-typed named property of the given pojo object.
+ *
+ * @param pojo
+ * the pojo object
+ * @param propertyName
+ * the name of the property
+ * @param elementType
+ * type of the elements in the set. If <code>null</code> and the
+ * property is an array the type will be inferred. If
+ * <code>null</code> and the property type cannot be inferred
+ * element type will be <code>null</code>.
+ * @return an observable set that tracks the current value of the named
+ * property for given pojo object
+ * @since 1.2
+ */
+ public static IObservableSet observeSet(Object pojo, String propertyName,
+ Class elementType) {
+ return observeSet(Realm.getDefault(), pojo, propertyName, elementType);
+ }
+
+ /**
+ * Returns a factory for creating observable values in the given realm,
+ * tracking the given property of a particular pojo object
*
* @param realm
* the realm to use
@@ -253,8 +361,21 @@
}
/**
- * Returns a factory for creating obervable lists tracking the given
- * property of a particular pojo object
+ * Returns a factory for creating observable values in the current default
+ * realm, tracking the given property of a particular pojo object
+ *
+ * @param propertyName
+ * the name of the property
+ * @return an observable value factory
+ * @since 1.2
+ */
+ public static IObservableFactory valueFactory(String propertyName) {
+ return valueFactory(Realm.getDefault(), propertyName);
+ }
+
+ /**
+ * Returns a factory for creating observable lists in the given realm,
+ * tracking the given property of a particular pojo object
*
* @param realm
* the realm to use
@@ -273,8 +394,23 @@
}
/**
- * Returns a factory for creating obervable sets tracking the given property
- * of a particular pojo object
+ * Returns a factory for creating observable lists in the current default
+ * realm, tracking the given property of a particular pojo object
+ *
+ * @param propertyName
+ * the name of the property
+ * @param elementType
+ * @return an observable list factory
+ * @since 1.2
+ */
+ public static IObservableFactory listFactory(String propertyName,
+ Class elementType) {
+ return listFactory(Realm.getDefault(), propertyName, elementType);
+ }
+
+ /**
+ * Returns a factory for creating observable sets in the given realm,
+ * tracking the given property of a particular pojo object
*
* @param realm
* the realm to use
@@ -292,10 +428,31 @@
}
/**
- * @param realm
+ * Returns a factory for creating observable sets in the current default
+ * realm, tracking the given property of a particular pojo object
+ *
* @param propertyName
+ * the name of the property
+ * @return an observable set factory
+ * @since 1.2
+ */
+ public static IObservableFactory setFactory(String propertyName) {
+ return setFactory(Realm.getDefault(), propertyName);
+ }
+
+ /**
+ * Returns a factory for creating observable set in the given realm,
+ * tracking the given property of a particular pojo object
+ *
+ * @param realm
+ * the realm to use
+ * @param propertyName
+ * the name of the property
* @param elementType
- * can be <code>null</code>
+ * type of the elements in the set. If <code>null</code> and the
+ * property is an array the type will be inferred. If
+ * <code>null</code> and the property type cannot be inferred
+ * element type will be <code>null</code>.
* @return an observable set factory for creating observable sets
*/
public static IObservableFactory setFactory(final Realm realm,
@@ -308,6 +465,25 @@
}
/**
+ * Returns a factory for creating observable set in the current default
+ * realm, tracking the given property of a particular pojo object
+ *
+ * @param propertyName
+ * the name of the property
+ * @param elementType
+ * type of the elements in the set. If <code>null</code> and the
+ * property is an array the type will be inferred. If
+ * <code>null</code> and the property type cannot be inferred
+ * element type will be <code>null</code>.
+ * @return an observable set factory for creating observable sets
+ * @since 1.2
+ */
+ public static IObservableFactory setFactory(String propertyName,
+ Class elementType) {
+ return setFactory(Realm.getDefault(), propertyName, elementType);
+ }
+
+ /**
* Returns a factory for creating an observable map. The factory, when
* provided with a pojo object, will create an {@link IObservableMap} in the
* given realm that tracks the map-typed named property for the specified
@@ -330,6 +506,21 @@
}
/**
+ * Returns a factory for creating an observable map. The factory, when
+ * provided with a pojo object, will create an {@link IObservableMap} in the
+ * current default realm that tracks the map-typed named property for the
+ * specified pojo.
+ *
+ * @param propertyName
+ * the name of the property
+ * @return a factory for creating {@link IObservableMap} objects.
+ * @since 1.2
+ */
+ public static IObservableFactory mapPropertyFactory(String propertyName) {
+ return mapPropertyFactory(Realm.getDefault(), propertyName);
+ }
+
+ /**
* Helper method for
* <code>MasterDetailObservables.detailValue(master, valueFactory(realm,
propertyName), propertyType)</code>
@@ -358,6 +549,26 @@
/**
* Helper method for
+ * <code>MasterDetailObservables.detailValue(master, valueFactory(Realm.getDefault, propertyName), propertyType)</code>
+ *
+ * @param master
+ * @param propertyName
+ * @param propertyType
+ * can be <code>null</code>
+ * @return an observable value that tracks the current value of the named
+ * property for the current value of the master observable value
+ *
+ * @see MasterDetailObservables
+ * @since 1.2
+ */
+ public static IObservableValue observeDetailValue(IObservableValue master,
+ String propertyName, Class propertyType) {
+ return observeDetailValue(Realm.getDefault(), master, propertyName,
+ propertyType);
+ }
+
+ /**
+ * Helper method for
* <code>MasterDetailObservables.detailList(master, listFactory(realm,
propertyName, propertyType), propertyType)</code>
*
@@ -385,6 +596,26 @@
/**
* Helper method for
+ * <code>MasterDetailObservables.detailList(master, listFactory(Realm.getDefault(), propertyName, propertyType), propertyType)</code>
+ *
+ * @param master
+ * @param propertyName
+ * @param propertyType
+ * can be <code>null</code>
+ * @return an observable list that tracks the named property for the current
+ * value of the master observable value
+ *
+ * @see MasterDetailObservables
+ * @since 1.2
+ */
+ public static IObservableList observeDetailList(IObservableValue master,
+ String propertyName, Class propertyType) {
+ return observeDetailList(Realm.getDefault(), master, propertyName,
+ propertyType);
+ }
+
+ /**
+ * Helper method for
* <code>MasterDetailObservables.detailSet(master, setFactory(realm,
propertyName), propertyType)</code>
*
@@ -413,6 +644,26 @@
/**
* Helper method for
+ * <code>MasterDetailObservables.detailSet(master, setFactory(Realm.getDefault(), propertyName), propertyType)</code>
+ *
+ * @param master
+ * @param propertyName
+ * @param propertyType
+ * can be <code>null</code>
+ * @return an observable set that tracks the named property for the current
+ * value of the master observable value
+ *
+ * @see MasterDetailObservables
+ * @since 1.2
+ */
+ public static IObservableSet observeDetailSet(IObservableValue master,
+ String propertyName, Class propertyType) {
+ return observeDetailSet(Realm.getDefault(), master, propertyName,
+ propertyType);
+ }
+
+ /**
+ * Helper method for
* <code>MasterDetailObservables.detailMap(master, mapFactory(realm, propertyName))</code>
*
* @param realm
@@ -430,4 +681,19 @@
.getValueTypePropertyDescriptor(master, propertyName));
return decorator;
}
+
+ /**
+ * Helper method for
+ * <code>MasterDetailObservables.detailMap(master, mapFactory(Realm.getDefault(), propertyName))</code>
+ *
+ * @param master
+ * @param propertyName
+ * @return an observable map that tracks the map-type named property for the
+ * current value of the master observable value.
+ * @since 1.2
+ */
+ public static IObservableMap observeDetailMap(IObservableValue master,
+ String propertyName) {
+ return observeDetailMap(Realm.getDefault(), master, propertyName);
+ }
}