// Path: modules/common/app/edu/berkeley/ground/common/exception/GroundException.java
// public class GroundException extends Exception {
// 
//   private static final long serialVersionUID = 1L;
// 
//   private final String message;
//   private final ExceptionType exceptionType;
// 
//   public enum ExceptionType {
//     DB("Database Exception:", "%s"),
//     ITEM_NOT_FOUND("GroundItemNotFoundException", "No %s \'%s\' found."),
//     VERSION_NOT_FOUND("GroundVersionNotFoundException", "No %s \'%s\' found."),
//     ITEM_ALREADY_EXISTS("GroundItemAlreadyExistsException", "%s %s already exists."),
//     OTHER("GroundException", "%s");
// 
//     String name;
//     String description;
// 
//     ExceptionType(String name, String description) {
//       this.name = name;
//       this.description = description;
//     }
// 
//     public String format(String... values) {
//       return String.format(this.description, values);
//     }
//   }
// 
//   public GroundException(ExceptionType exceptionType, String... values) {
//     this.exceptionType = exceptionType;
//     this.message = this.exceptionType.format(values);
//   }
// 
//   public GroundException(Exception exception) {
//     this.exceptionType = ExceptionType.OTHER;
//     this.message = this.exceptionType.format(exception.getMessage());
//   }
// 
//   @Override
//   public String getMessage() {
//     return this.message;
//   }
// 
//   public ExceptionType getExceptionType() {
//     return this.exceptionType;
//   }
// }
// 
// Path: modules/common/app/edu/berkeley/ground/common/model/version/VersionSuccessor.java
// public class VersionSuccessor {
// 
//   private final long id;
// 
//   private final long fromId;
// 
//   private final long toId;
// 
//   /**
//    * Create a version successor.
//    *
//    * @param id the id of the successor
//    * @param fromId the source id
//    * @param toId the destination id
//    */
//   public VersionSuccessor(long id, long fromId, long toId) {
//     this.id = id;
//     this.fromId = fromId;
//     this.toId = toId;
//   }
// 
//   public long getId() {
//     return this.id;
//   }
// 
//   public long getFromId() {
//     return this.fromId;
//   }
// 
//   public long getToId() {
//     return this.toId;
//   }
// }
// 
// Path: modules/common/app/edu/berkeley/ground/common/util/DbStatements.java
// public interface DbStatements<T> {
// 
//   void append(T statement);
// 
//   void merge(DbStatements other);
// 
//   List<T> getAllStatements();
// 
// }


import edu.berkeley.ground.common.exception.GroundException;
import edu.berkeley.ground.common.model.version.VersionSuccessor;
import edu.berkeley.ground.common.util.DbStatements;
/**
 * Licensed 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
 *
 * <p>http://www.apache.org/licenses/LICENSE-2.0
 *
 * <p>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.
 */
package edu.berkeley.ground.common.dao.version;


public interface VersionSuccessorDao {

  DbStatements insert(VersionSuccessor successor);

// Path: modules/common/app/edu/berkeley/ground/common/exception/GroundException.java
// public class GroundException extends Exception {
// 
//   private static final long serialVersionUID = 1L;
// 
//   private final String message;
//   private final ExceptionType exceptionType;
// 
//   public enum ExceptionType {
//     DB("Database Exception:", "%s"),
//     ITEM_NOT_FOUND("GroundItemNotFoundException", "No %s \'%s\' found."),
//     VERSION_NOT_FOUND("GroundVersionNotFoundException", "No %s \'%s\' found."),
//     ITEM_ALREADY_EXISTS("GroundItemAlreadyExistsException", "%s %s already exists."),
//     OTHER("GroundException", "%s");
// 
//     String name;
//     String description;
// 
//     ExceptionType(String name, String description) {
//       this.name = name;
//       this.description = description;
//     }
// 
//     public String format(String... values) {
//       return String.format(this.description, values);
//     }
//   }
// 
//   public GroundException(ExceptionType exceptionType, String... values) {
//     this.exceptionType = exceptionType;
//     this.message = this.exceptionType.format(values);
//   }
// 
//   public GroundException(Exception exception) {
//     this.exceptionType = ExceptionType.OTHER;
//     this.message = this.exceptionType.format(exception.getMessage());
//   }
// 
//   @Override
//   public String getMessage() {
//     return this.message;
//   }
// 
//   public ExceptionType getExceptionType() {
//     return this.exceptionType;
//   }
// }
// 
// Path: modules/common/app/edu/berkeley/ground/common/model/version/VersionSuccessor.java
// public class VersionSuccessor {
// 
//   private final long id;
// 
//   private final long fromId;
// 
//   private final long toId;
// 
//   /**
//    * Create a version successor.
//    *
//    * @param id the id of the successor
//    * @param fromId the source id
//    * @param toId the destination id
//    */
//   public VersionSuccessor(long id, long fromId, long toId) {
//     this.id = id;
//     this.fromId = fromId;
//     this.toId = toId;
//   }
// 
//   public long getId() {
//     return this.id;
//   }
// 
//   public long getFromId() {
//     return this.fromId;
//   }
// 
//   public long getToId() {
//     return this.toId;
//   }
// }
// 
// Path: modules/common/app/edu/berkeley/ground/common/util/DbStatements.java
// public interface DbStatements<T> {
// 
//   void append(T statement);
// 
//   void merge(DbStatements other);
// 
//   List<T> getAllStatements();
// 
// }


// Path: modules/common/app/edu/berkeley/ground/common/dao/version/VersionSuccessorDao.java
import edu.berkeley.ground.common.exception.GroundException;
import edu.berkeley.ground.common.model.version.VersionSuccessor;
import edu.berkeley.ground.common.util.DbStatements;

/**
 * Licensed 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
 *
 * <p>http://www.apache.org/licenses/LICENSE-2.0
 *
 * <p>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.
 */
package edu.berkeley.ground.common.dao.version;


public interface VersionSuccessorDao {

  DbStatements insert(VersionSuccessor successor);

  VersionSuccessor retrieveFromDatabase(long dbId) throws GroundException;