***  This class is subject to change.  ***

com.sas.iquery.dataservices
Class PossibleFilterValue

com.sas.iquery.dataservices.PossibleFilterValue

public class PossibleFilterValue

Specifies an object that wrappers a pair of formatted and unformatted data items that are retrieved within the context of getPossibleFilterValues(). This type of object is returned to the consumer who can then obtain the desired data whether it be formatted or unformatted data. *

 Usage example:

  // iqService is an IntelligentQueryMetadataServiceInterface.
        IQDataServicesInterface iqDataServ = IQDataServicesFactory.newService(iqService);
        
                try {
                        List possibleValues = iqDataServ.getPossibleFilterValues(dataItem);
                        Iterator it = possibleValues.iterator();
                        PossibleFilterValue value = null;
 
                        while (it.hasNext()) {
                                value = (PossibleFilterValue)it.next();
                                System.out.println("Formatted: " + value.getFormatted());
 
                                // Make a call to get the JDBC result type
                                int type = value.getJDBCType();
                                System.out.println("Unformatted: " + value.getUnformatted());
 
                                // Save unformatted data into a Java variable
                                // In this case we know the data is Date type.
                                Date myDate = (Date)value.getUnformatted();
 
                                // Do more stuff...
                        }
 
                } catch (DataServicesException e) {
                        // handle exception
                }
 


Method Summary
 java.lang.String getFormatted()
          Returns a String representation of the formatted data value.
 int getJDBCType()
          Returns the JDBC column type for the data value.
 java.lang.Object getUnformatted()
          Returns an object containing the unformatted data value.
 

Method Detail

getFormatted

public java.lang.String getFormatted()
                              throws DataServicesException
Returns a String representation of the formatted data value.

Throws:
DataServicesException - - thrown if there is an error retreiving the data.

getUnformatted

public java.lang.Object getUnformatted()
                                throws DataServicesException
Returns an object containing the unformatted data value.

Throws:
DataServicesException - - thrown if there is an error retreiving the data.

getJDBCType

public int getJDBCType()
Returns the JDBC column type for the data value.


***  This class is subject to change.  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.