001    package coldfusion.server;
002    
003    import java.io.IOException;
004    import java.sql.SQLException;
005    
006    import railo.runtime.exp.SecurityException;
007    import railo.runtime.type.Array;
008    import railo.runtime.type.Struct;
009    import coldfusion.sql.DataSource;
010    
011    
012    public interface DataSourceService extends Service {
013            
014            /*
015            TODO impl
016            public abstract Query executeQuery(Connection arg0, String arg1,
017                            ParameterList arg2, Integer arg3, Integer arg4, Integer arg5,
018                            int[] arg6, int arg7, int arg8, boolean arg9, boolean arg10)
019                            throws SQLException;
020    
021            public abstract Query executeQuery(Connection arg0, String arg1,
022                            ParameterList arg2, Integer arg3, Integer arg4, Integer arg5,
023                            int[] arg6, String arg7) throws SQLException;
024    
025            public abstract Query executeQuery(Connection arg0, String arg1,
026                            ParameterList arg2, Integer arg3, Integer arg4, Integer arg5,
027                            int[] arg6, DataSourceDef arg7) throws SQLException;
028    
029            public abstract Query executeQuery(Connection arg0, String arg1,
030                            ParameterList arg2, Integer arg3, Integer arg4, Integer arg5,
031                            int[] arg6, Object arg7) throws SQLException;
032    
033            public abstract Query executeCall(Connection arg0, String arg1,
034                            ParameterList arg2, int[] arg3, Integer arg4, Integer arg5,
035                            int[] arg6, int arg7, int arg8, boolean arg9, boolean arg10)
036                            throws SQLException;
037    
038            public abstract Query executeCall(Connection arg0, String arg1,
039                            ParameterList arg2, int[] arg3, Integer arg4, Integer arg5,
040                            int[] arg6, String arg7) throws SQLException;
041    
042            public abstract Query executeCall(Connection arg0, String arg1,
043                            ParameterList arg2, int[] arg3, Integer arg4, Integer arg5,
044                            int[] arg6, DataSourceDef arg7) throws SQLException;
045    
046            public abstract Query executeCall(Connection arg0, String arg1,
047                            ParameterList arg2, int[] arg3, Integer arg4, Integer arg5,
048                            int[] arg6, Object arg7) throws SQLException;
049    */
050            public abstract Struct getDatasources() throws SecurityException;
051    
052            public abstract Struct getDrivers() throws ServiceException, SecurityException;
053    
054            public abstract Array getNames() throws SecurityException;
055    
056            public abstract Struct getDefaults();
057    
058            public abstract Number getMaxQueryCount();
059    
060            public abstract void setMaxQueryCount(Number arg0);
061    
062            public abstract String encryptPassword(String arg0);
063    
064            public abstract boolean verifyDatasource(String arg0) throws SQLException, SecurityException;
065    
066            public abstract DataSource getDatasource(String arg0) throws SQLException, SecurityException;
067    
068            public abstract String getDbdir();
069    
070            public abstract Object getCachedQuery(String arg0);
071    
072            public abstract void setCachedQuery(String arg0, Object arg1);
073    
074            public abstract void purgeQueryCache() throws IOException;
075    
076            public abstract boolean disableConnection(String arg0);
077    
078            public abstract boolean isJadoZoomLoaded();
079    
080            public abstract void removeDatasource(String arg0) throws SQLException, SecurityException;
081    
082    }