FileDocCategorySizeDatePackage
ViewDefinition.javaAPI DocGlassfish v2 API3801Tue May 22 16:54:54 BST 2007oracle.toplink.essentials.tools.schemaframework

ViewDefinition

public class ViewDefinition extends DatabaseObjectDefinition

Purpose: Allow for creation of views.

Fields Summary
protected String
selectClause
Constructors Summary
public ViewDefinition()

        super();
        this.selectClause = "";
    
Methods Summary
public java.io.WriterbuildCreationWriter(oracle.toplink.essentials.internal.sessions.AbstractSession session, java.io.Writer writer)
INTERNAL: Return the DDL to create the view.

        try {
            writer.write(session.getPlatform().getCreateViewString());
            writer.write(getFullName());
            writer.write(" AS (");
            writer.write(getSelectClause());
            writer.write(")");
        } catch (IOException ioException) {
            throw ValidationException.fileError(ioException);
        }
        return writer;
    
public java.io.WriterbuildDeletionWriter(oracle.toplink.essentials.internal.sessions.AbstractSession session, java.io.Writer writer)
INTERNAL: Return the DDL to drop the view.

        try {
            writer.write("DROP VIEW " + getFullName());
        } catch (IOException ioException) {
            throw ValidationException.fileError(ioException);
        }
        return writer;
    
public java.lang.StringgetSelectClause()
The select clause is the select statement that is mapped into the view. This is database specific SQL code.

        return selectClause;
    
public voidsetSelectClause(java.lang.String selectClause)
The select clause is the select statement that is mapped into the view. This is database specific SQL code.

        this.selectClause = selectClause;