View Javadoc

1   /*
2    * Copyright 2008 fastConnect.
3    *    
4    * This file is part of Composite BulkDataPersister.  
5    *
6    * This is free software; you can redistribute it and/or modify it
7    * under the terms of the GNU Lesser General Public License as
8    * published by the Free Software Foundation; either version 3 of
9    * the License, or (at your option) any later version.
10   *
11   * This software is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14   * Lesser General Public License for more details.
15   *
16   * You should have received a copy of the GNU Lesser General Public
17   * License along with this software. If not, see <http://www.gnu.org/licenses/>.
18   */
19  package fr.fastconnect.wanblueprint.mirror;
20  
21  import java.util.List;
22  import java.util.Properties;
23  
24  import com.gigaspaces.datasource.BulkItem;
25  import com.gigaspaces.datasource.DataIterator;
26  import com.gigaspaces.datasource.DataSourceException;
27  import com.gigaspaces.datasource.ExternalDataSource;
28  import com.j_spaces.core.client.SQLQuery;
29  
30  /**
31   * Simple ExternalDataSource adapter.<br>
32   * Since there is apparently no way to implement only the DataBulkProvider with
33   * an external datasource in a pu.xml use this class to simplify mirror
34   * implementation.
35   * 
36   * @param <T>
37   */
38  
39  public class ExternalDataSourceAdapter<T> implements ExternalDataSource<T> {
40  
41      public int count(final SQLQuery<T> query) throws DataSourceException {
42          return 0;
43      }
44  
45      public int count(final T template) throws DataSourceException {
46          return 0;
47      }
48  
49      public void executeBulk(final List<BulkItem> bulk)
50              throws DataSourceException {
51  
52      }
53  
54      public void init(final Properties properties) throws DataSourceException {
55  
56      }
57  
58      public DataIterator<T> initialLoad() throws DataSourceException {
59          return null;
60      }
61  
62      public DataIterator<T> iterator(final SQLQuery<T> query)
63              throws DataSourceException {
64          return null;
65      }
66  
67      public DataIterator<T> iterator(final T template)
68              throws DataSourceException {
69          return null;
70      }
71  
72      public T read(final T template) throws DataSourceException {
73          return null;
74      }
75  
76      public void remove(final T object) throws DataSourceException {
77  
78      }
79  
80      public void removeBatch(final List<T> objects) throws DataSourceException {
81  
82      }
83  
84      public void shutdown() throws DataSourceException {
85  
86      }
87  
88      public void update(final T object) throws DataSourceException {
89  
90      }
91  
92      public void updateBatch(final List<T> objects) throws DataSourceException {
93  
94      }
95  
96      public void write(final T object) throws DataSourceException {
97  
98      }
99  
100     public void writeBatch(final List<T> objects) throws DataSourceException {
101 
102     }
103 
104 }