ca.sqlpower.architect.ddl
Class AbstractDDLWarning

java.lang.Object
  extended by ca.sqlpower.architect.ddl.AbstractDDLWarning
All Implemented Interfaces:
DDLWarning
Direct Known Subclasses:
InvalidNameDDLWarning, InvalidSeqNameDDLWarning, RelationshipColumnsTypesMismatchDDLWarning, SetDefaultOnColumnWithNoDefaultWarning, SetNullOnNonNullableColumnWarning, TypeMapDDLWarning, UnsupportedFeatureDDLWarning

public abstract class AbstractDDLWarning
extends java.lang.Object
implements DDLWarning


Field Summary
protected  boolean fixed
           
protected  java.util.List<? extends SQLObject> involvedObjects
           
protected  boolean isQuickFixable
           
protected  java.lang.String message
           
protected  java.lang.String quickFixMesssage
           
protected  java.lang.String quickFixPropertyName
          The name of the Beans property of the object(s) involved in this warning that can be modified to fix the problem.
protected  SQLObject whichObjectQuickFixFixes
           
 
Constructor Summary
AbstractDDLWarning(java.util.List<? extends SQLObject> involvedObjects, java.lang.String message, boolean isQuickFixable, java.lang.String quickFixMesssage, SQLObject whichObjectQuickFixFixes, java.lang.String quickFixPropertyName)
           
 
Method Summary
 java.util.List<? extends SQLObject> getInvolvedObjects()
          The subject(s) of this warning.
 java.lang.String getMessage()
          Get the message associated with this warning, e.g., a string like "Primary Key Name is already in use"
 java.lang.String getQuickFixMessage()
          If isQuickFixable(), then this gives the message about what will be done.
 java.lang.String getQuickFixPropertyName()
          Returns the value of quickFixPropertyName.
 boolean isFixed()
          Return true if the user has repaired or quickfixed the problem
 boolean isQuickFixable()
          Tell whether the user can "quick fix" this problem
 boolean quickFix()
          Dummy version for subclasses that are not quickfixable
 void setFixed(boolean fixed)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

involvedObjects

protected java.util.List<? extends SQLObject> involvedObjects

message

protected java.lang.String message

fixed

protected boolean fixed

isQuickFixable

protected boolean isQuickFixable

quickFixMesssage

protected java.lang.String quickFixMesssage

whichObjectQuickFixFixes

protected SQLObject whichObjectQuickFixFixes

quickFixPropertyName

protected java.lang.String quickFixPropertyName
The name of the Beans property of the object(s) involved in this warning that can be modified to fix the problem. For example, if the warning is about a duplicate or illegal name, this would be "name". If the warning is about an illegal type, it would be "type". If the warning does not pertain to a problem that can be fixed by fiddling with a particular property value, this will be null.

Constructor Detail

AbstractDDLWarning

public AbstractDDLWarning(java.util.List<? extends SQLObject> involvedObjects,
                          java.lang.String message,
                          boolean isQuickFixable,
                          java.lang.String quickFixMesssage,
                          SQLObject whichObjectQuickFixFixes,
                          java.lang.String quickFixPropertyName)
Method Detail

getInvolvedObjects

public java.util.List<? extends SQLObject> getInvolvedObjects()
Description copied from interface: DDLWarning
The subject(s) of this warning. For instance, if there is a duplicate table names, the SQLTable objects with the duplicate names will be the "involved objects".

Specified by:
getInvolvedObjects in interface DDLWarning

getMessage

public java.lang.String getMessage()
Description copied from interface: DDLWarning
Get the message associated with this warning, e.g., a string like "Primary Key Name is already in use"

Specified by:
getMessage in interface DDLWarning

getQuickFixMessage

public java.lang.String getQuickFixMessage()
Description copied from interface: DDLWarning
If isQuickFixable(), then this gives the message about what will be done.

Specified by:
getQuickFixMessage in interface DDLWarning

isFixed

public boolean isFixed()
Description copied from interface: DDLWarning
Return true if the user has repaired or quickfixed the problem

Specified by:
isFixed in interface DDLWarning

setFixed

public void setFixed(boolean fixed)
Specified by:
setFixed in interface DDLWarning

isQuickFixable

public boolean isQuickFixable()
Description copied from interface: DDLWarning
Tell whether the user can "quick fix" this problem

Specified by:
isQuickFixable in interface DDLWarning

quickFix

public boolean quickFix()
Dummy version for subclasses that are not quickfixable

Specified by:
quickFix in interface DDLWarning

getQuickFixPropertyName

public java.lang.String getQuickFixPropertyName()
Returns the value of quickFixPropertyName. Subclasses that support QuickFix should initialize that value to the appropriate property name.

Specified by:
getQuickFixPropertyName in interface DDLWarning


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