edu.upenn.crimson.io
Class Trees

java.lang.Object
  extended by edu.upenn.crimson.io.Trees

public class Trees
extends java.lang.Object

Functions related to the TREES table.

Version:
$Id: Trees.java,v 1.28 2009/07/16 16:19:52 fisher Exp $

Constructor Summary
Trees()
           
 
Method Summary
static boolean dbContains(java.lang.String id)
          This will return true if a tree exists in TREES with an id equal to 'id'.
static boolean delete(java.lang.String id, boolean delQueries)
          Removes a tree from the database.
static void loadAll()
          This will load all trees from the TREES table.
 java.lang.String toString()
          Returns the non-Blob columns in the TREES table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Trees

public Trees()
Method Detail

loadAll

public static void loadAll()
This will load all trees from the TREES table.


delete

public static boolean delete(java.lang.String id,
                             boolean delQueries)
Removes a tree from the database. When trees are deleted, the database will automatically remove the related entries in the PARTITIONS and PART_DATA table. If delQueries is true then remove any queries that reference this tree. If delQueries is false, then quit on error if any queries reference this tree.

Notes:
We aren't relying on the database sutomatic cascade deleting of records because the version of MySQL prior to 5.1 do not support this fuction for MyISAM tables, which are the tables we are using.

dbContains

public static boolean dbContains(java.lang.String id)
This will return true if a tree exists in TREES with an id equal to 'id'.


toString

public java.lang.String toString()
Returns the non-Blob columns in the TREES table. Each table record will be separated by a '\n' in the output.

Overrides:
toString in class java.lang.Object



Copyright 2006 Stephen Fisher, Susan Davidson, and Junhyong Kim, University of Pennsylvania.