All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Utils.SQLUtils

java.lang.Object
   |
   +----Utils.SQLUtils

public class SQLUtils
extends Object

Constructor Index

 o SQLUtils()

Method Index

 o add_Days(Date, int)
function for getting the date after specified number of the days of the given date
 o check_Booked(Connection, Date, Interval, String, String, String)
function for checking whether a given room is booked or not on a particular day during a particular time interval or not
 o day_To_no(String)
function for getting the number corresponding to a day (String)
 o deleteCommitments(Connection, HttpServletRequest)
 o deleted_Lecture_Table(Connection)
function for creating a vector of table of deleted lectures
 o deleteExtralecturebookings(Connection, String, String, String, Interval)
this function is to delete all the extra lecture bookings of a user during a specified period of time
 o deleteLecturebookings(Connection, String, String, String, Interval)
this function is to delete all the course commitments of a user during a given period of time
 o deleteTalkbookings(Connection, String, String, String, Interval)
this function is to delete all the talk bookings of a user during a specified period of time
 o DeleteTuples(String, String[][])
The following prints/deletes tuples
 o extralecture_Commitments(Connection, String, String, Interval, String, String, String)
Function to get Resultset for extra lecture satisfying the "condition"
 o get_Daydiff(Date, Date)
function for getting the number of days represented by the difference of two days
 o get_Firstdate(Date, String)
function for getting the first date when a particular event (in this case the first day of the lecture) occurred given the start date and the day of the week
 o get_Slot(String, char)
function for getting the internal slot from time
 o getCondition(String, String, String, String)
 o insert_Booking(Connection, int, String, String)
function for inserting into booking table
 o insert_ExtraLecture(Connection, String, String, Date, Interval)
function for inserting into extra lecture table
 o insert_Talk(Connection, String, String, Date, Interval)
function for inserting into talk table
 o insert_talkGroup(Connection, int, String)
function for inserting into talk_group
 o is_Betweendate(Date, Date, Date)
function for checking whether a given date lies between to dates or not
 o is_Lecture(Date, Date, Date, int)
function for checking whether on a particular date whether there is a particular lecture or not
 o is_Lecture_Deleted(Vector, String, int, Date)
function for checking whether the periodic lecture has been cancelled or not
 o is_Verified(Connection, String, String)
function for verifying the user and password
 o lecture_Commitments(Connection, String, String, Interval, String, String, String)
Function to get Resultset for lecture satisfying the given constraints
 o no_To_Day(int)
function for getting the String day corresponding to a number
 o string_To_Date(String)
function to get a java.util.Date object from a date encoded in a string in the format dd-mm-yyyy
 o talk_Commitments(Connection, String, String, String, Interval, String, String, String)
Function to get Resultset for talk satisfying the "condition"

Constructors

 o SQLUtils
 public SQLUtils()

Methods

 o DeleteTuples
 public static void DeleteTuples(String tablename,
                                 String tuples[][])
The following prints/deletes tuples

 o getCondition
 public static String getCondition(String user_id,
                                   String speaker,
                                   String room_id,
                                   String group_id)
 o get_Slot
 public static int get_Slot(String time,
                            char c)
function for getting the internal slot from time

 o string_To_Date
 public static Date string_To_Date(String str)
function to get a java.util.Date object from a date encoded in a string in the format dd-mm-yyyy

 o no_To_Day
 public static String no_To_Day(int no)
function for getting the String day corresponding to a number

 o day_To_no
 public static int day_To_no(String day)
function for getting the number corresponding to a day (String)

 o add_Days
 public static Date add_Days(Date date,
                             int days)
function for getting the date after specified number of the days of the given date

 o get_Daydiff
 public static int get_Daydiff(Date date1,
                               Date date2)
function for getting the number of days represented by the difference of two days

 o get_Firstdate
 public static Date get_Firstdate(Date date,
                                  String day)
function for getting the first date when a particular event (in this case the first day of the lecture) occurred given the start date and the day of the week

 o is_Betweendate
 public static boolean is_Betweendate(Date date,
                                      Date start_date,
                                      Date end_date)
function for checking whether a given date lies between to dates or not

 o deleted_Lecture_Table
 public static Vector deleted_Lecture_Table(Connection con) throws SQLException
function for creating a vector of table of deleted lectures

 o is_Lecture_Deleted
 public static boolean is_Lecture_Deleted(Vector table,
                                          String course_no,
                                          int lecture_no,
                                          Date date)
function for checking whether the periodic lecture has been cancelled or not

 o is_Lecture
 public static boolean is_Lecture(Date date,
                                  Date start_date,
                                  Date end_date,
                                  int period)
function for checking whether on a particular date whether there is a particular lecture or not

 o is_Verified
 public static boolean is_Verified(Connection con,
                                   String user_id,
                                   String passwd) throws SQLException
function for verifying the user and password

 o insert_Talk
 public static int insert_Talk(Connection con,
                               String topic,
                               String speaker,
                               Date date,
                               Interval intv) throws SQLException
function for inserting into talk table

 o insert_ExtraLecture
 public static int insert_ExtraLecture(Connection con,
                                       String course_no,
                                       String room_id,
                                       Date date,
                                       Interval intv) throws SQLException
function for inserting into extra lecture table

 o insert_Booking
 public static void insert_Booking(Connection con,
                                   int talk_id,
                                   String room_id,
                                   String user_id) throws SQLException
function for inserting into booking table

 o insert_talkGroup
 public static void insert_talkGroup(Connection con,
                                     int talk_id,
                                     String group_id) throws SQLException
function for inserting into talk_group

 o check_Booked
 public static Vector check_Booked(Connection con,
                                   Date date,
                                   Interval intv,
                                   String room_id,
                                   String user_id,
                                   String group_id) throws SQLException
function for checking whether a given room is booked or not on a particular day during a particular time interval or not

 o talk_Commitments
 public static Vector talk_Commitments(Connection con,
                                       String user_id1,
                                       String speaker1,
                                       String room_id1,
                                       Interval intv,
                                       String sdate,
                                       String fdate,
                                       String group_id1) throws SQLException
Function to get Resultset for talk satisfying the "condition"

 o extralecture_Commitments
 public static Vector extralecture_Commitments(Connection con,
                                               String user_id1,
                                               String room_id1,
                                               Interval intv,
                                               String sdate,
                                               String fdate,
                                               String group_id1) throws SQLException
Function to get Resultset for extra lecture satisfying the "condition"

 o lecture_Commitments
 public static Vector lecture_Commitments(Connection con,
                                          String user_id,
                                          String room_id,
                                          Interval intv,
                                          String sdate,
                                          String fdate,
                                          String group_id) throws SQLException
Function to get Resultset for lecture satisfying the given constraints

 o deleteCommitments
 public static void deleteCommitments(Connection con,
                                      HttpServletRequest request) throws SQLException
 o deleteTalkbookings
 public static void deleteTalkbookings(Connection con,
                                       String user_id,
                                       String start_date,
                                       String end_date,
                                       Interval intv) throws SQLException
this function is to delete all the talk bookings of a user during a specified period of time

 o deleteExtralecturebookings
 public static void deleteExtralecturebookings(Connection con,
                                               String user_id,
                                               String start_date,
                                               String end_date,
                                               Interval intv) throws SQLException
this function is to delete all the extra lecture bookings of a user during a specified period of time

 o deleteLecturebookings
 public static void deleteLecturebookings(Connection con,
                                          String user_id,
                                          String sdate,
                                          String fdate,
                                          Interval intv) throws SQLException
this function is to delete all the course commitments of a user during a given period of time


All Packages  Class Hierarchy  This Package  Previous  Next  Index