com.fatwire.gst.foundation
Class IListUtils

java.lang.Object
  extended by com.fatwire.gst.foundation.IListUtils

public final class IListUtils
extends Object

Miscellaneous IList Utilities

Since:
21-Nov-2008
Author:
Tony Field

Method Summary
static String generateRandomListName()
          Generates a random String to assign to a IList name.
static String generateRandomListName(String prefix)
          Generates a random String to assign to a IList name.
static Date getDateValue(COM.FutureTense.Interfaces.IList list, String colname)
          Return a Date value for a column.
static long getLongValue(COM.FutureTense.Interfaces.IList list, String colname)
          Return a long value for a column.
static String getStringValue(COM.FutureTense.Interfaces.IList list, String colname)
          Return a string value for a column.
static Collection<com.fatwire.assetapi.data.AssetId> toAssetIdCollection(COM.FutureTense.Interfaces.IList result)
          Reads an IList with collumns assettype and assetid and creates a Collection of AssetId objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStringValue

public static String getStringValue(COM.FutureTense.Interfaces.IList list,
                                    String colname)
Return a string value for a column. Wraps the possible checked exception NoSuchFieldException with an IllegalArgumentException

Parameters:
list - IList to interrogate
colname - name of column to return
Returns:
string value
Throws:
IllegalArgumentException - if the column name is not found

getLongValue

public static long getLongValue(COM.FutureTense.Interfaces.IList list,
                                String colname)
Return a long value for a column. Wraps the possible checked exception NoSuchFieldException with an IllegalArgumentException

Parameters:
list - IList to interrogate
colname - name of column to return
Returns:
long value
Throws:
IllegalArgumentException - if the column name is not found
NumberFormatException - if the column being queried does not contain a long.

getDateValue

public static Date getDateValue(COM.FutureTense.Interfaces.IList list,
                                String colname)
Return a Date value for a column. The date must be in standard JDBC date format. Wraps possible checked exception NoSuchFieldException with an IllegalArgumentException

Parameters:
list - IList to interrogate
colname - name of column to return
Returns:
date value

generateRandomListName

public static String generateRandomListName()
Generates a random String to assign to a IList name. It is optimized for performance.

Returns:
String that can be used for an IList name.

generateRandomListName

public static String generateRandomListName(String prefix)
Generates a random String to assign to a IList name. It is optimized for performance.

Parameters:
prefix - the prefix to assign to the list name, cannot be empty or null.
Returns:
String for list name

toAssetIdCollection

public static Collection<com.fatwire.assetapi.data.AssetId> toAssetIdCollection(COM.FutureTense.Interfaces.IList result)
Reads an IList with collumns assettype and assetid and creates a Collection of AssetId objects.

Parameters:
result -
Returns:
Collection of AssetIds, never null.


Copyright © 2010-2013 Oracle Corporation. All Rights Reserved.