ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Ws Wiki] Update of "ColumnConverters" by KevinWilliams
Date Fri, 27 Oct 2006 04:28:09 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification.

The following page has been changed by KevinWilliams:

+ The followoing example illustrates the use of the converter framework to obfuscate a String
value before it is stored to the database and deobfuscate it on read.
+ {{{
+         DAS das = DAS.FACTORY.createDAS(getConfig("CustomerConfig.xml"), getConnection());
+         // Create and initialize command to read customers
+         Command read = das.getCommand("getFirstCustomer");
+         // Read
+         DataObject root = read.executeQuery();
+         //Modify
+         root.setString("CUSTOMER[1]/LASTNAME", "Some new name");
+         das.applyChanges(root);
+ }}}
+ This example just shows a simple read of a customer !DataObject followed setting the last
name to some new value.  You will have to take my word for it that the value is not written
as-is but is instead obfuscated.  The actual value written to the database table column is
"Fbzr arj anzr" based on the ROT13 algorithm used in the converter.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message