ca.sqlpower.architect.profile
Class TableProfileResult

java.lang.Object
  extended by ca.sqlpower.architect.profile.AbstractProfileResult<SQLTable>
      extended by ca.sqlpower.architect.profile.TableProfileResult
All Implemented Interfaces:
ProfileResult<SQLTable>, java.lang.Comparable<AbstractProfileResult>

public class TableProfileResult
extends AbstractProfileResult<SQLTable>

Holds profile results that pertain to a particular table. Instances of this class are normally created and populated via a ProfileManager, but it is also possible to obtain one by using a TableProfileCreator directly.


Field Summary
static java.lang.String TOSTRING_FORMAT
          This printf format string is used in our toString() but is also made public for use in UI controls that need an approximation of the format for e.g., sizing a JLabel or other text component
 
Constructor Summary
TableProfileResult(SQLTable profiledObject, ProfileSettings settings)
          Creates a profile result which is not yet populated.
 
Method Summary
 void addColumnProfileResult(ColumnProfileResult profileResult)
          Adds a new column profile result to the end of the result list.
 java.util.Collection<ColumnProfileResult> getColumnProfileResult(SQLColumn c)
          Returns a collection of column profile results associated with this table.
 java.util.List<ColumnProfileResult> getColumnProfileResults()
          Returns an unmodifiable list of columnProfileResults that belong to this table.
 DDLGenerator getDDLGenerator()
          Returns the DDL generator associated with this table profile.
 ca.sqlpower.util.Monitorable getProgressMonitor()
          Returns the progress monitor that can be polled to track the progress of this profile result being populated.
 int getRowCount()
          Returns the number of rows in this table.
 void setRowCount(int rowCount)
           
 java.lang.String toString()
           
 
Methods inherited from class ca.sqlpower.architect.profile.AbstractProfileResult
addProfileResultListener, compareTo, equals, fireProfileCancelled, fireProfileFinished, fireProfileStarted, getCreateEndTime, getCreateStartTime, getException, getProfiledObject, getSettings, getTimeToCreate, hashCode, removeProfileResultListener, setCreateEndTime, setCreateStartTime, setException, setSettings
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TOSTRING_FORMAT

public static final java.lang.String TOSTRING_FORMAT
This printf format string is used in our toString() but is also made public for use in UI controls that need an approximation of the format for e.g., sizing a JLabel or other text component

See Also:
Constant Field Values
Constructor Detail

TableProfileResult

public TableProfileResult(SQLTable profiledObject,
                          ProfileSettings settings)
Creates a profile result which is not yet populated. Normally, profile results are created by the ProfileManager's createProfile() or asynchCreateProfiles() method, so users will not use this constructor directly.

Note that the profile result will be empty until it has been populated by a ProfileCreator (also taken care of by the ProfileManager that creates this result).

Parameters:
profiledObject -
manager -
settings -
Method Detail

getProgressMonitor

public ca.sqlpower.util.Monitorable getProgressMonitor()
Returns the progress monitor that can be polled to track the progress of this profile result being populated. The progress monitor also provides the means of canceling the population of this profile result.


getRowCount

public int getRowCount()
Returns the number of rows in this table. This count is not guaranteed to be realistic until this result has been fully profiled.


setRowCount

public void setRowCount(int rowCount)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getColumnProfileResults

public java.util.List<ColumnProfileResult> getColumnProfileResults()
Returns an unmodifiable list of columnProfileResults that belong to this table.


getColumnProfileResult

public java.util.Collection<ColumnProfileResult> getColumnProfileResult(SQLColumn c)
Returns a collection of column profile results associated with this table. These profile results will probably differ by the date that they were created. If there are no results found for the given table, an empty collection will be returned.


getDDLGenerator

public DDLGenerator getDDLGenerator()
                             throws ArchitectException
Returns the DDL generator associated with this table profile.

Parameters:
col1 -
Returns:
Throws:
ArchitectException

addColumnProfileResult

public void addColumnProfileResult(ColumnProfileResult profileResult)
Adds a new column profile result to the end of the result list.



Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca