EDMUtilities
edm.edom3.util
Class EDMUtilities
- java.lang.Object
- edm.edom3.util.EDMUtilities
public class EDMUtilities extends java.lang.Object
Miscllaneous utilities to save some typing...Author:aet
Constructor Summary
Constructors
Constructor and Description EDMUtilities(EDMContext context)
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Modifier and Type Method and Description long[]
getDefinedTypeIds(EDMDefinedType[] types)
Convert from defined type wrappers to IDssEDMDefinedType[]
getDefinedTypes(EDMExpressSchema schema, java.lang.String[] names)
Convert from defined type names to wrappersEDMDefinedType[]
getDefinedTypes(EDMModel model, java.lang.String[] names)
Convert from defined type names to wrappersEDMDefinedType[]
getDefinedTypes(long[] idlist)
Convert from defined type IDs to wrappersEDMSelect
getTypeListSelect(EDMDefinedType[] list)
Get an EDMSelect with type liststatic int
safetlyCastLongToInt(long index)
Tries to cast a long parameter to an integer parameter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
EDMUtilities
public EDMUtilities(EDMContext context)
Method Detail
getTypeListSelect
public EDMSelect getTypeListSelect(EDMDefinedType[] list) throws EdmiException
Get an EDMSelect with type listParameters:list - list of defined typesReturns:EDMSelect with populatred type listThrows:EdmiException - if the method fails
getDefinedTypes
public EDMDefinedType[] getDefinedTypes(long[] idlist) throws EdmiException
Convert from defined type IDs to wrappersParameters:idlist - list of type IDs (instance ids)Returns:list of Defined Type WrappersThrows:EdmiException - if the method fails
getDefinedTypes
public EDMDefinedType[] getDefinedTypes(EDMModel model, java.lang.String[] names) throws EdmiException
Convert from defined type names to wrappersParameters:model - model that should use the defined typesnames - list of type namesReturns:list of Defined Type WrappersThrows:EdmiException - if the method fails
getDefinedTypes
public EDMDefinedType[] getDefinedTypes(EDMExpressSchema schema, java.lang.String[] names) throws EdmiException
Convert from defined type names to wrappersParameters:schema - The schema where the defined types are definednames - list of type namesReturns:list of Defined Type WrappersThrows:EdmiException - if the method fails
getDefinedTypeIds
public long[] getDefinedTypeIds(EDMDefinedType[] types) throws EdmiException
Convert from defined type wrappers to IDssParameters:types - of Defined Type WrappersReturns:list of type IDs (instance ids)Throws:EdmiException - if the method fails
safetlyCastLongToInt
public static int safetlyCastLongToInt(long index) throws java.lang.IllegalArgumentException
Tries to cast a long parameter to an integer parameter. This is used for Arrays.Parameters:index - the long number to be castReturns:integer representation of indexThrows:java.lang.IllegalArgumentException - IllegalArgumentException