public final class KKVillageUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
close(java.io.OutputStream os)
Convenience Method to close an Output Stream without Exception check.
|
static void |
close(com.workingdogs.village.QueryDataSet qds)
Convenience Method to close a Table Data Set without Exception check.
|
static void |
close(com.workingdogs.village.TableDataSet tds)
Convenience Method to close a Table Data Set without Exception check.
|
static byte[] |
hashtableToByteArray(java.util.Hashtable<java.lang.String,java.lang.Object> hash)
Converts a hashtable to a byte array for storage/serialization.
|
static java.util.List<java.lang.Object> |
setPreparedStatementReplacements(java.sql.PreparedStatement statement,
java.util.List<java.lang.Object> replacements,
int offset)
Sets the prepared statement replacements into a query, possibly modifying the type if
required by DB Drivers.
|
static void |
setVillageValue(KKCriteria crit,
org.apache.torque.map.ColumnMap colMap,
com.workingdogs.village.Record rec)
Factored out setting of a Village Record column from a Criteria Key
|
public static final void close(com.workingdogs.village.TableDataSet tds)
tds
- A TableDataSetpublic static final void close(com.workingdogs.village.QueryDataSet qds)
qds
- A TableDataSetpublic static final void close(java.io.OutputStream os)
os
- An OutputStreampublic static final byte[] hashtableToByteArray(java.util.Hashtable<java.lang.String,java.lang.Object> hash) throws java.lang.Exception
hash
- The Hashtable to convert.java.lang.Exception
- If an error occurs.public static final void setVillageValue(KKCriteria crit, org.apache.torque.map.ColumnMap colMap, com.workingdogs.village.Record rec) throws java.lang.Exception
crit
- The CriteriacolMap
- The ColumnMaprec
- The Village Recordjava.lang.Exception
- an unexpected Exception exceptionpublic static java.util.List<java.lang.Object> setPreparedStatementReplacements(java.sql.PreparedStatement statement, java.util.List<java.lang.Object> replacements, int offset) throws java.sql.SQLException
statement
- the statement to set the parameters in, not null.replacements
- the replacements to set, not null.offset
- the offset on the parameters, 0 for no offset.java.sql.SQLException
- if setting the parameter fails.Copyright © 2018 DS Data Systems UK Ltd.