1 19 20 package org.apache.cayenne.dba.postgres; 21 22 import java.sql.PreparedStatement ; 23 import java.sql.Types ; 24 25 import org.apache.cayenne.access.types.ByteArrayType; 26 27 34 class PostgresByteArrayType extends ByteArrayType { 35 36 public PostgresByteArrayType(boolean trimmingBytes, boolean usingBlobs) { 37 super(trimmingBytes, usingBlobs); 38 } 39 40 public void setJdbcObject( 41 PreparedStatement st, 42 Object val, 43 int pos, 44 int type, 45 int precision) throws Exception { 46 47 if (type == Types.LONGVARBINARY) { 49 type = Types.VARBINARY; 50 } 51 52 super.setJdbcObject(st, val, pos, type, precision); 53 } 54 } 55 | Popular Tags |