[cvs] Expresso commit by lhamel: fix deprecated
JCorporate Ltd
jcorp at jcorp2.servlets.net
Tue Oct 12 11:45:16 PDT 2004
Log Message:
-----------
fix deprecated
Modified Files:
--------------
expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/controller:
DataTransfer.java
Revision Data
-------------
Index: DataTransfer.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/controller/DataTransfer.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/ext/controller/DataTransfer.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/ext/controller/DataTransfer.java -u -r1.12 -r1.13
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/controller/DataTransfer.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/controller/DataTransfer.java
@@ -94,7 +94,6 @@
* DataTransfer is a controller used to move data from one
* db/context to another, with various options
*
- * @version $Revision$ $Date$
* @author Michael Nash
*/
public class DataTransfer
@@ -122,9 +121,9 @@
} /* DataTransfer() */
- private void runSelSchemaState(ControllerRequest req,
+ protected void runSelSchemaState(ControllerRequest req,
ControllerResponse res)
- throws ControllerException, NonHandleableException {
+ throws ControllerException {
try {
Input chooseSchema = new Input();
chooseSchema.setLabel("Choose Schema");
@@ -156,7 +155,7 @@
} /* runSelSchemaState */
- private void runPromptState(ControllerRequest req, ControllerResponse res)
+ protected void runPromptState(ControllerRequest req, ControllerResponse res)
throws ControllerException, NonHandleableException {
Input chooseDBobj = new Input();
chooseDBobj.setLabel("Choose Database Object");
@@ -243,9 +242,9 @@
} /* runPromptState */
- private void runTransferState(ControllerRequest req,
+ protected void runTransferState(ControllerRequest req,
ControllerResponse res)
- throws ControllerException, NonHandleableException {
+ throws ControllerException {
String dbobj = req.getParameter("dbobj");
Vector transferList = new Vector();
@@ -272,7 +271,7 @@
for (Enumeration e = transferList.elements(); e.hasMoreElements();) {
oneObj = (String) e.nextElement();
- transferObject(req, res, req.getParameter("fromContext"),
+ transferObject(res, req.getParameter("fromContext"),
req.getParameter("toContext"), oneObj,
req.getParameter("handleDups"),
req.getParameter("clearDestination"),
@@ -284,7 +283,7 @@
} /* runTranferState */
- private void transferObject(ControllerRequest req, ControllerResponse res,
+ private void transferObject(ControllerResponse res,
String fromContext, String toContext,
String objectClass, String handleDups,
String clearDestination, String customWhere)
@@ -293,11 +292,11 @@
return;
}
if (clearDestination.equalsIgnoreCase("Y")) {
- DBObject clearObj = createDBObj(req, objectClass, toContext);
+ DBObject clearObj = createDBObj(objectClass, toContext);
clearObj.deleteAll();
}
- DBObject fromList = createDBObj(req, objectClass, fromContext);
+ DBObject fromList = createDBObj(objectClass, fromContext);
if (!customWhere.equals("")) {
fromList.setCustomWhereClause(customWhere);
@@ -306,7 +305,7 @@
int exceptionCount = 0;
int addedCount = 0;
int updatedCount = 0;
- DBObject fromObj = createDBObj(req, objectClass, fromContext);
+ DBObject fromObj = createDBObj(objectClass, fromContext);
for (Iterator i = fromList.searchAndRetrieveList().iterator();
i.hasNext();) {
@@ -314,27 +313,27 @@
fromObj = (DBObject) i.next();
if (handleDups.equals("S")) {
- DBObject searchObj = createDBObj(req, objectClass,
+ DBObject searchObj = createDBObj(objectClass,
toContext);
/* set tke keys */
copyKeys(fromObj, searchObj);
if (!searchObj.find()) {
- DBObject newObj = createDBObj(req, objectClass,
+ DBObject newObj = createDBObj(objectClass,
toContext);
copyAll(fromObj, newObj);
newObj.add();
addedCount++;
}
} else if (handleDups.equals("R")) {
- DBObject searchObj = createDBObj(req, objectClass,
+ DBObject searchObj = createDBObj(objectClass,
toContext);
/* set tke keys */
copyKeys(fromObj, searchObj);
- DBObject newObj = createDBObj(req, objectClass, toContext);
+ DBObject newObj = createDBObj(objectClass, toContext);
copyAll(fromObj, newObj);
if (searchObj.find()) {
@@ -345,12 +344,12 @@
addedCount++;
}
} else if (handleDups.equals("A")) {
- DBObject newObj = createDBObj(req, objectClass, toContext);
+ DBObject newObj = createDBObj(objectClass, toContext);
copyAll(fromObj, newObj);
newObj.add();
addedCount++;
} else if (handleDups.equals("I")) {
- DBObject newObj = createDBObj(req, objectClass, toContext);
+ DBObject newObj = createDBObj(objectClass, toContext);
copyAll(fromObj, newObj);
newObj.basicAdd();
addedCount++;
@@ -388,13 +387,13 @@
for (Iterator i = fromObj.getMetaData().getFieldListArray().iterator(); i.hasNext();) {
oneField = (String) i.next();
- if (!fromObj.isVirtual(oneField)) {
+ if (!fromObj.getMetaData().getFieldMetadata(oneField).isVirtual()) {
toObj.setField(oneField, fromObj.getField(oneField));
}
}
}
- private DBObject createDBObj(ControllerRequest req, String className,
+ private DBObject createDBObj(String className,
String dbContext)
throws DBException {
DBObject myDBObj = null;
@@ -425,4 +424,3 @@
}
} /* DataTransfer */
-/* DataTransfer */
\ No newline at end of file
More information about the cvs
mailing list