net.sf.dewdrop.sqlml
Class Constraint

java.lang.Object
  extended bynet.sf.dewdrop.sqlml.SqlmlComponent
      extended bynet.sf.dewdrop.sqlml.SchemaComponent
          extended bynet.sf.dewdrop.sqlml.Constraint
Direct Known Subclasses:
Check, ForeignKey, Index, NotNull, PrimaryKey, Unique

public abstract class Constraint
extends SchemaComponent

Abstract class for any database component that contains a list of Ref elements.

Author:
Les Hazlewood

Field Summary
protected  Set columnRefs
           
protected  ConstraintDirective directive
           
protected  boolean inline
           
 
Fields inherited from class net.sf.dewdrop.sqlml.SchemaComponent
description, name
 
Fields inherited from class net.sf.dewdrop.sqlml.SqlmlComponent
indentLevel, logger
 
Constructor Summary
protected Constraint()
           
 
Method Summary
 void addColumnRef(Ref ref)
           
 boolean equals(Object o)
           
 Set getColumnRefs()
           
 ConstraintDirective getDirective()
           
 boolean isComplex()
          Returns true if and only if this constraint is concerned with multiple columns, false otherwise
protected  boolean isInline()
           
 void setDirective(ConstraintDirective directive)
           
protected  void setInline(boolean inline)
           
 
Methods inherited from class net.sf.dewdrop.sqlml.SchemaComponent
getDescription, getName, setDescription, setName
 
Methods inherited from class net.sf.dewdrop.sqlml.SqlmlComponent
getIndentLevel, i18n, i18n, i18n, onWriteSql, setIndentLevel, toSql, toSql, toSql, toString, writeSql, writeSql, writeSql
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

columnRefs

protected Set columnRefs

directive

protected ConstraintDirective directive

inline

protected boolean inline
Constructor Detail

Constraint

protected Constraint()
Method Detail

getColumnRefs

public Set getColumnRefs()

addColumnRef

public void addColumnRef(Ref ref)

getDirective

public ConstraintDirective getDirective()

setDirective

public void setDirective(ConstraintDirective directive)

isComplex

public boolean isComplex()
Returns true if and only if this constraint is concerned with multiple columns, false otherwise

Returns:
true if and only if this constraint is concerned with multiple columns, false otherwise

equals

public boolean equals(Object o)
Overrides:
equals in class SchemaComponent

isInline

protected boolean isInline()

setInline

protected void setInline(boolean inline)