1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.kernel.upgrade.util;
16  
17  import java.sql.PreparedStatement;
18  import java.sql.ResultSet;
19  
20  /**
21   * <a href="UpgradeTable.java.html"><b><i>View Source</i></b></a>
22   *
23   * @author Alexander Chow
24   * @author Brian Wing Shun Chan
25   */
26  public interface UpgradeTable {
27  
28      public void appendColumn(StringBuilder sb, Object value, boolean last)
29          throws Exception;
30  
31      public void appendColumn(
32              StringBuilder sb, ResultSet rs, String name, Integer type,
33              boolean last)
34          throws Exception;
35  
36      public String getCreateSQL() throws Exception;
37  
38      public void setCreateSQL(String createSQL) throws Exception;
39  
40      public String getDeleteSQL() throws Exception;
41  
42      public String getInsertSQL() throws Exception;
43  
44      public String getSelectSQL() throws Exception;
45  
46      public void setColumn(
47              PreparedStatement ps, int index, Integer type, String value)
48          throws Exception;
49  
50      public void updateTable() throws Exception;
51  
52  }