Commits

tbrugz committed d480632

small misc changes

  • Participants
  • Parent commits 1195d9b

Comments (0)

Files changed (3)

File sqldump.template.properties

 # define level name based on patterns (default is '[tablename]')
 # patterns: [tablename], [pkcolumn], [fkcolumn]
 sqldump.mondrianschema.levelname.pattern=[tablename]/[fkcolumn]
-# max snowflake level (default is 'no limit', i.e: -1)
+# max snowflake level (default is 'no limit', i.e.: -1)
 sqldump.mondrianschema.snowflake.maxlevel=4
 
 # define level name column

File src/tbrugz/sqldump/util/ConnectionUtil.java

 		String connectionDataSource = papp.getProperty(propsPrefix+SUFFIX_CONNECTION_DATASOURCE);
 		String driverClass = papp.getProperty(propsPrefix+SUFFIX_DRIVERCLASS);
 		String dbUrl = papp.getProperty(propsPrefix+SUFFIX_URL);
+
 		Connection conn = null;
 		if(connectionDataSource!=null) {
 			conn = getConnectionFromDataSource(connectionDataSource);
 		else {
 			conn = creteNewConnection(propsPrefix, papp, driverClass, dbUrl);
 		}
+		if(conn==null) { throw new IllegalStateException("connection is null!"); }
 		
 		if(log.isDebugEnabled()) {
 			try {
 			}
 		}
 		
-		if(conn==null) { return null; }
-		
 		conn.setAutoCommit(autoCommit);
 		
 		String dbInitSql = papp.getProperty(propsPrefix+SUFFIX_INITSQL);

File src_mondrian/tbrugz/sqldump/mondrianschema/MondrianSchemaDumper.java

 		}
 	}
 	
+	@Deprecated
 	void jaxbOutput(Object o, File fileOutput) throws JAXBException {
 		//JAXBContext jc = JAXBContext.newInstance( "tbrugz.mondrian.xsdmodel" );
 		JAXBContext jc = JAXBContext.newInstance( "mondrian.olap" );
 		
 		Marshaller m = jc.createMarshaller();
 		m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);		
+		log.info("dumping mondrian schema model...");
 		m.marshal(o, fileOutput);
 		log.info("mondrian schema model dumped to '"+fileOutput.getAbsolutePath()+"'");
 	}
 	void xomOutput(ElementDef e, File fileOutput) throws FileNotFoundException {
 		PrintWriter pw = new PrintWriter(fileOutput);
 		XMLOutput out = new XMLOutput(pw);
+		//log.info("dumping mondrian schema model to '"+fileOutput.getAbsolutePath()+"'");
+		log.info("dumping mondrian schema model...");
 		e.displayXML(out, 4);
 		pw.close();
 		log.info("mondrian schema model dumped to '"+fileOutput.getAbsolutePath()+"'");
 					}
 					for(Hierarchy h: prevDim.hierarchies) {
 						int idx = h.levels.length-1;
-						log.info("duplicated dim-name found: renaming dim level '"+h.levels[idx].name+"' to '"+dim.foreignKey+"'");
+						log.info("duplicated dim-name found: renaming prev dim level '"+h.levels[idx].name+"' to '"+prevDim.foreignKey+"'");
 						h.levels[idx].name = prevDim.foreignKey; 
 						setupHierarchyName(h);
 					}