DatabaseRecord recordWithValues= new DatabaseRecord(); recordWithValues.add(new DatabaseField("param1"), "someValue"); String sqlStringWithArgs = databaseQuery.getTranslatedSQLString(session, recordWithValues);
/** * Return the qualified name of the field. * PERF: Cache the qualified name. */ public String getQualifiedNameDelimited(DatasourcePlatform platform) { if (hasTableName()) { return this.table.getQualifiedNameDelimited(platform) + "." + getNameDelimited(platform); } else { return getNameDelimited(platform); } } /**
WeakEntry(int hash, K key, V value, WeakEntry<K,V> next, ReferenceQueue refQueue) { this.hash = hash; this.key = new WeakEntryReference<K>(key, refQueue, this); if (key == value){ this.value = (EntryReference<V>)this.key; }else{ this.value = new HardEntryReference<V>(value); } this.next = next; }
public String getQualifiedName(){ if (this.qualifiedName == null) { if (hasTableName()) { this.qualifiedName = this.table.getQualifiedName() + "." + getName(); } else { this.qualifiedName = getName(); } } return this.qualifiedName; }
/** * INTERNAL: */ public void setFullyQualifiedTableName(String fullyQualifiedTableName) { m_databaseTable.setPossiblyQualifiedName(fullyQualifiedTableName, Helper.getDefaultStartDatabaseDelimiter(), Helper.getDefaultEndDatabaseDelimiter()); }
public V setValue(V value) { EntryReference<V> oldValue = this.value; if (value == this.key.get()){ this.value = (EntryReference<V>)this.key; }else{ this.value = new HardEntryReference<V>(value); } return oldValue.get(); }
protected Object clone(ReferenceQueue refQueue) { WeakEntry current = this; WeakEntry root = new WeakEntry(current.hash, current.key.get(), current.value.get(), null, refQueue); WeakEntry currentClone = root; while (current.next != null) { currentClone.next = new WeakEntry(current.next.hash, current.next.key.get(), current.next.value.get(), null, refQueue); current = current.next; currentClone = currentClone.next; } return root; }
/** * Build a valid instance of java.util.Calendar from the given source object. * @param sourceObject Valid instance of java.util.Date, String, java.sql.Timestamp, or Long */ protected Calendar convertObjectToCalendar(Object sourceObject) throws ConversionException { if (sourceObject instanceof Calendar) { return (Calendar)sourceObject; } else if (sourceObject instanceof java.util.Date) { // PERF: Avoid double conversion for date subclasses. return Helper.calendarFromUtilDate((java.util.Date)sourceObject); } return Helper.calendarFromUtilDate(convertObjectToUtilDate(sourceObject)); }
/** * INTERNAL: * Conform an expression which uses the operator "like" for an in-memory query * @return Boolean (TRUE, FALSE, null == unknown) */ public static Boolean conformLike(Object left, Object right) { return getPlatform().conformLike(left, right); }
/** * INTERNAL: * Casts the passed object to SQLXML and calls getString and free methods */ public static String getStringAndFreeSQLXML(Object sqlXml) throws SQLException { return getPlatform().getStringAndFreeSQLXML(sqlXml); } }
/** * INTERNAL: * Get the Map to store the query cache in */ public static Map getConcurrentMap() { return getPlatform().getConcurrentMap(); }
/** * INTERNAL: * Conform an expression which uses the operator "regexp" for an in-memory query * @return Boolean (TRUE, FALSE, null == unknown) */ public static Boolean conformRegexp(Object left, Object right) { return getPlatform().conformRegexp(left, right); }
public String getQualifiedName(){ if (this.qualifiedName == null) { if (hasTableName()) { this.qualifiedName = this.table.getQualifiedName() + "." + getName(); } else { this.qualifiedName = getName(); } } return this.qualifiedName; }
/** * Return the qualified name of the field. * PERF: Cache the qualified name. */ public String getQualifiedNameDelimited(DatasourcePlatform platform) { if (hasTableName()) { return this.table.getQualifiedNameDelimited(platform) + "." + getNameDelimited(platform); } else { return getNameDelimited(platform); } } /**
WeakEntry(int hash, K key, V value, WeakEntry<K,V> next, ReferenceQueue refQueue) { this.hash = hash; this.key = new WeakEntryReference<K>(key, refQueue, this); if (key == value){ this.value = (EntryReference<V>)this.key; }else{ this.value = new HardEntryReference<V>(value); } this.next = next; }
public V setValue(V value) { EntryReference<V> oldValue = this.value; if (value == this.key.get()){ this.value = (EntryReference<V>)this.key; }else{ this.value = new HardEntryReference<V>(value); } return oldValue.get(); }
protected Object clone(ReferenceQueue refQueue) { WeakEntry current = this; WeakEntry root = new WeakEntry(current.hash, current.key.get(), current.value.get(), null, refQueue); WeakEntry currentClone = root; while (current.next != null) { currentClone.next = new WeakEntry(current.next.hash, current.next.key.get(), current.next.value.get(), null, refQueue); current = current.next; currentClone = currentClone.next; } return root; }
/** * Build a valid instance of java.util.Calendar from the given source object. * @param sourceObject Valid instance of java.util.Date, String, java.sql.Timestamp, or Long */ protected Calendar convertObjectToCalendar(Object sourceObject) throws ConversionException { if (sourceObject instanceof Calendar) { return (Calendar)sourceObject; } else if (sourceObject instanceof java.util.Date) { // PERF: Avoid double conversion for date subclasses. return Helper.calendarFromUtilDate((java.util.Date)sourceObject); } return Helper.calendarFromUtilDate(convertObjectToUtilDate(sourceObject)); }
/** * INTERNAL: * Conform an expression which uses the operator "like" for an in-memory query * @return Boolean (TRUE, FALSE, null == unknown) */ public static Boolean conformLike(Object left, Object right) { return getPlatform().conformLike(left, right); }
public String getQualifiedName(){ if (this.qualifiedName == null) { if (hasTableName()) { this.qualifiedName = this.table.getQualifiedName() + "." + getName(); } else { this.qualifiedName = getName(); } } return this.qualifiedName; }