% MYSQL class for tools to manipulate the current object/figure/axis.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: MYSQL class for tools to manipulate the current
%              object/figure/axis.
%
% MYSQL METHODS:
%
%     Static methods:
%       yticks      - Set the input vector as the y-ticks of the current axis
%       %%% GENERAL TOOLS
%       logindlg          - creates a login dialog box.
%       dbquery           - query an AO repository database.
%       getAOsInTimeSpan  - performs high-level queries to retrieve AOs from
%                           a LTPDA repository.
%       insert            - inserts values into a single row of a table using
%                           JDBC driver specified by the input connection.
%
%       %%% MYSQL TOOLS
%       connect           - connects to an LTPDA repository and returns
%                           the connection object.
%       getMaxId          - get the maximum Id from the objs table.
%       getMD5hash        - gets the md5 hash string of a given object ID.
%       getObjIds         - gets a list of object ids from a given collection id.
%       getObjType        - gets the object type associated with the given object id.
%       getUserID         - gets the user ID number corresponding to the given
%                           user name.
%       getXdoc           - retrieves an object with given id from the
%                           LTPDA repository
%
% HELP:        To see the available static methods, call
%              >> methods utils.mysql
%
% HISTORY:     26-05-2008 Diepholz
%                 Creation
%
% VERSION:     $Id: mysql.m,v 1.3 2009/08/11 12:02:46 hewitson Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

classdef mysql

  %------------------------------------------------
  %--------- Declaration of Static methods --------
  %------------------------------------------------
  methods (Static)

    %-------------------------------------------------------------
    % List other methods
    %-------------------------------------------------------------

    %%% GENERAL TOOLS
	varargout = getsinfo(varargin) % return sinfo structure of repository object
    varargout = logindlg(varargin) % creates a login dialog box.
    varargout = dbquery(varargin)  % query an AO repository database.
    varargout = getAOsInTimeSpan(varargin) % performs high-level queries to retrieve AOs from an LTPDA repository.
    message   = insert(conn, table, varargin) % inserts values into a single row of a table using JDBC driver specified by the input connection.
    varargout = getRepositoryVersion(varargin);
    
    
    %%% MYSQL TOOLS
    varargout = connect(varargin) % connects to an LTPDA repository and returns the connection object.
    id   = getMaxId(conn)         % get the maximum Id from the objs table.
    h    = getMD5hash(conn, id)   % gets the md5 hash string of a given object ID.
    ids  = getObjIds(conn, cid)   % gets a list of object ids from a given collection id.
    type = getObjType(conn, id)   % gets the object type associated with the given object id.
    [userid,dbuser] = getUserID(conn, username) % gets the user ID number corresponding to the given user name.
    xdoc = getXdoc(conn, id)      % retrieves an object with given id from the LTPDA repository

  end % End static methods

end

