Code example for Properties

Methods: setProperty

0
	/** 
	 * @param args 
	 */ 
	public static void main(String[] args) {
		TestConfiguration.getInstance(); 
		Properties props = new Properties();
		props.setProperty("dbUrl", "jdbc:oracle:thin:@manzanillo:1671:TIGRE");
		props.setProperty("driverClassName", "oracle.jdbc.OracleDriver");
		props.setProperty("username", "MAPADMIN");
		props.setProperty("password", "MAPGIS");
		 
		DatabaseExporter exporter = new DatabaseExporter(props);
		 
		String tablename = "MAPADMIN.MAP_T_MAPS";
		String sql ="Select mapid, mapcode from " + tablename + " WHERE MAPID = 727";
		String filename = TestConfiguration.getOutputFilenameWithDate(tablename + ".xml");
		exporter.exportTable(filename,tablename, null);
		logger.debug("Table " +  tablename + " written to " +filename);
 
	}