From: <sc...@hy...> - 2010-04-13 19:42:58
|
Author: scottmf Date: 2010-04-13 12:42:49 -0700 (Tue, 13 Apr 2010) New Revision: 14500 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14500 Modified: trunk/tools/dbmigrate/src/DatabaseExport.java Log: [HQ-2078] take out hardcoded hqadmin user Modified: trunk/tools/dbmigrate/src/DatabaseExport.java =================================================================== --- trunk/tools/dbmigrate/src/DatabaseExport.java 2010-04-13 18:52:57 UTC (rev 14499) +++ trunk/tools/dbmigrate/src/DatabaseExport.java 2010-04-13 19:42:49 UTC (rev 14500) @@ -40,14 +40,13 @@ private static String _targetUser; private static String _sourcePass; private static String _sourceUser; - private static final String _pgUser = "hqadmin"; private static final String _logCtx = DatabaseExport.class.getName(); public static void main(String[] args) throws Exception { final long start = System.currentTimeMillis(); getArgs(args); Connection connExp = getConnectionExport(); - _tables = Collections.unmodifiableList(getTables(connExp, _pgUser)); + _tables = Collections.unmodifiableList(getTables(connExp, _sourceUser)); exportDataSetPerTable(connExp); Connection connImp = getConnectionImport(); importDataSetPerTable(connImp); @@ -450,7 +449,15 @@ private final String getTable() { return _table; } - public boolean equals(BigTable rhs) { + public boolean equals(Object rhs) { + if (this == rhs) { + return true; + } else if (rhs instanceof BigTable) { + return equals((BigTable)rhs); + } + return false; + } + private boolean equals(BigTable rhs) { return _table.equals(rhs._table); } public int hashCode() { |