From: Artur Signell Date: Tue, 15 Dec 2009 09:06:05 +0000 (+0000) Subject: Added generics from Container interface X-Git-Tag: 6.7.0.beta1~2151 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4299e0e07c2f6e84e7c0071d1e4e7a0eea86fb46;p=vaadin-framework.git Added generics from Container interface svn changeset:10302/svn branch:6.2 --- diff --git a/src/com/vaadin/data/util/BeanItemContainer.java b/src/com/vaadin/data/util/BeanItemContainer.java index 10d3525581..7848de5eed 100644 --- a/src/com/vaadin/data/util/BeanItemContainer.java +++ b/src/com/vaadin/data/util/BeanItemContainer.java @@ -251,8 +251,7 @@ public class BeanItemContainer implements Indexed, Sortable, Filterable, } } - @SuppressWarnings("unchecked") - public boolean addContainerProperty(Object propertyId, Class type, + public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } diff --git a/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java b/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java index 4188591014..e0c1324553 100644 --- a/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java +++ b/src/com/vaadin/data/util/ContainerHierarchicalWrapper.java @@ -510,7 +510,7 @@ public class ContainerHierarchicalWrapper implements Container.Hierarchical, * @throws UnsupportedOperationException * if the addContainerProperty is not supported. */ - public boolean addContainerProperty(Object propertyId, Class type, + public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue) throws UnsupportedOperationException { return container.addContainerProperty(propertyId, type, defaultValue); diff --git a/src/com/vaadin/data/util/ContainerOrderedWrapper.java b/src/com/vaadin/data/util/ContainerOrderedWrapper.java index 0d4600caab..44bd6a8653 100644 --- a/src/com/vaadin/data/util/ContainerOrderedWrapper.java +++ b/src/com/vaadin/data/util/ContainerOrderedWrapper.java @@ -299,7 +299,7 @@ public class ContainerOrderedWrapper implements Container.Ordered, * @return true if the operation succeeded, false * if not */ - public boolean addContainerProperty(Object propertyId, Class type, + public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue) throws UnsupportedOperationException { return container.addContainerProperty(propertyId, type, defaultValue); @@ -511,8 +511,7 @@ public class ContainerOrderedWrapper implements Container.Ordered, /* * (non-Javadoc) * - * @see - * com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object, + * @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object, * java.lang.Object) */ public Item addItemAfter(Object previousItemId, Object newItemId) @@ -537,8 +536,7 @@ public class ContainerOrderedWrapper implements Container.Ordered, /* * (non-Javadoc) * - * @see - * com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object) + * @see com.vaadin.data.Container.Ordered#addItemAfter(java.lang.Object) */ public Object addItemAfter(Object previousItemId) throws UnsupportedOperationException { diff --git a/src/com/vaadin/data/util/FilesystemContainer.java b/src/com/vaadin/data/util/FilesystemContainer.java index 3c8fcac92f..126e2237dd 100644 --- a/src/com/vaadin/data/util/FilesystemContainer.java +++ b/src/com/vaadin/data/util/FilesystemContainer.java @@ -828,11 +828,10 @@ public class FilesystemContainer implements Container.Hierarchical { /* * (non-Javadoc) * - * @see - * com.vaadin.data.Container#addContainerProperty(java.lang.Object, + * @see com.vaadin.data.Container#addContainerProperty(java.lang.Object, * java.lang.Class, java.lang.Object) */ - public boolean addContainerProperty(Object propertyId, Class type, + public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue) throws UnsupportedOperationException { throw new UnsupportedOperationException( "File system container does not support this operation"); @@ -882,9 +881,7 @@ public class FilesystemContainer implements Container.Hierarchical { /* * (non-Javadoc) * - * @see - * com.vaadin.data.Container#removeContainerProperty(java.lang.Object - * ) + * @see com.vaadin.data.Container#removeContainerProperty(java.lang.Object ) */ public boolean removeContainerProperty(Object propertyId) throws UnsupportedOperationException { diff --git a/src/com/vaadin/data/util/IndexedContainer.java b/src/com/vaadin/data/util/IndexedContainer.java index 609f488938..c61b16bada 100644 --- a/src/com/vaadin/data/util/IndexedContainer.java +++ b/src/com/vaadin/data/util/IndexedContainer.java @@ -235,7 +235,7 @@ public class IndexedContainer implements Container.Indexed, * @see com.vaadin.data.Container#addContainerProperty(java.lang.Object, * java.lang.Class, java.lang.Object) */ - public boolean addContainerProperty(Object propertyId, Class type, + public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue) { // Fails, if nulls are given diff --git a/src/com/vaadin/data/util/QueryContainer.java b/src/com/vaadin/data/util/QueryContainer.java index 1598d28ed8..96788947a9 100644 --- a/src/com/vaadin/data/util/QueryContainer.java +++ b/src/com/vaadin/data/util/QueryContainer.java @@ -341,7 +341,7 @@ public class QueryContainer implements Container, Container.Ordered, * @throws UnsupportedOperationException * if the addContainerProperty method is not supported. */ - public boolean addContainerProperty(Object propertyId, Class type, + public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } diff --git a/src/com/vaadin/ui/AbstractSelect.java b/src/com/vaadin/ui/AbstractSelect.java index 66cdaf8a65..b8ef6bc206 100644 --- a/src/com/vaadin/ui/AbstractSelect.java +++ b/src/com/vaadin/ui/AbstractSelect.java @@ -718,7 +718,7 @@ public abstract class AbstractSelect extends AbstractField implements * @see com.vaadin.data.Container#addContainerProperty(java.lang.Object, * java.lang.Class, java.lang.Object) */ - public boolean addContainerProperty(Object propertyId, Class type, + public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue) throws UnsupportedOperationException { final boolean retval = items.addContainerProperty(propertyId, type, diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java index 1198744519..3339dc90ec 100644 --- a/src/com/vaadin/ui/Table.java +++ b/src/com/vaadin/ui/Table.java @@ -2594,7 +2594,7 @@ public class Table extends AbstractSelect implements Action.Container, * Object) */ @Override - public boolean addContainerProperty(Object propertyId, Class type, + public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue) throws UnsupportedOperationException { boolean visibleColAdded = false; @@ -2638,7 +2638,7 @@ public class Table extends AbstractSelect implements Action.Container, * @see com.vaadin.data.Container#addContainerProperty(Object, Class, * Object) */ - public boolean addContainerProperty(Object propertyId, Class type, + public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue, String columnHeader, Resource columnIcon, String columnAlignment) throws UnsupportedOperationException { if (!this.addContainerProperty(propertyId, type, defaultValue)) { diff --git a/tests/src/com/vaadin/automatedtests/featurebrowser/GeneratedColumnExample.java b/tests/src/com/vaadin/automatedtests/featurebrowser/GeneratedColumnExample.java index 260716a31d..095af6c02d 100644 --- a/tests/src/com/vaadin/automatedtests/featurebrowser/GeneratedColumnExample.java +++ b/tests/src/com/vaadin/automatedtests/featurebrowser/GeneratedColumnExample.java @@ -127,7 +127,7 @@ public class GeneratedColumnExample extends CustomComponent { items = new Vector(); // Yeah this is just a test } - public boolean addContainerProperty(Object propertyId, Class type, + public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } diff --git a/tests/src/com/vaadin/tests/book/TableEditableBean.java b/tests/src/com/vaadin/tests/book/TableEditableBean.java index 847ff3e935..e3828d29ee 100644 --- a/tests/src/com/vaadin/tests/book/TableEditableBean.java +++ b/tests/src/com/vaadin/tests/book/TableEditableBean.java @@ -92,7 +92,7 @@ public class TableEditableBean extends CustomComponent { items = new Item[100]; // Yeah this is just a test } - public boolean addContainerProperty(Object propertyId, Class type, + public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } diff --git a/tests/src/com/vaadin/tests/book/TableHuge.java b/tests/src/com/vaadin/tests/book/TableHuge.java index b3828a5a3b..191d4bbfc8 100644 --- a/tests/src/com/vaadin/tests/book/TableHuge.java +++ b/tests/src/com/vaadin/tests/book/TableHuge.java @@ -30,7 +30,7 @@ public class TableHuge extends CustomComponent { this.numberofitems = numberofitems; } - public boolean addContainerProperty(Object propertyId, Class type, + public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } diff --git a/tests/src/com/vaadin/tests/tickets/Ticket1506_TestContainer.java b/tests/src/com/vaadin/tests/tickets/Ticket1506_TestContainer.java index 7002602ca2..a9423f5b3e 100644 --- a/tests/src/com/vaadin/tests/tickets/Ticket1506_TestContainer.java +++ b/tests/src/com/vaadin/tests/tickets/Ticket1506_TestContainer.java @@ -110,7 +110,7 @@ public class Ticket1506_TestContainer implements Container { throw new UnsupportedOperationException("Not implemented"); } - public boolean addContainerProperty(Object propertyId, Class type, + public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue) throws UnsupportedOperationException { throw new UnsupportedOperationException("Not implemented"); } diff --git a/tests/src/com/vaadin/tests/tickets/Ticket1506_TestContainer2.java b/tests/src/com/vaadin/tests/tickets/Ticket1506_TestContainer2.java index 4345b3e581..46be7e9fe4 100644 --- a/tests/src/com/vaadin/tests/tickets/Ticket1506_TestContainer2.java +++ b/tests/src/com/vaadin/tests/tickets/Ticket1506_TestContainer2.java @@ -102,7 +102,7 @@ public class Ticket1506_TestContainer2 implements Container { throw new UnsupportedOperationException("Not implemented"); } - public boolean addContainerProperty(Object propertyId, Class type, + public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue) throws UnsupportedOperationException { throw new UnsupportedOperationException("Not implemented"); }