/
EDMUtilities

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 Detail

      • EDMUtilities

        public EDMUtilities(EDMContext context)
    • Method Detail

      • getTypeListSelect

        public EDMSelect getTypeListSelect(EDMDefinedType[] list)
                                    throws EdmiException

        Get an EDMSelect with type list

        Parameters: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 wrappers

        Parameters: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 wrappers

        Parameters: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 wrappers

        Parameters: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 IDss

        Parameters: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