HiRISE

HiRISE.HiReport.sql
Class Table

java.lang.Object
  extended by HiRISE.HiReport.sql.Table
All Implemented Interfaces:
Comparable<Table>
Direct Known Subclasses:
Anaglyph_File_Types, Anaglyph_Products, CTX, Cycle_map, DTM_Extras_File_Types, DTM_Extras_Products, DTM_Products, EDR_Products, Extras_File_Types, Extras_Products, Frost_Statistics, HiPrecision_Products, Jitter_Statistics, Mars_Year, Observation_Geometry, Orbits, People, People_Science_Themes_map, Planned_CCD_Parameters, Planned_Observations, Product_Status, Proffered_Anaglyph_Products, Proffered_DTM_Products, Proffered_EDR_Products, Proffered_Extras_Products, Proffered_HiPrecision_Products, Proffered_RDR_Products, RDR_Products, RDR_Products_EDR_Products_map, Related_Suggestions_map, Scider_Products, Science_Themes, Suggested_Observations, Suggested_Observations_People_map, Suggested_Observations_Planned_Observations_map, Suggested_Observations_Science_Themes_map, Suggestion_Relations, Tags, Web_Publications

public abstract class Table
extends Object
implements Comparable<Table>

Represents a database table. Subclasses should contain a column member for each field that could be returned in a query.


Field Summary
static String ID
          CVS ID
 
Constructor Summary
Table(String name)
          Create an instance representing a table by name.
Table(String name, String alias)
          Create an instance representing a table by name.
 
Method Summary
 int compareTo(Table table)
          Compare this table to another for equality.
 boolean equals(Object o)
          Compare this table to another object.
 String getAlias()
          Get the alias for use with this table (by default same as the table name)
 String getCatalog()
          Get the catalog (database) value for use with this table (empty by default)
 int hashCode()
          Return the hashCode for the table.
 void setCatalog(String catalog)
          Set a catalog (database) value for use with this table
 String toString()
          Return the name of this table.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final String ID
CVS ID

See Also:
Constant Field Values
Constructor Detail

Table

public Table(String name)
Create an instance representing a table by name.

Parameters:
name - This could be case-sensitive, depending on the database.

Table

public Table(String name,
             String alias)
Create an instance representing a table by name.

Parameters:
name - This could be case-sensitive, depending on the database.
alias - Typically shortened name for a table
Method Detail

equals

public boolean equals(Object o)
Compare this table to another object. If the object is a table of the same name (case insensitive), they will be equal.

Overrides:
equals in class Object
Parameters:
o - Any object

hashCode

public int hashCode()
Return the hashCode for the table.

Overrides:
hashCode in class Object
Returns:
hash code

compareTo

public int compareTo(Table table)
Compare this table to another for equality. If they have the same name (case insensitive) they are equal.

Specified by:
compareTo in interface Comparable<Table>
Parameters:
table - Another table
Returns:
String comparison of names

toString

public final String toString()
Return the name of this table.

Overrides:
toString in class Object
Returns:
name

getAlias

public String getAlias()
Get the alias for use with this table (by default same as the table name)

Returns:
alias for table

getCatalog

public String getCatalog()
Get the catalog (database) value for use with this table (empty by default)

Returns:
catalog name

setCatalog

public void setCatalog(String catalog)
Set a catalog (database) value for use with this table

Parameters:
catalog - name

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona