version 1.39, 2004/02/25 10:42:21
|
version 1.41, 2004/03/01 12:37:10
|
Line 190 class Convert
|
Line 190 class Convert
|
{ |
{ |
obj = row.get(k); |
obj = row.get(k); |
if (obj instanceof ArrayList) |
if (obj instanceof ArrayList) |
obj = ((List) obj).get(0); |
obj = formatFileMakerArray((List) obj,"\n"); |
String str = (obj == null) ? "NULL" : obj.toString(); |
String str = (obj == null) ? "NULL" : obj.toString(); |
if (!str.equals("NULL")) |
if (!str.equals("NULL")) |
pstm.setString(k + 1, str); |
pstm.setString(k + 1, str); |
Line 221 class Convert
|
Line 221 class Convert
|
|
|
// dialog.setVisible(false); |
// dialog.setVisible(false); |
} |
} |
|
public static String formatFileMakerArray(List list, String delimiter) |
|
{ |
|
StringBuffer formattedString = new StringBuffer(); |
|
for(int i=0;i<list.size();++i) |
|
{ |
|
formattedString.append(list.get(i).toString()); |
|
if(i<list.size()-1) |
|
formattedString.append(delimiter); |
|
} |
|
return formattedString.toString(); |
|
} |
/** |
/** |
* Method for SQL UPDATE |
* Method for SQL UPDATE |
* @param source |
* @param source |
Line 784 class Convert
|
Line 794 class Convert
|
{ |
{ |
obj = row.get(k); |
obj = row.get(k); |
if (obj instanceof ArrayList) |
if (obj instanceof ArrayList) |
obj = ((List) obj).get(0); |
if (obj instanceof ArrayList) |
|
obj = formatFileMakerArray((List) obj," | "); |
|
|
String str = (obj == null) ? "NULL" : obj.toString(); |
String str = (obj == null) ? "NULL" : obj.toString(); |
if (!str.equals("NULL")) |
if (!str.equals("NULL")) |
pstm.setString(k + 1, str); |
pstm.setString(k + 1, str); |
Line 1445 class Convert
|
Line 1457 class Convert
|
final static int CONVERT_MODE = 1; |
final static int CONVERT_MODE = 1; |
final static int APPEND_MODE = 2; |
final static int APPEND_MODE = 2; |
final static int UPDATE_MODE = 3; |
final static int UPDATE_MODE = 3; |
|
final static int DELETE_MODE = 4; |
|
|
int mode = -1; |
int mode = -1; |
|
|
public DataBase(DBBean bean, Vector tables, Vector layouts, Vector selects, Vector creates, Vector ids, int mode) |
public DataBase(DBBean bean, Vector tables, Vector layouts, Vector selects, Vector creates, Vector ids, int mode) |