001
014
015 package com.liferay.portal.kernel.upgrade.util;
016
017 import java.sql.Connection;
018 import java.sql.PreparedStatement;
019 import java.sql.ResultSet;
020
021
025 public interface UpgradeTable {
026
027 public void appendColumn(StringBuilder sb, Object value, boolean last)
028 throws Exception;
029
030 public void appendColumn(
031 StringBuilder sb, ResultSet rs, String name, Integer type,
032 boolean last)
033 throws Exception;
034
035 public void copyTable(
036 Connection sourceConnection, Connection targetConnection)
037 throws Exception;
038
039 public String getCreateSQL() throws Exception;
040
041 public String getDeleteSQL() throws Exception;
042
043 public String[] getIndexesSQL() throws Exception;
044
045 public String getInsertSQL() throws Exception;
046
047 public String getSelectSQL() throws Exception;
048
049 public String getTempFileName();
050
051 public boolean isAllowUniqueIndexes() throws Exception;
052
053 public boolean isDeleteTempFile();
054
055 public void setAllowUniqueIndexes(boolean allowUniqueIndexes)
056 throws Exception;
057
058 public void setColumn(
059 PreparedStatement ps, int index, Integer type, String value)
060 throws Exception;
061
062 public void setCreateSQL(String createSQL) throws Exception;
063
064 public void setDeleteTempFile(boolean deleteTempFile);
065
066 public void setIndexesSQL(String[] indexesSQL) throws Exception;
067
068 public void updateTable() throws Exception;
069
070 }