Liferay 6.0.5

com.liferay.portal.upgrade.util
Class Table

java.lang.Object
  extended by com.liferay.portal.upgrade.util.Table
Direct Known Subclasses:
BaseUpgradeTableImpl, PermissionView, ResourcePermissionView

public class Table
extends Object


Field Summary
static int BATCH_SIZE
           
static String[][] SAFE_CHARS
           
static String SAFE_COMMA_CHARACTER
           
static String SAFE_NEWLINE_CHARACTER
           
static String SAFE_RETURN_CHARACTER
           
 
Constructor Summary
Table(String tableName)
           
Table(String tableName, Object[][] columns)
           
 
Method Summary
 void appendColumn(StringBuilder sb, Object value, boolean last)
           
 void appendColumn(StringBuilder sb, ResultSet rs, String name, Integer type, boolean last)
           
 String generateTempFile()
           
 String generateTempFile(Connection con)
           
 Object[][] getColumns()
           
 String getCreateSQL()
           
 String getDeleteSQL()
           
 String getExportedData(ResultSet rs)
           
 String getInsertSQL()
           
 int[] getOrder()
           
 String getSelectSQL()
           
 String getTableName()
           
 long getTotalRows()
           
 Object getValue(ResultSet rs, String name, Integer type)
           
 void populateTable(String tempFileName)
           
 void populateTable(String tempFileName, Connection con)
           
 void populateTableRows(PreparedStatement ps, boolean batch)
           
 void setColumn(PreparedStatement ps, int index, Integer type, String value)
           
 void setColumns(Object[][] columns)
           
 void setCreateSQL(String createSQL)
           
 void setSelectSQL(String selectSQL)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BATCH_SIZE

public static final int BATCH_SIZE

SAFE_COMMA_CHARACTER

public static final String SAFE_COMMA_CHARACTER
See Also:
Constant Field Values

SAFE_NEWLINE_CHARACTER

public static final String SAFE_NEWLINE_CHARACTER
See Also:
Constant Field Values

SAFE_RETURN_CHARACTER

public static final String SAFE_RETURN_CHARACTER
See Also:
Constant Field Values

SAFE_CHARS

public static final String[][] SAFE_CHARS
Constructor Detail

Table

public Table(String tableName)

Table

public Table(String tableName,
             Object[][] columns)
Method Detail

appendColumn

public void appendColumn(StringBuilder sb,
                         Object value,
                         boolean last)
                  throws Exception
Throws:
Exception

appendColumn

public void appendColumn(StringBuilder sb,
                         ResultSet rs,
                         String name,
                         Integer type,
                         boolean last)
                  throws Exception
Throws:
Exception

getColumns

public Object[][] getColumns()

getCreateSQL

public String getCreateSQL()
                    throws Exception
Throws:
Exception

getDeleteSQL

public String getDeleteSQL()
                    throws Exception
Throws:
Exception

getExportedData

public String getExportedData(ResultSet rs)
                       throws Exception
Throws:
Exception

getInsertSQL

public String getInsertSQL()
                    throws Exception
Throws:
Exception

getOrder

public int[] getOrder()

getSelectSQL

public String getSelectSQL()
                    throws Exception
Throws:
Exception

getTableName

public String getTableName()

getTotalRows

public long getTotalRows()

getValue

public Object getValue(ResultSet rs,
                       String name,
                       Integer type)
                throws Exception
Throws:
Exception

generateTempFile

public String generateTempFile()
                        throws Exception
Throws:
Exception

generateTempFile

public String generateTempFile(Connection con)
                        throws Exception
Throws:
Exception

populateTable

public void populateTable(String tempFileName)
                   throws Exception
Throws:
Exception

populateTable

public void populateTable(String tempFileName,
                          Connection con)
                   throws Exception
Throws:
Exception

populateTableRows

public void populateTableRows(PreparedStatement ps,
                              boolean batch)
                       throws Exception
Throws:
Exception

setColumn

public void setColumn(PreparedStatement ps,
                      int index,
                      Integer type,
                      String value)
               throws Exception
Throws:
Exception

setColumns

public void setColumns(Object[][] columns)

setCreateSQL

public void setCreateSQL(String createSQL)
                  throws Exception
Throws:
Exception

setSelectSQL

public void setSelectSQL(String selectSQL)
                  throws Exception
Throws:
Exception

Liferay 6.0.5