org.apache.torque.util
Class VillageUtils

java.lang.Object
  extended by org.apache.torque.util.VillageUtils

public final class VillageUtils
extends java.lang.Object

Some Village related code factored out of the BasePeer.

Version:
$Id: VillageUtils.java 476550 2006-11-18 16:08:37Z tfischer $
Author:
Henning P. Schmiedehausen

Method Summary
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 hash)
          Converts a hashtable to a byte array for storage/serialization.
static void setVillageValue(Criteria crit, java.lang.String key, com.workingdogs.village.Record rec, java.lang.String colName)
          Factored out setting of a Village Record column from a Criteria Key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

close

public static final void close(com.workingdogs.village.TableDataSet tds)
Convenience Method to close a Table Data Set without Exception check.

Parameters:
tds - A TableDataSet

close

public static final void close(com.workingdogs.village.QueryDataSet qds)
Convenience Method to close a Table Data Set without Exception check.

Parameters:
qds - A TableDataSet

close

public static final void close(java.io.OutputStream os)
Convenience Method to close an Output Stream without Exception check.

Parameters:
os - An OutputStream

hashtableToByteArray

public static final byte[] hashtableToByteArray(java.util.Hashtable hash)
                                         throws java.lang.Exception
Converts a hashtable to a byte array for storage/serialization.

Parameters:
hash - The Hashtable to convert.
Returns:
A byte[] with the converted Hashtable.
Throws:
java.lang.Exception - If an error occurs.

setVillageValue

public static final void setVillageValue(Criteria crit,
                                         java.lang.String key,
                                         com.workingdogs.village.Record rec,
                                         java.lang.String colName)
                                  throws java.lang.Exception
Factored out setting of a Village Record column from a Criteria Key

Parameters:
crit - The Criteria
key - The Criterion Key
rec - The Village Record
colName - The name of the Column in the Record
Throws:
java.lang.Exception


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.