@Override public Object getCustomModifyValueForCall(Call call, Object value, DatabaseField field, boolean shouldBind) { Class type = field.getType(); if ((type != null) && PGobject.class.isAssignableFrom(type)) { if(value == null) { return null; } if (INET.equals(type)) { value = convertToInet(value); } else if (CIDR.equals(type)) { value = convertToCidr(value); } else if (MACADDR.equals(type)) { value = convertToMac(value); } return new BindCallCustomParameter(value); } return super.getCustomModifyValueForCall(call, value, field, shouldBind); }
/** * This method determines if any special processing needs to occur prior to writing a field. * * It does things such as determining if a field must be bound and flagging the parameter as one * that must be bound. */ public Object getCustomModifyValueForCall(Call call, Object value, DatabaseField field, boolean shouldBind) { if (typeConverters != null){ StructConverter converter = typeConverters.get(field.getType()); if (converter != null) { Object bindValue = value; if (bindValue == null) { bindValue = new ObjectRelationalDatabaseField(field); ((ObjectRelationalDatabaseField)bindValue).setSqlType(java.sql.Types.STRUCT); ((ObjectRelationalDatabaseField)bindValue).setSqlTypeName(converter.getStructName()); } return new BindCallCustomParameter(bindValue); } } return super.getCustomModifyValueForCall(call, value, field, shouldBind); }
/** * This method determines if any special processing needs to occur prior to writing a field. * * It does things such as determining if a field must be bound and flagging the parameter as one * that must be bound. */ public Object getCustomModifyValueForCall(Call call, Object value, DatabaseField field, boolean shouldBind) { if (typeConverters != null){ StructConverter converter = typeConverters.get(field.getType()); if (converter != null) { Object bindValue = value; if (bindValue == null) { bindValue = new ObjectRelationalDatabaseField(field); ((ObjectRelationalDatabaseField)bindValue).setSqlType(java.sql.Types.STRUCT); ((ObjectRelationalDatabaseField)bindValue).setSqlTypeName(converter.getStructName()); } return new BindCallCustomParameter(bindValue); } } return super.getCustomModifyValueForCall(call, value, field, shouldBind); }
/** * This method determines if any special processing needs to occur prior to writing a field. * * It does things such as determining if a field must be bound and flagging the parameter as one * that must be bound. */ @Override public Object getCustomModifyValueForCall(Call call, Object value, DatabaseField field, boolean shouldBind) { if (typeConverters != null){ StructConverter converter = typeConverters.get(field.getType()); if (converter != null) { Object bindValue = value; if (bindValue == null) { bindValue = new ObjectRelationalDatabaseField(field); ((ObjectRelationalDatabaseField)bindValue).setSqlType(java.sql.Types.STRUCT); ((ObjectRelationalDatabaseField)bindValue).setSqlTypeName(converter.getStructName()); } return new BindCallCustomParameter(bindValue); } } return super.getCustomModifyValueForCall(call, value, field, shouldBind); }
nBoundParameters = printValuelist((Collection)dbValue, databaseCall, writer); } else if (typeConverters != null && typeConverters.containsKey(dbValue.getClass())){ dbValue = new BindCallCustomParameter(dbValue);
nBoundParameters = printValuelist((Collection)dbValue, databaseCall, writer); } else if (typeConverters != null && typeConverters.containsKey(dbValue.getClass())){ dbValue = new BindCallCustomParameter(dbValue);
nBoundParameters = printValuelist((Collection)dbValue, databaseCall, writer); } else if (typeConverters != null && typeConverters.containsKey(dbValue.getClass())){ dbValue = new BindCallCustomParameter(dbValue);