|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.farrago.ddl.DdlHandler
public abstract class DdlHandler
DdlHandler is an abstract base for classes which provide implementations for
the actions taken by DdlValidator on individual objects. See FarragoSessionDdlHandler for an explanation.
| Field Summary | |
|---|---|
protected FarragoRepos |
repos
|
protected FarragoResource |
res
An instance of FarragoResource for use in throwing validation errors. |
protected static Logger |
tracer
|
protected FarragoSessionDdlValidator |
validator
|
| Constructor Summary | |
|---|---|
DdlHandler(FarragoSessionDdlValidator validator)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Logger tracer
protected final FarragoSessionDdlValidator validator
protected final FarragoRepos repos
protected final FarragoResource res
| Constructor Detail |
|---|
public DdlHandler(FarragoSessionDdlValidator validator)
| Method Detail |
|---|
public FarragoSessionDdlValidator getValidator()
public void validateAttributeSet(CwmClass cwmClass)
public void validateBaseColumnSet(FemBaseColumnSet columnSet)
public void validateAttribute(FemAbstractAttribute attribute)
private void convertSqlToCatalogType(SqlDataTypeSpec dataType,
FemSqltypedElement element)
public void validateTypedElement(FemAbstractTypedElement abstractElement,
CwmNamespace cwmNamespace)
private void validateTypedElement(FemSqltypedElement element,
CwmNamespace cwmNamespace)
private RuntimeException newContextException(CwmModelElement element,
Exception e)
This method is similar to SqlValidator.newValidationError(SqlNode, SqlValidatorException) and
should be unified with it, if only we could figure out how.
element - Element which had the error, and is therefore the locus of
the exceptione - Exception raised
public void convertFieldToCwmColumn(RelDataTypeField field,
CwmColumn column,
CwmNamespace owner)
CwmColumn definition based on a RelDataTypeField.
As well as calling CwmStructuralFeature.setType(CwmClassifier), also
calls CwmColumn.setPrecision(Integer), CwmColumn.setScale(Integer) and CwmColumn.setIsNullable(NullableType).
If the column has no name, the name is initialized from the field name; otherwise, the existing name is left unmodified.
field - input fieldcolumn - on input, contains unintialized CwmColumn instance;owner - The object which is to own any anonymous datatypes created;
typically, the table which this column belongs to
private void convertTypeToCwmColumn(RelDataType type,
CwmColumn column,
CwmNamespace owner)
CwmColumn object with type information.
As well as calling CwmStructuralFeature.setType(CwmClassifier), also
calls CwmColumn.setPrecision(Integer), CwmColumn.setScale(Integer) and CwmColumn.setIsNullable(NullableType).
If the type is structured or a multiset, the implementation is recursive.
type - Type to convertcolumn - Column to populate with type informationowner - The object which is to own any anonymous datatypes created;
typically, the table which this column belongs to
public Throwable adjustExceptionParserPosition(CwmModelElement modelElement,
Throwable ex)
private void validateDefaultClause(FemAbstractAttribute attribute,
FarragoSession session,
String defaultExpression)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||