KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > h2 > command > ddl > AlterView


1 /*
2  * Copyright 2004-2006 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
3  * Initial Developer: H2 Group
4  */

5 package org.h2.command.ddl;
6
7 import java.sql.SQLException JavaDoc;
8
9 import org.h2.engine.Right;
10 import org.h2.engine.Session;
11 import org.h2.table.TableView;
12
13 public class AlterView extends DefineCommand {
14
15     private TableView view;
16
17     public AlterView(Session session) {
18         super(session);
19     }
20
21     public void setView(TableView view) {
22         this.view= view;
23     }
24     
25     public int update() throws SQLException JavaDoc {
26         session.commit();
27         session.getUser().checkRight(view, Right.ALL);
28         view.recompile(session);
29         return 0;
30     }
31
32 }
33
Popular Tags