/** * INTERNAL: Used by SQLCall.translate(..) The binding *must* be performed (NCHAR, NSTRING, * NCLOB). In these special cases the method returns a wrapper object which knows whether it * should be bound or appended and knows how to do that. */ public Object getCustomModifyValueForCall( Call call, Object value, DatabaseField field, boolean shouldBind) { Class type = field.getType(); if ((type != null) && isOracle9Specific(type)) { if (value == null) { return null; } if (NCHAR.equals(type) || NSTRING.equals(type)) { return new NTypeBindCallCustomParameter(value); } else if (NCLOB.equals(type)) { value = convertToDatabaseType(value); if (shouldUseLocatorForLOBWrite()) { if (lobValueExceedsLimit(value)) { ((DatabaseCall) call).addContext(field, value); value = new String(" "); } } return new NTypeBindCallCustomParameter(value); } else if (XMLTYPE.equals(type)) { return getXMLTypeFactory().createXMLTypeBindCallCustomParameter(value); } } return super.getCustomModifyValueForCall(call, value, field, shouldBind); }
/** INTERNAL: Used in write LOB method only to identify a CLOB. */ protected boolean isClob(Class type) { return NCLOB.equals(type) || super.isClob(type); }