java/sql-dk/src/info/globalcode/sql/dk/formatting/AbstractFormatter.java
branchv_0
changeset 39 be8db46a38c3
parent 37 9e6f8e5d5f98
child 41 514df5061f59
equal deleted inserted replaced
38:ff5bbc06ed29 39:be8db46a38c3
   200 		if (currentColumnsCount > declaredCount) {
   200 		if (currentColumnsCount > declaredCount) {
   201 			throw new IllegalStateException("Current columns count is " + currentColumnsCount + " which is more than declared " + declaredCount + " in header.");
   201 			throw new IllegalStateException("Current columns count is " + currentColumnsCount + " which is more than declared " + declaredCount + " in header.");
   202 		}
   202 		}
   203 	}
   203 	}
   204 
   204 
       
   205 	/**
       
   206 	 * @param value from ResultSet
       
   207 	 * @return String representation of given value
       
   208 	 */
       
   209 	protected String toString(Object value) {
       
   210 		/**
       
   211 		 * TODO: basic formatting: boolean, null, date, numbers…
       
   212 		 */
       
   213 		return String.valueOf(value);
       
   214 	}
       
   215 
   205 	@Override
   216 	@Override
   206 	public void writeStartUpdatesResult() {
   217 	public void writeStartUpdatesResult() {
   207 		pushState(State.UPDATES_RESULT, EnumSet.of(State.DATABASE));
   218 		pushState(State.UPDATES_RESULT, EnumSet.of(State.DATABASE));
   208 	}
   219 	}
   209 
   220