ca.sqlpower.architect.profile
Class AbstractTableProfileCreator

java.lang.Object
  extended by ca.sqlpower.architect.profile.AbstractTableProfileCreator
All Implemented Interfaces:
TableProfileCreator
Direct Known Subclasses:
LocalReservoirProfileCreator, RemoteDatabaseProfileCreator

public abstract class AbstractTableProfileCreator
extends java.lang.Object
implements TableProfileCreator

Provides a template method for doProfile which alleviates the need to write boilerplate code for every profile creator implementation.


Constructor Summary
AbstractTableProfileCreator()
           
 
Method Summary
 boolean doProfile(TableProfileResult tpr)
          A generic template for populating a profile result.
protected abstract  boolean doProfileImpl(TableProfileResult tpr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTableProfileCreator

public AbstractTableProfileCreator()
Method Detail

doProfile

public final boolean doProfile(TableProfileResult tpr)
A generic template for populating a profile result. Calls #doProfileImpl() to perform the actual work of populating this profile result.

This method will fire a profileStarted event before calling the subclass's doProfile, then fire a profileFinished event after doProfile exits (with or without success) unless this profile population has been cancelled, in which case it fires a profileCancelled event.

Specified by:
doProfile in interface TableProfileCreator
Parameters:
tpr - The unpopulated profile result to populate.
Returns:
true if the profiling of the table and its columns has completed normally; false if the profiling operation was canceled before it had a chance to complete.

doProfileImpl

protected abstract boolean doProfileImpl(TableProfileResult tpr)
                                  throws java.lang.Exception
Throws:
java.lang.Exception


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