...
The database transfer implementation also requires a list of the entities that it can transfer, which can optionally specify a different column than the default key by setting the 'key' attribute.
Also, it can specify a list of additional values that can should be sent to the other system along with the userid and key value by adding a 'value' tag with the name of the column and the value to set. Finally, if the userid column is not required you can set nouser
to false
in the transfer config and it will not include the user (this can be combined with Get to select everything).
You can also specify when the transfer table should be cleared, by setting the 'cleanwhen' value to 'before', 'after' or 'both' which correspond to clearing the table before sending to the other system, after getting from the other system or both. The default is never.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="UTF-8"?> <config xmlns="urn:com.cohga.server.config#1.0" xmlns:externaldb="urn:com.cohga.selection.transfer.db#1.0" xmlns:client="urn:com.cohga.html.client#1.0"> <externaldb:transfer id="pathway"> <name>Pathway</name> <datasource>datasource.pathway</datasource> <table>PTH_GIST</table> <column>GISREF</column> <put lpad="15"/> <get trim="true"/> <clearwhen>both</clearwhen> <entity id="property"> <key>PRUPIX</key> </entity> </externaldb:transfer> <externaldb:transfer id="pathway.test"> <name>Pathway</name> <datasource>datasource.pathway.test</datasource> <table>PTH_GIST</table> <column>GISREF</column> <put lpad="15"/> <get trim="true"/> <clearwhen>both</clearwhen> <entity id="property"> <key>PRUPIX</key> </entity> </externaldb:transfer> <externaldb:transfer id="hansen"> <acl>acl.hansen</acl> <name>Hansen</name> <datasource>datasource.hansen</datasource> <table>HANSEN</table> <column>COMPKEY</column> <key>COMPKEY</key> <clearwhen>before</clearwhen> <entity id="council_buildings"> <value name="COMPTYPE">BLDG</value> </entity> <entity id="council_carparks"> <value name="COMPTYPE">CARP</value> </entity> </externaldb:transfer> <externaldb:transfer id="all.properties"> <name>All Properties</name> <datasource>datasource.main</datasource> <nouser>true</nouser> <entity id="property"> <table>PROPERTY</table> <column>PID</column> </entity> </externaldb:transfer> <client:config id="test"> ... <item action="com.cohga.selection.Get" system="pathway"> <tooltip title="Pathway" text="Get from Pathway"/> </item> <item action="com.cohga.selection.Get" system="all.properties"> <tooltip title="All Properties" text="Select all Properties"/> </item> ... </client:config> </config> |
...