org.apache.torque.util
Class VillageUtils

java.lang.Object
  extended byorg.apache.torque.util.VillageUtils
All Implemented Interfaces:
java.io.Serializable

public abstract class VillageUtils
extends java.lang.Object
implements java.io.Serializable

Some Village related code factored out of the BasePeer.

Version:
$Id: VillageUtils.java 239636 2005-08-24 12:38:09Z henning $
Author:
Henning P. Schmiedehausen
See Also:
Serialized Form

Constructor Summary
VillageUtils()
           
 
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
 

Constructor Detail

VillageUtils

public VillageUtils()
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:
TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.
java.lang.Exception

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-2006 Apache Software Foundation. All Rights Reserved.