Some small reformatting, removed debug logging.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1299 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: JDBCTableSiteIdentifier.java,v 1.6 2003/11/13 02:28:52 ray Exp $
|
// $Id: JDBCTableSiteIdentifier.java,v 1.7 2003/11/13 16:58:39 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -142,8 +142,8 @@ public class JDBCTableSiteIdentifier implements SiteIdentifier
|
|||||||
/**
|
/**
|
||||||
* Used to load information from the site database.
|
* Used to load information from the site database.
|
||||||
*/
|
*/
|
||||||
protected class SiteIdentifierRepository
|
protected class SiteIdentifierRepository extends SimpleRepository
|
||||||
extends SimpleRepository implements SimpleRepository.Operation
|
implements SimpleRepository.Operation
|
||||||
{
|
{
|
||||||
public SiteIdentifierRepository (ConnectionProvider conprov)
|
public SiteIdentifierRepository (ConnectionProvider conprov)
|
||||||
{
|
{
|
||||||
@@ -214,11 +214,11 @@ public class JDBCTableSiteIdentifier implements SiteIdentifier
|
|||||||
"insert into sites (stringId) VALUES (?)");
|
"insert into sites (stringId) VALUES (?)");
|
||||||
stmt.setString(1, site.siteString);
|
stmt.setString(1, site.siteString);
|
||||||
if (1 != stmt.executeUpdate()) {
|
if (1 != stmt.executeUpdate()) {
|
||||||
throw new PersistenceException("Not inserted");
|
throw new PersistenceException(
|
||||||
|
"Not inserted " + site);
|
||||||
}
|
}
|
||||||
|
|
||||||
site.siteId = liaison.lastInsertedId(conn);
|
site.siteId = liaison.lastInsertedId(conn);
|
||||||
System.err.println("site id inserted was " + site.siteId);
|
|
||||||
} finally {
|
} finally {
|
||||||
JDBCUtil.close(stmt);
|
JDBCUtil.close(stmt);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user