Package com.mysql.jdbc.jdbc2.optional

Examples of com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory


      return dataSource;
  }
 
  public Boolean save(String i_query)
  {
      MysqlDataSource l_ds = DBAccess.ReturnDataSource();
      Connection l_con = null;
      Statement l_stat = null;
     
      int l_anz = 0;
      try

      {
        l_con = l_ds.getConnection();
      l_stat = l_con.createStatement()

       
      l_stat.execute(i_query);
   
View Full Code Here


  private final static DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
 
  public Artifact(long artifact_id, boolean dummy)
  {
 
    MysqlDataSource l_ds = DBAccess.ReturnDataSource();
      Connection l_con = null;
      Statement l_stat = null;
     
      try
      {
        l_con = l_ds.getConnection();
      l_stat = l_con.createStatement()

       
      ResultSet s = l_stat.executeQuery("select artifact_id, group_artifact_id, status_id, category_id, artifact_group_id," +
          " resolution_id, priority, submitted_by, assigned_to, from_unixtime(open_date) as open_date, from_unixtime(close_date) as close_date, " +
View Full Code Here

    m_group_artifact_id = group_artifact_id;
  }
 
  public static LinkedList<Long> getArtifacts(long group_artifact_id, Date begin, Date end)
  {
    MysqlDataSource l_ds = DBAccess.ReturnDataSource();
      Connection l_con = null;
      Statement l_stat = null;
      LinkedList<Long> l_artifact_ids = new LinkedList<Long>();
     
      try
      {
        l_con = l_ds.getConnection();
      l_stat = l_con.createStatement()

       
      ResultSet s = l_stat.executeQuery("select artifact_id from artifact where group_artifact_id = " + group_artifact_id + " and from_unix_time(open_date) > '"
          + df.format(begin) + "' and from_unix_time(close_date) < '" + df.format(begin) + "'");
View Full Code Here

      return l_artifact_ids;
  }
 
  public static LinkedList<Long> getArtifacts(long group_artifact_id)
  {
    MysqlDataSource l_ds = DBAccess.ReturnDataSource();
      Connection l_con = null;
      Statement l_stat = null;
      LinkedList<Long> l_artifact_ids = new LinkedList<Long>();
     
      try
      {
        l_con = l_ds.getConnection();
      l_stat = l_con.createStatement()

       
      ResultSet s = l_stat.executeQuery("select artifact_id from artifact where group_artifact_id = " + group_artifact_id);
     
View Full Code Here

      return l_artifact_ids;
  }
 
  public static Artifact getArtifact(long artifact_id)
  {
    MysqlDataSource l_ds = DBAccess.ReturnDataSource();
      Connection l_con = null;
      Statement l_stat = null;
      Artifact l_artifact = null;
     
     
      try
      {
        l_con = l_ds.getConnection();
      l_stat = l_con.createStatement()

       
      ResultSet s = l_stat.executeQuery("select artifact_id, group_artifact_id, status_id, category_id, artifact_group_id," +
          " resolution_id, priority, submitted_by, assigned_to, from_unixtime(open_date) as open_date, from_unixtime(close_date) as close_date, " +
View Full Code Here

    m_revision_user_id = mRevisionUserId;
  }
 
  public static LinkedList<CVS_revision> getRevisions(long modul_id, Date begin, Date end)
  {
    MysqlDataSource l_ds = DBAccess.ReturnDataSource();
      Connection l_con = null;
      Statement l_stat = null;
      LinkedList<CVS_revision> l_revisions = new LinkedList<CVS_revision>();
     
      try
      {
        l_con = l_ds.getConnection();
      l_stat = l_con.createStatement()

        String str ="select revision_id, revision_modul_id, from_unixtime(revision_date) revision_date, revision_author_name, revision_user_id "+
        " from cvs_revision where revision_modul_id = " + modul_id + " and from_unixtime(revision_date) > '" +df.format(begin)
        + "' and from_unixtime(revision_date) < '"+ df.format(end) +"' and revision_user_id <> 0";
View Full Code Here

    m_name=name;
  }
 
  public static LinkedList<Long> getGroupArtifactIDsByGroupID(long group_id)
  {
    MysqlDataSource l_ds = DBAccess.ReturnDataSource();
      Connection l_con = null;
      Statement l_stat = null;
      LinkedList<Long> l_group_artifact_ids = new LinkedList<Long>();
     
      try
      {
        l_con = l_ds.getConnection();
      l_stat = l_con.createStatement()

       
      ResultSet s = l_stat.executeQuery("select group_artifact_id from artifact_group_list where group_id = " + group_id);
     
View Full Code Here

  private long group_id = 0;
  private String group_name = null;
 
  public static Hashtable <Long, String> getall_by_id_name()
  {
    MysqlDataSource l_ds = DBAccess.ReturnDataSource();
      Connection l_con = null;
      Statement l_stat = null;
      Hashtable <Long, String> l_id_names = new Hashtable<Long, String>();
     
      try
      {
        l_con = l_ds.getConnection();
      l_stat = l_con.createStatement()

       
      ResultSet s = l_stat.executeQuery("select group_id, group_name from groups");
     
View Full Code Here

  private final static DateFormat df = new SimpleDateFormat("yyyy-MM-dd");

   
    public static LinkedList<Long> getModules (Date i_von, Date i_bis, long i_modul_group_id)
    {
      MysqlDataSource l_ds = DBAccess.ReturnDataSource();
        Connection l_con = null;
        Statement l_stat = null;
       
      LinkedList<Long> modul_ids = new LinkedList<Long>();
      try
      {
        l_con = l_ds.getConnection();
      l_stat = l_con.createStatement()
 
       
      ResultSet s = l_stat.executeQuery("select modul_id from cvs_modul where modul_id in (select distinct(revision_modul_id)  from cvs_revision where from_unixtime(revision_date) > '" +
          df.format(i_von) + "' and from_unixtime(revision_date) < '" + df.format(i_bis) + "') and modul_group_id = " + i_modul_group_id);
View Full Code Here

    m_body = body;
  }
 
  public static LinkedList<ArtifactMessage> getArtifactMessages(long artifact_id, Date begin, Date end)
  {
    MysqlDataSource l_ds = DBAccess.ReturnDataSource();
      Connection l_con = null;
      Statement l_stat = null;
      LinkedList<ArtifactMessage> l_artifacts = new LinkedList<ArtifactMessage>();
     
      try
      {
        l_con = l_ds.getConnection();
      l_stat = l_con.createStatement()

       
      ResultSet s = l_stat.executeQuery("select id, artifact_id, submitted_by, from_unixtime(adddate) as adddate, body from artifact_message where artifact_id = " + artifact_id
          + " and from_unixtime(adddate) > '"+ df.format(begin) + "' and from_unixtime(adddate) < '" + df.format(end) + "'");
View Full Code Here

TOP

Related Classes of com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.