java/sql-dk/src/info/globalcode/sql/dk/SQLType.java
branchv_0
changeset 146 4f4f515df807
parent 93 5a4dbe6f962c
child 155 eb3676c6929b
equal deleted inserted replaced
145:5f90decd3b59 146:4f4f515df807
    81 	/**
    81 	/**
    82 	 * @param code see {@linkplain java.sql.Types.Types}
    82 	 * @param code see {@linkplain java.sql.Types.Types}
    83 	 * @return found SQLType
    83 	 * @return found SQLType
    84 	 * @throws IllegalArgumentException if no data type has given code
    84 	 * @throws IllegalArgumentException if no data type has given code
    85 	 */
    85 	 */
    86 	public SQLType valueOf(int code) {
    86 	public static SQLType valueOf(int code) {
    87 		for (SQLType t : values()) {
    87 		for (SQLType t : values()) {
    88 			if (t.code == code) {
    88 			if (t.code == code) {
    89 				return t;
    89 				return t;
    90 			}
    90 			}
    91 		}
    91 		}