View Javadoc
1   /**
2    *    Copyright 2009-2015 the original author or authors.
3    *
4    *    Licensed under the Apache License, Version 2.0 (the "License");
5    *    you may not use this file except in compliance with the License.
6    *    You may obtain a copy of the License at
7    *
8    *       http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *    Unless required by applicable law or agreed to in writing, software
11   *    distributed under the License is distributed on an "AS IS" BASIS,
12   *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *    See the License for the specific language governing permissions and
14   *    limitations under the License.
15   */
16  package org.apache.ibatis.submitted.custom_collection_handling;
17  
18  import java.util.List;
19  
20  import org.apache.ibatis.reflection.MetaObject;
21  import org.apache.ibatis.reflection.factory.ObjectFactory;
22  import org.apache.ibatis.reflection.property.PropertyTokenizer;
23  
24  public class CustomObjectWrapper implements org.apache.ibatis.reflection.wrapper.ObjectWrapper {
25  
26    private CustomCollection collection;
27    
28    public CustomObjectWrapper(CustomCollection collection){
29      this.collection = collection;
30    }
31    
32    public Object get(PropertyTokenizer prop) {
33      // TODO Auto-generated method stub
34      return null;
35    }
36  
37    public void set(PropertyTokenizer prop, Object value) {
38      // TODO Auto-generated method stub
39  
40    }
41  
42    public String findProperty(String name, boolean useCamelCaseMapping) {
43      // TODO Auto-generated method stub
44      return null;
45    }
46  
47    public String[] getGetterNames() {
48      // TODO Auto-generated method stub
49      return null;
50    }
51  
52    public String[] getSetterNames() {
53      // TODO Auto-generated method stub
54      return null;
55    }
56  
57    public Class<?> getSetterType(String name) {
58      // TODO Auto-generated method stub
59      return null;
60    }
61  
62    public Class<?> getGetterType(String name) {
63      // TODO Auto-generated method stub
64      return null;
65    }
66  
67    public boolean hasSetter(String name) {
68      // TODO Auto-generated method stub
69      return false;
70    }
71  
72    public boolean hasGetter(String name) {
73      // TODO Auto-generated method stub
74      return false;
75    }
76  
77    public MetaObject instantiatePropertyValue(String name, PropertyTokenizer prop, ObjectFactory objectFactory) {
78      // TODO Auto-generated method stub
79      return null;
80    }
81  
82    public boolean isCollection() {
83      return true;
84    }
85  
86    public void add(Object element) {
87      ((CustomCollection<Object>) collection).add(element);
88    }
89  
90    public <E> void addAll(List<E> element) {
91      ((CustomCollection<Object>) collection).addAll(element);
92    }
93  
94  }