View Javadoc
1   /**
2    * Copyright 2005-2016 The Kuali Foundation
3    *
4    * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
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.kuali.rice.krad.data.platform.testincrementers;
17  
18  import org.springframework.dao.DataAccessException;
19  import org.springframework.jdbc.support.incrementer.AbstractColumnMaxValueIncrementer;
20  
21  import javax.sql.DataSource;
22  
23  /**
24   * Mock incrementer used to test custom incrementers
25   */
26   public class CustomIncrementerMySQLVersion5 extends AbstractColumnMaxValueIncrementer {
27  
28      @Override
29          public int nextIntValue() throws DataAccessException {
30              return 0;
31          }
32  
33          @Override
34          public long nextLongValue() throws DataAccessException {
35              return 0;
36          }
37  
38          @Override
39          public String nextStringValue() throws DataAccessException {
40              return "mySQL5";
41          }
42  
43          @Override
44          protected long getNextKey() {
45              return 5555L;
46          }
47  }