com.sas.iquery.util
Class AssociationListUtil

com.sas.iquery.util.AssociationListUtil

public class AssociationListUtil


Constructor Summary
AssociationListUtil()
           
 
Method Summary
static boolean add(com.sas.metadata.remote.AssociationList asList, java.lang.Object object)
           
static void clear(com.sas.metadata.remote.AssociationList asList)
           
static com.sas.metadata.remote.AssociationList copy(com.sas.metadata.remote.CMetadata newParent, com.sas.metadata.remote.AssociationList oldAsList)
           
static
<T> java.util.List<T>
filteredSnapshot(com.sas.metadata.remote.AssociationList acList, java.lang.Class<T> type)
          Returns a filtered snapshot of the association list that is safe for iteration.
static java.util.List<java.lang.Object> get(com.sas.metadata.remote.AssociationList acList)
          Returns the items in the association list, guarding against a concurrent modification exception for either 10 attempts or for the value of the system property "IQ.RetryUtil.MaxRetries".
static java.util.List getCopyIfASL(java.util.List mayBeAssociationList)
          Copy objects in association list to new list.
static boolean remove(com.sas.metadata.remote.AssociationList asList, java.lang.Object object)
           
static void set(com.sas.metadata.remote.AssociationList asList, java.util.List<?> sources)
           
static void setStateUnchanged(com.sas.metadata.remote.AssociationList asList)
           
 

Constructor Detail

AssociationListUtil

public AssociationListUtil()
Method Detail

get

public static java.util.List<java.lang.Object> get(com.sas.metadata.remote.AssociationList acList)
Returns the items in the association list, guarding against a concurrent modification exception for either 10 attempts or for the value of the system property "IQ.RetryUtil.MaxRetries". If that property is set to less than 1, then no retries will be made.

Parameters:
acList - AssociationList to retrieve the members from.
Returns:

filteredSnapshot

public static <T> java.util.List<T> filteredSnapshot(com.sas.metadata.remote.AssociationList acList,
                                                     java.lang.Class<T> type)
Returns a filtered snapshot of the association list that is safe for iteration.

A ConcurrentModificationException is guarded against for either 10 attempts or for the value of the system property "IQ.RetryUtil.MaxRetries". If that property is set to less than 1, then no retries will be made.

All elements in the returned list will be of type type, and none of the elements will be null. In other words, the returned list is a filtered snapshot of the input list.

Parameters:
acList - the original AssociationList
type - the type parameter for the legacy (pre-generic) association list.
Throws:
java.lang.IllegalStateException - when a snapshot can not be obtained
java.lang.ClassCastException - if elements in the association list are not of type type

set

public static void set(com.sas.metadata.remote.AssociationList asList,
                       java.util.List<?> sources)
                throws java.rmi.RemoteException,
                       com.sas.metadata.remote.MdException
Parameters:
asList -
sources -
Throws:
com.sas.metadata.remote.MdException
java.rmi.RemoteException

copy

public static com.sas.metadata.remote.AssociationList copy(com.sas.metadata.remote.CMetadata newParent,
                                                           com.sas.metadata.remote.AssociationList oldAsList)
                                                    throws java.rmi.RemoteException,
                                                           com.sas.metadata.remote.MdException
Parameters:
newTransform -
oldNotes -
Returns:
Throws:
com.sas.metadata.remote.MdException
java.rmi.RemoteException

setStateUnchanged

public static void setStateUnchanged(com.sas.metadata.remote.AssociationList asList)
                              throws java.rmi.RemoteException,
                                     com.sas.metadata.remote.MdException
Parameters:
asList -
Throws:
com.sas.metadata.remote.MdException
java.rmi.RemoteException

add

public static boolean add(com.sas.metadata.remote.AssociationList asList,
                          java.lang.Object object)
                   throws java.rmi.RemoteException,
                          com.sas.metadata.remote.MdException
Parameters:
asList -
object -
Returns:
Throws:
com.sas.metadata.remote.MdException
java.rmi.RemoteException

remove

public static boolean remove(com.sas.metadata.remote.AssociationList asList,
                             java.lang.Object object)
                      throws java.rmi.RemoteException,
                             com.sas.metadata.remote.MdException
Parameters:
asList -
object -
Throws:
com.sas.metadata.remote.MdException
java.rmi.RemoteException

clear

public static void clear(com.sas.metadata.remote.AssociationList asList)
                  throws java.rmi.RemoteException,
                         com.sas.metadata.remote.MdException
Parameters:
accessControls -
Throws:
com.sas.metadata.remote.MdException
java.rmi.RemoteException

getCopyIfASL

public static java.util.List getCopyIfASL(java.util.List mayBeAssociationList)
Copy objects in association list to new list. This avoids concurrent modification exception while iterating association list is not safe for iteration

Parameters:
mayBeAssociationList -
Returns:



Copyright © 2009 SAS Institute Inc. All Rights Reserved.