1 package de.fhdw.wtf.persistence.utils; 2 3 import java.sql.CallableStatement; 4 import java.sql.SQLException; 5 6 import de.fhdw.wtf.persistence.meta.Object; 7 8 /** 9 * Abstract wrapper for Database Querys. 10 */ 11 public interface DBConnectionObjectHandler { 12 /** 13 * 14 * @return a character who is representing the type of the object. 15 */ 16 String getObjectTypeString(); 17 18 /** 19 * adds the wrapped object to the <call> statement at position <parameterIndex>. 20 * 21 * @param call 22 * current DB call statement 23 * @param parameterIndex 24 * the parameter index of the statement 25 * @throws SQLException 26 */ 27 void handleCall(CallableStatement call, int parameterIndex) throws SQLException; 28 29 /** 30 * gets the wrapped object. 31 * 32 * @return the wrapped object as a Object 33 */ 34 Object getObject(); 35 }