Changeset 00f58af8b81e55eb38fd0484835e2702a9d1f8f4

Show
Ignore:
Timestamp:
12/29/06 18:20:21 (2 years ago)
Author:
Christopher Jung <bktheg@web.de>
git-committer:
Christopher Jung <bktheg@web.de> 1167412821 +0100
git-parent:

[ad4bc1dbc44bc1284f0f6dcd5d33914cae0096d5]

git-author:
Christopher Jung <bktheg@web.de> 1167412821 +0100
Message:

(get/set)Boolean eingebaut

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/net/driftingsouls/ds2/server/framework/db/SQLQuery.java

    rb9d9e1d r00f58af  
    144144         
    145145        /** 
     146         * Gibt den Wert einer Spalte als <code>boolean</code> zurueck 
     147         * @param column Der Spaltenname 
     148         * @return Der Wert 
     149         */ 
     150        public boolean getBoolean(String column) { 
     151                try { 
     152                        return result.getBoolean(column); 
     153                } 
     154                catch( SQLException e ) { 
     155                        db.error("Couldn't fetch boolean column "+column+"\n"+e, null); 
     156                        throw new SQLRuntimeException(e); 
     157                } 
     158        } 
     159         
     160        /** 
    146161         * Gibt den Wert einer Spalte als <code>int</code> zurueck 
    147162         * @param column Der Spaltenname 
     
    199214                catch( SQLException e ) { 
    200215                        db.error("Couldn't fetch double column "+column+"\n"+e, null); 
     216                        throw new SQLRuntimeException(e); 
     217                } 
     218        } 
     219         
     220        /** 
     221         * Setzt den Wert einer <code>boolean</code>-Spalte auf einen neuen Wert. 
     222         * Die unterliegende Datenbank wird erst nach Aufruf von {@link #update()} aktuallisiert. 
     223         * @param column Der Spaltenname 
     224         * @param value Der neue Wert 
     225         */ 
     226        public void setBoolean( String column, boolean value ) { 
     227                try { 
     228                        result.updateBoolean(column, value); 
     229                } 
     230                catch( SQLException e ) { 
     231                        db.error("Couldn't update boolean column "+column+"\n"+e, null); 
    201232                        throw new SQLRuntimeException(e); 
    202233                }