X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=support%2Ftest%2Forg%2Fwamblee%2Ftest%2FHibernateUpdater.java;h=576c1819878da434b5ec92b1cc869ba026b51dac;hb=8f2d78e446f48a1ed156b252998ae17cd6f0ba2b;hp=833764c0486e9b10b352268cf85a55dd0535b3d0;hpb=caa126385642ffc57478e928ab871bc09c53e993;p=utils diff --git a/support/test/org/wamblee/test/HibernateUpdater.java b/support/test/org/wamblee/test/HibernateUpdater.java index 833764c0..576c1819 100644 --- a/support/test/org/wamblee/test/HibernateUpdater.java +++ b/support/test/org/wamblee/test/HibernateUpdater.java @@ -12,7 +12,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + */ package org.wamblee.test; @@ -23,18 +23,26 @@ import org.hibernate.cfg.Configuration; import org.hibernate.tool.hbm2ddl.SchemaUpdate; /** - * Exporting the hibernate mapping. + * Exporting the hibernate mapping. */ -public class HibernateUpdater { +public final class HibernateUpdater { - public static void main(String[] args) throws IOException { - String file = args[0]; - File dir = new File(args[0]); - + /** + * Disabled constructor. + * + */ + private HibernateUpdater() { + // Empty + } + + public static void main(String[] aArgs) throws IOException { + String file = aArgs[0]; + File dir = new File(file); + Configuration conf = HibernateUtils.getConfiguration(dir); - - SchemaUpdate lSchemaUpdate = new SchemaUpdate( conf ); - lSchemaUpdate.execute( true, true ); + + SchemaUpdate lSchemaUpdate = new SchemaUpdate(conf); + lSchemaUpdate.execute(true, true); } }