You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2012/02/05 00:24:19 UTC

svn commit: r1240641 - in /commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2: BeanAccessor.java DefaultBeanAccessor.java IndexedPropertySetterAccessor.java MappedPropertySetterAccessor.java

Author: simonetripodi
Date: Sat Feb  4 23:24:05 2012
New Revision: 1240641

URL: http://svn.apache.org/viewvc?rev=1240641&view=rev
Log:
added chaining interfaces for (keyed|mapped) properties setters

Added:
    commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/IndexedPropertySetterAccessor.java   (with props)
    commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/MappedPropertySetterAccessor.java   (with props)
Modified:
    commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanAccessor.java
    commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanAccessor.java

Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanAccessor.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanAccessor.java?rev=1240641&r1=1240640&r2=1240641&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanAccessor.java (original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanAccessor.java Sat Feb  4 23:24:05 2012
@@ -46,6 +46,12 @@ public interface BeanAccessor<B>
     BeanPropertySetter<B> setProperty( String name )
         throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException;
 
+    IndexedPropertySetterAccessor<B> setIndexedProperty( String name )
+        throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException;
+
+    IndexedPropertySetterAccessor<B> setMappedProperty( String name )
+        throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException;
+
     // clone
 
     B cloneBean()

Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanAccessor.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanAccessor.java?rev=1240641&r1=1240640&r2=1240641&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanAccessor.java (original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/DefaultBeanAccessor.java Sat Feb  4 23:24:05 2012
@@ -102,6 +102,20 @@ final class DefaultBeanAccessor<B>
         return new DefaultBeanPropertySetter<B>( bean, propertyDescriptor.getWriteMethod() );
     }
 
+    public IndexedPropertySetterAccessor<B> setIndexedProperty( String name )
+        throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException
+    {
+        // TODO
+        return null;
+    }
+
+    public IndexedPropertySetterAccessor<B> setMappedProperty( String name )
+        throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException
+    {
+        // TODO
+        return null;
+    }
+
     public B cloneBean()
         throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException
     {

Added: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/IndexedPropertySetterAccessor.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/IndexedPropertySetterAccessor.java?rev=1240641&view=auto
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/IndexedPropertySetterAccessor.java (added)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/IndexedPropertySetterAccessor.java Sat Feb  4 23:24:05 2012
@@ -0,0 +1,27 @@
+package org.apache.commons.beanutils2;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public interface IndexedPropertySetterAccessor<B>
+{
+
+    BeanPropertySetter<B> at( int index );
+
+}

Propchange: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/IndexedPropertySetterAccessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/IndexedPropertySetterAccessor.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/IndexedPropertySetterAccessor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/MappedPropertySetterAccessor.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/MappedPropertySetterAccessor.java?rev=1240641&view=auto
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/MappedPropertySetterAccessor.java (added)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/MappedPropertySetterAccessor.java Sat Feb  4 23:24:05 2012
@@ -0,0 +1,27 @@
+package org.apache.commons.beanutils2;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+public interface MappedPropertySetterAccessor<B>
+{
+
+    BeanPropertySetter<B> withKey( String key );
+
+}

Propchange: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/MappedPropertySetterAccessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/MappedPropertySetterAccessor.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/MappedPropertySetterAccessor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain