protected Vector buildToNClobVec() { Vector vec = new Vector(); vec.addElement(String.class); vec.addElement(Character[].class); vec.addElement(char[].class); return vec; }
protected Vector buildFromStringCharVec(Class javaClass) { Vector vec = getConversionManager().getDataTypesConvertedFrom(javaClass); vec.addElement(NCHAR); vec.addElement(NSTRING); if (javaClass == String.class) { vec.addElement(NCLOB); } return vec; }
/** * INTERNAL: The results are *not* in a cursor, build the collection. Cache the results in * temporaryCachedQueryResults. */ protected Object executeNonCursor() throws DatabaseException { Vector rows = getQueryMechanism().executeSelect(); ContainerPolicy containerPolicy = getContainerPolicy(); Object results = null; if (useAbstractRecord) { results = containerPolicy.buildContainerFromVector(rows, getSession()); } else { results = containerPolicy.containerInstance(rows.size()); for (Iterator rowsEnum = rows.iterator(); rowsEnum.hasNext(); ) { containerPolicy.addInto( ((AbstractRecord) rowsEnum.next()).getValues(), results, getSession()); } } // Bug 6135563 - cache DataReadQuery results verbatim, as ObjectBuilder is not invoked cacheResult(results); return results; }
/** * INTERNAL: Return the list of Classes that can be converted to from the passed in javaClass. * oracle.sql.TIMESTAMP and NCHAR types are added in some lists. * * @param javaClass - the class that is converted from * @return - a vector of classes */ public Vector getDataTypesConvertedFrom(Class javaClass) { if (dataTypesConvertedFromAClass == null) { dataTypesConvertedFromAClass = new Hashtable(5); } Vector dataTypes = (Vector) dataTypesConvertedFromAClass.get(javaClass); if (dataTypes != null) { return dataTypes; } dataTypes = super.getDataTypesConvertedFrom(javaClass); if ((javaClass == String.class) || (javaClass == Character.class)) { dataTypes.addElement(NCHAR); dataTypes.addElement(NSTRING); if (javaClass == String.class) { dataTypes.addElement(NCLOB); } } if ((javaClass == char[].class) || (javaClass == Character[].class)) { dataTypes.addElement(NCLOB); } dataTypesConvertedFromAClass.put(javaClass, dataTypes); return dataTypes; }
protected Vector buildToTIMESTAMPVec() { Vector vec = new Vector(); vec.addElement(java.util.Date.class); vec.addElement(Timestamp.class); vec.addElement(Calendar.class); vec.addElement(String.class); vec.addElement(Long.class); vec.addElement(Date.class); vec.addElement(Time.class); return vec; }
/** Set the primary key element names. The order may be significant. */ public void setPrimaryKeyElementNames(Vector primaryKeyElementNames) { this.clearPrimaryKeyElements(); for (Enumeration stream = primaryKeyElementNames.elements(); stream.hasMoreElements(); ) { this.addPrimaryKeyElementName((String) stream.nextElement()); } }
protected Vector buildToNStringCharVec() { Vector vec = new Vector(); vec.addElement(String.class); vec.addElement(Character.class); return vec; }