java/sql-dk/src/info/globalcode/sql/dk/formatting/AbstractFormatter.java
branchv_0
changeset 98 4d420f8b3320
parent 97 0dcaa48809f2
child 101 97b0d9069133
equal deleted inserted replaced
97:0dcaa48809f2 98:4d420f8b3320
   209 		if (currentColumnsCount > declaredCount) {
   209 		if (currentColumnsCount > declaredCount) {
   210 			throw new IllegalStateException("Current columns count is " + currentColumnsCount + " which is more than declared " + declaredCount + " in header.");
   210 			throw new IllegalStateException("Current columns count is " + currentColumnsCount + " which is more than declared " + declaredCount + " in header.");
   211 		}
   211 		}
   212 	}
   212 	}
   213 
   213 
   214 	/**
       
   215 	 * @param value from ResultSet
       
   216 	 * @return String representation of given value
       
   217 	 */
       
   218 	protected String toString(Object value) {
       
   219 		/**
       
   220 		 * TODO: basic formatting: boolean, null, date, numbers…
       
   221 		 */
       
   222 		return String.valueOf(value);
       
   223 	}
       
   224 
       
   225 	@Override
   214 	@Override
   226 	public void writeStartUpdatesResult() {
   215 	public void writeStartUpdatesResult() {
   227 		pushState(State.UPDATES_RESULT, EnumSet.of(State.DATABASE));
   216 		pushState(State.UPDATES_RESULT, EnumSet.of(State.DATABASE));
   228 	}
   217 	}
   229 
   218