/**
   * convert Map to PrivacyLevelObjectKeyFilter.
   *
   * @param record the Map containing the data to convert to the object, not including the root
   * @return PrivacyLevelObjectKeyFilter the converted object
   */
  public static PrivacyLevelObjectKeyFilter getFilter(Map record) {
    Object[] list = null;
    Object obj = null;
    if (record == null) return null;
    PrivacyLevelObjectKeyFilter out = new PrivacyLevelObjectKeyFilter();

    Map LevelMap = (Map) record.get("Level");
    Boolean LevelFetch = DataHelper.getFetch(LevelMap);
    Boolean LevelSortDir = DataHelper.getSortDirection(LevelMap);
    Integer LevelSortOrder = DataHelper.getSortOrder(LevelMap);
    if (LevelFetch != null) out.setLevelFetch(LevelFetch);
    if (LevelSortDir != null) out.setLevelSortDirection(LevelSortDir);
    if (LevelSortOrder != null) out.setLevelSortOrder(LevelSortOrder);

    Filter[] LevelFilter = DataHelper.mapToFilterArray(LevelMap, Integer.class);
    if (LevelFilter != null) {
      IntegerFilter[] LevelFilters = new IntegerFilter[LevelFilter.length];
      for (int i = 0; i < LevelFilters.length; i++) {
        LevelFilters[i] = (IntegerFilter) LevelFilter[i];
      }
      try {
        out.setLevelFilter(LevelFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map LanguageCodeMap = (Map) record.get("LanguageCode");
    Boolean LanguageCodeFetch = DataHelper.getFetch(LanguageCodeMap);
    Boolean LanguageCodeSortDir = DataHelper.getSortDirection(LanguageCodeMap);
    Integer LanguageCodeSortOrder = DataHelper.getSortOrder(LanguageCodeMap);
    if (LanguageCodeFetch != null) out.setLanguageCodeFetch(LanguageCodeFetch);
    if (LanguageCodeSortDir != null) out.setLanguageCodeSortDirection(LanguageCodeSortDir);
    if (LanguageCodeSortOrder != null) out.setLanguageCodeSortOrder(LanguageCodeSortOrder);

    Filter[] LanguageCodeFilter = DataHelper.mapToFilterArray(LanguageCodeMap, Integer.class);
    if (LanguageCodeFilter != null) {
      IntegerFilter[] LanguageCodeFilters = new IntegerFilter[LanguageCodeFilter.length];
      for (int i = 0; i < LanguageCodeFilters.length; i++) {
        LanguageCodeFilters[i] = (IntegerFilter) LanguageCodeFilter[i];
      }
      try {
        out.setLanguageCodeFilter(LanguageCodeFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Boolean Fetch = DataHelper.getFetch(record);
    if (Fetch != null) out.setFetch(Fetch);
    Integer Index = DataHelper.getIndex(record);
    if (Index != null) out.setIndex(Index);
    return out;
  }
  /**
   * convert Map to AccountCodeObjectKeyFilter.
   *
   * @param record the Map containing the data to convert to the object, not including the root
   * @return AccountCodeObjectKeyFilter the converted object
   */
  public static AccountCodeObjectKeyFilter getFilter(Map record) {
    Object[] list = null;
    Object obj = null;
    if (record == null) return null;
    AccountCodeObjectKeyFilter out = new AccountCodeObjectKeyFilter();

    Map AcgTrackingIdMap = (Map) record.get("AcgTrackingId");
    Boolean AcgTrackingIdFetch = DataHelper.getFetch(AcgTrackingIdMap);
    Boolean AcgTrackingIdSortDir = DataHelper.getSortDirection(AcgTrackingIdMap);
    Integer AcgTrackingIdSortOrder = DataHelper.getSortOrder(AcgTrackingIdMap);
    if (AcgTrackingIdFetch != null) out.setAcgTrackingIdFetch(AcgTrackingIdFetch);
    if (AcgTrackingIdSortDir != null) out.setAcgTrackingIdSortDirection(AcgTrackingIdSortDir);
    if (AcgTrackingIdSortOrder != null) out.setAcgTrackingIdSortOrder(AcgTrackingIdSortOrder);

    Filter[] AcgTrackingIdFilter = DataHelper.mapToFilterArray(AcgTrackingIdMap, Integer.class);
    if (AcgTrackingIdFilter != null) {
      IntegerFilter[] AcgTrackingIdFilters = new IntegerFilter[AcgTrackingIdFilter.length];
      for (int i = 0; i < AcgTrackingIdFilters.length; i++) {
        AcgTrackingIdFilters[i] = (IntegerFilter) AcgTrackingIdFilter[i];
      }
      try {
        out.setAcgTrackingIdFilter(AcgTrackingIdFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map AcgTrackingIdServMap = (Map) record.get("AcgTrackingIdServ");
    Boolean AcgTrackingIdServFetch = DataHelper.getFetch(AcgTrackingIdServMap);
    Boolean AcgTrackingIdServSortDir = DataHelper.getSortDirection(AcgTrackingIdServMap);
    Integer AcgTrackingIdServSortOrder = DataHelper.getSortOrder(AcgTrackingIdServMap);
    if (AcgTrackingIdServFetch != null) out.setAcgTrackingIdServFetch(AcgTrackingIdServFetch);
    if (AcgTrackingIdServSortDir != null)
      out.setAcgTrackingIdServSortDirection(AcgTrackingIdServSortDir);
    if (AcgTrackingIdServSortOrder != null)
      out.setAcgTrackingIdServSortOrder(AcgTrackingIdServSortOrder);

    Filter[] AcgTrackingIdServFilter =
        DataHelper.mapToFilterArray(AcgTrackingIdServMap, Integer.class);
    if (AcgTrackingIdServFilter != null) {
      IntegerFilter[] AcgTrackingIdServFilters = new IntegerFilter[AcgTrackingIdServFilter.length];
      for (int i = 0; i < AcgTrackingIdServFilters.length; i++) {
        AcgTrackingIdServFilters[i] = (IntegerFilter) AcgTrackingIdServFilter[i];
      }
      try {
        out.setAcgTrackingIdServFilter(AcgTrackingIdServFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map AccountCodeMap = (Map) record.get("AccountCode");
    Boolean AccountCodeFetch = DataHelper.getFetch(AccountCodeMap);
    Boolean AccountCodeSortDir = DataHelper.getSortDirection(AccountCodeMap);
    Integer AccountCodeSortOrder = DataHelper.getSortOrder(AccountCodeMap);
    if (AccountCodeFetch != null) out.setAccountCodeFetch(AccountCodeFetch);
    if (AccountCodeSortDir != null) out.setAccountCodeSortDirection(AccountCodeSortDir);
    if (AccountCodeSortOrder != null) out.setAccountCodeSortOrder(AccountCodeSortOrder);

    Filter[] AccountCodeFilter = DataHelper.mapToFilterArray(AccountCodeMap, String.class);
    if (AccountCodeFilter != null) {
      StringFilter[] AccountCodeFilters = new StringFilter[AccountCodeFilter.length];
      for (int i = 0; i < AccountCodeFilters.length; i++) {
        AccountCodeFilters[i] = (StringFilter) AccountCodeFilter[i];
      }
      try {
        out.setAccountCodeFilter(AccountCodeFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Boolean Fetch = DataHelper.getFetch(record);
    if (Fetch != null) out.setFetch(Fetch);
    Integer Index = DataHelper.getIndex(record);
    if (Index != null) out.setIndex(Index);
    return out;
  }
예제 #3
0
  /**
   * convert Map to ContactObjectFilter.
   *
   * @param record the Map containing the data to convert to the object, not including the root
   * @return ContactObjectFilter the converted object
   */
  public static ContactObjectFilter getFilter(Map record) {
    Object[] list = null;
    Object obj = null;
    if (record == null) return null;
    ContactObjectFilter out = new ContactObjectFilter();
    Boolean Fetch = DataHelper.getFetch(record);
    if (Fetch != null) out.setFetch(Fetch);
    Integer Index = DataHelper.getIndex(record);
    if (Index != null) out.setIndex(Index);

    out.Key = ContactObjectKeyHelper.getFilter((Map) record.get("Key"));
    Map CreateDtMap = (Map) record.get("CreateDt");
    Boolean CreateDtFetch = DataHelper.getFetch(CreateDtMap);
    Boolean CreateDtSortDir = DataHelper.getSortDirection(CreateDtMap);
    Integer CreateDtSortOrder = DataHelper.getSortOrder(CreateDtMap);
    if (CreateDtFetch != null) out.setCreateDtFetch(CreateDtFetch);
    if (CreateDtSortDir != null) out.setCreateDtSortDirection(CreateDtSortDir);
    if (CreateDtSortOrder != null) out.setCreateDtSortOrder(CreateDtSortOrder);

    Filter[] CreateDtFilter = DataHelper.mapToFilterArray(CreateDtMap, Date.class);
    if (CreateDtFilter != null) {
      DateFilter[] CreateDtFilters = new DateFilter[CreateDtFilter.length];
      for (int i = 0; i < CreateDtFilters.length; i++) {
        CreateDtFilters[i] = (DateFilter) CreateDtFilter[i];
      }
      try {
        out.setCreateDtFilter(CreateDtFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map ChgDtMap = (Map) record.get("ChgDt");
    Boolean ChgDtFetch = DataHelper.getFetch(ChgDtMap);
    Boolean ChgDtSortDir = DataHelper.getSortDirection(ChgDtMap);
    Integer ChgDtSortOrder = DataHelper.getSortOrder(ChgDtMap);
    if (ChgDtFetch != null) out.setChgDtFetch(ChgDtFetch);
    if (ChgDtSortDir != null) out.setChgDtSortDirection(ChgDtSortDir);
    if (ChgDtSortOrder != null) out.setChgDtSortOrder(ChgDtSortOrder);

    Filter[] ChgDtFilter = DataHelper.mapToFilterArray(ChgDtMap, Date.class);
    if (ChgDtFilter != null) {
      DateFilter[] ChgDtFilters = new DateFilter[ChgDtFilter.length];
      for (int i = 0; i < ChgDtFilters.length; i++) {
        ChgDtFilters[i] = (DateFilter) ChgDtFilter[i];
      }
      try {
        out.setChgDtFilter(ChgDtFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map ChgWhoMap = (Map) record.get("ChgWho");
    Boolean ChgWhoFetch = DataHelper.getFetch(ChgWhoMap);
    Boolean ChgWhoSortDir = DataHelper.getSortDirection(ChgWhoMap);
    Integer ChgWhoSortOrder = DataHelper.getSortOrder(ChgWhoMap);
    if (ChgWhoFetch != null) out.setChgWhoFetch(ChgWhoFetch);
    if (ChgWhoSortDir != null) out.setChgWhoSortDirection(ChgWhoSortDir);
    if (ChgWhoSortOrder != null) out.setChgWhoSortOrder(ChgWhoSortOrder);

    Filter[] ChgWhoFilter = DataHelper.mapToFilterArray(ChgWhoMap, String.class);
    if (ChgWhoFilter != null) {
      StringFilter[] ChgWhoFilters = new StringFilter[ChgWhoFilter.length];
      for (int i = 0; i < ChgWhoFilters.length; i++) {
        ChgWhoFilters[i] = (StringFilter) ChgWhoFilter[i];
      }
      try {
        out.setChgWhoFilter(ChgWhoFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map NamePrefixMap = (Map) record.get("NamePrefix");
    Boolean NamePrefixFetch = DataHelper.getFetch(NamePrefixMap);
    Boolean NamePrefixSortDir = DataHelper.getSortDirection(NamePrefixMap);
    Integer NamePrefixSortOrder = DataHelper.getSortOrder(NamePrefixMap);
    if (NamePrefixFetch != null) out.setNamePrefixFetch(NamePrefixFetch);
    if (NamePrefixSortDir != null) out.setNamePrefixSortDirection(NamePrefixSortDir);
    if (NamePrefixSortOrder != null) out.setNamePrefixSortOrder(NamePrefixSortOrder);

    Filter[] NamePrefixFilter = DataHelper.mapToFilterArray(NamePrefixMap, String.class);
    if (NamePrefixFilter != null) {
      StringFilter[] NamePrefixFilters = new StringFilter[NamePrefixFilter.length];
      for (int i = 0; i < NamePrefixFilters.length; i++) {
        NamePrefixFilters[i] = (StringFilter) NamePrefixFilter[i];
      }
      try {
        out.setNamePrefixFilter(NamePrefixFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map FirstNameMap = (Map) record.get("FirstName");
    Boolean FirstNameFetch = DataHelper.getFetch(FirstNameMap);
    Boolean FirstNameSortDir = DataHelper.getSortDirection(FirstNameMap);
    Integer FirstNameSortOrder = DataHelper.getSortOrder(FirstNameMap);
    if (FirstNameFetch != null) out.setFirstNameFetch(FirstNameFetch);
    if (FirstNameSortDir != null) out.setFirstNameSortDirection(FirstNameSortDir);
    if (FirstNameSortOrder != null) out.setFirstNameSortOrder(FirstNameSortOrder);

    Filter[] FirstNameFilter = DataHelper.mapToFilterArray(FirstNameMap, String.class);
    if (FirstNameFilter != null) {
      StringFilter[] FirstNameFilters = new StringFilter[FirstNameFilter.length];
      for (int i = 0; i < FirstNameFilters.length; i++) {
        FirstNameFilters[i] = (StringFilter) FirstNameFilter[i];
      }
      try {
        out.setFirstNameFilter(FirstNameFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map MiddleNameMap = (Map) record.get("MiddleName");
    Boolean MiddleNameFetch = DataHelper.getFetch(MiddleNameMap);
    Boolean MiddleNameSortDir = DataHelper.getSortDirection(MiddleNameMap);
    Integer MiddleNameSortOrder = DataHelper.getSortOrder(MiddleNameMap);
    if (MiddleNameFetch != null) out.setMiddleNameFetch(MiddleNameFetch);
    if (MiddleNameSortDir != null) out.setMiddleNameSortDirection(MiddleNameSortDir);
    if (MiddleNameSortOrder != null) out.setMiddleNameSortOrder(MiddleNameSortOrder);

    Filter[] MiddleNameFilter = DataHelper.mapToFilterArray(MiddleNameMap, String.class);
    if (MiddleNameFilter != null) {
      StringFilter[] MiddleNameFilters = new StringFilter[MiddleNameFilter.length];
      for (int i = 0; i < MiddleNameFilters.length; i++) {
        MiddleNameFilters[i] = (StringFilter) MiddleNameFilter[i];
      }
      try {
        out.setMiddleNameFilter(MiddleNameFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map LastNameMap = (Map) record.get("LastName");
    Boolean LastNameFetch = DataHelper.getFetch(LastNameMap);
    Boolean LastNameSortDir = DataHelper.getSortDirection(LastNameMap);
    Integer LastNameSortOrder = DataHelper.getSortOrder(LastNameMap);
    if (LastNameFetch != null) out.setLastNameFetch(LastNameFetch);
    if (LastNameSortDir != null) out.setLastNameSortDirection(LastNameSortDir);
    if (LastNameSortOrder != null) out.setLastNameSortOrder(LastNameSortOrder);

    Filter[] LastNameFilter = DataHelper.mapToFilterArray(LastNameMap, String.class);
    if (LastNameFilter != null) {
      StringFilter[] LastNameFilters = new StringFilter[LastNameFilter.length];
      for (int i = 0; i < LastNameFilters.length; i++) {
        LastNameFilters[i] = (StringFilter) LastNameFilter[i];
      }
      try {
        out.setLastNameFilter(LastNameFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map GenerationMap = (Map) record.get("Generation");
    Boolean GenerationFetch = DataHelper.getFetch(GenerationMap);
    Boolean GenerationSortDir = DataHelper.getSortDirection(GenerationMap);
    Integer GenerationSortOrder = DataHelper.getSortOrder(GenerationMap);
    if (GenerationFetch != null) out.setGenerationFetch(GenerationFetch);
    if (GenerationSortDir != null) out.setGenerationSortDirection(GenerationSortDir);
    if (GenerationSortOrder != null) out.setGenerationSortOrder(GenerationSortOrder);

    Filter[] GenerationFilter = DataHelper.mapToFilterArray(GenerationMap, String.class);
    if (GenerationFilter != null) {
      StringFilter[] GenerationFilters = new StringFilter[GenerationFilter.length];
      for (int i = 0; i < GenerationFilters.length; i++) {
        GenerationFilters[i] = (StringFilter) GenerationFilter[i];
      }
      try {
        out.setGenerationFilter(GenerationFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map TitleMap = (Map) record.get("Title");
    Boolean TitleFetch = DataHelper.getFetch(TitleMap);
    Boolean TitleSortDir = DataHelper.getSortDirection(TitleMap);
    Integer TitleSortOrder = DataHelper.getSortOrder(TitleMap);
    if (TitleFetch != null) out.setTitleFetch(TitleFetch);
    if (TitleSortDir != null) out.setTitleSortDirection(TitleSortDir);
    if (TitleSortOrder != null) out.setTitleSortOrder(TitleSortOrder);

    Filter[] TitleFilter = DataHelper.mapToFilterArray(TitleMap, String.class);
    if (TitleFilter != null) {
      StringFilter[] TitleFilters = new StringFilter[TitleFilter.length];
      for (int i = 0; i < TitleFilters.length; i++) {
        TitleFilters[i] = (StringFilter) TitleFilter[i];
      }
      try {
        out.setTitleFilter(TitleFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map CompanyMap = (Map) record.get("Company");
    Boolean CompanyFetch = DataHelper.getFetch(CompanyMap);
    Boolean CompanySortDir = DataHelper.getSortDirection(CompanyMap);
    Integer CompanySortOrder = DataHelper.getSortOrder(CompanyMap);
    if (CompanyFetch != null) out.setCompanyFetch(CompanyFetch);
    if (CompanySortDir != null) out.setCompanySortDirection(CompanySortDir);
    if (CompanySortOrder != null) out.setCompanySortOrder(CompanySortOrder);

    Filter[] CompanyFilter = DataHelper.mapToFilterArray(CompanyMap, String.class);
    if (CompanyFilter != null) {
      StringFilter[] CompanyFilters = new StringFilter[CompanyFilter.length];
      for (int i = 0; i < CompanyFilters.length; i++) {
        CompanyFilters[i] = (StringFilter) CompanyFilter[i];
      }
      try {
        out.setCompanyFilter(CompanyFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map AddressIdMap = (Map) record.get("AddressId");
    Boolean AddressIdFetch = DataHelper.getFetch(AddressIdMap);
    Boolean AddressIdSortDir = DataHelper.getSortDirection(AddressIdMap);
    Integer AddressIdSortOrder = DataHelper.getSortOrder(AddressIdMap);
    if (AddressIdFetch != null) out.setAddressIdFetch(AddressIdFetch);
    if (AddressIdSortDir != null) out.setAddressIdSortDirection(AddressIdSortDir);
    if (AddressIdSortOrder != null) out.setAddressIdSortOrder(AddressIdSortOrder);

    Filter[] AddressIdFilter = DataHelper.mapToFilterArray(AddressIdMap, BigInteger.class);
    if (AddressIdFilter != null) {
      BigIntegerFilter[] AddressIdFilters = new BigIntegerFilter[AddressIdFilter.length];
      for (int i = 0; i < AddressIdFilters.length; i++) {
        AddressIdFilters[i] = (BigIntegerFilter) AddressIdFilter[i];
      }
      try {
        out.setAddressIdFilter(AddressIdFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map AltLnameMap = (Map) record.get("AltLname");
    Boolean AltLnameFetch = DataHelper.getFetch(AltLnameMap);
    Boolean AltLnameSortDir = DataHelper.getSortDirection(AltLnameMap);
    Integer AltLnameSortOrder = DataHelper.getSortOrder(AltLnameMap);
    if (AltLnameFetch != null) out.setAltLnameFetch(AltLnameFetch);
    if (AltLnameSortDir != null) out.setAltLnameSortDirection(AltLnameSortDir);
    if (AltLnameSortOrder != null) out.setAltLnameSortOrder(AltLnameSortOrder);

    Filter[] AltLnameFilter = DataHelper.mapToFilterArray(AltLnameMap, String.class);
    if (AltLnameFilter != null) {
      StringFilter[] AltLnameFilters = new StringFilter[AltLnameFilter.length];
      for (int i = 0; i < AltLnameFilters.length; i++) {
        AltLnameFilters[i] = (StringFilter) AltLnameFilter[i];
      }
      try {
        out.setAltLnameFilter(AltLnameFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map AltFnameMap = (Map) record.get("AltFname");
    Boolean AltFnameFetch = DataHelper.getFetch(AltFnameMap);
    Boolean AltFnameSortDir = DataHelper.getSortDirection(AltFnameMap);
    Integer AltFnameSortOrder = DataHelper.getSortOrder(AltFnameMap);
    if (AltFnameFetch != null) out.setAltFnameFetch(AltFnameFetch);
    if (AltFnameSortDir != null) out.setAltFnameSortDirection(AltFnameSortDir);
    if (AltFnameSortOrder != null) out.setAltFnameSortOrder(AltFnameSortOrder);

    Filter[] AltFnameFilter = DataHelper.mapToFilterArray(AltFnameMap, String.class);
    if (AltFnameFilter != null) {
      StringFilter[] AltFnameFilters = new StringFilter[AltFnameFilter.length];
      for (int i = 0; i < AltFnameFilters.length; i++) {
        AltFnameFilters[i] = (StringFilter) AltFnameFilter[i];
      }
      try {
        out.setAltFnameFilter(AltFnameFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map AltCompanyMap = (Map) record.get("AltCompany");
    Boolean AltCompanyFetch = DataHelper.getFetch(AltCompanyMap);
    Boolean AltCompanySortDir = DataHelper.getSortDirection(AltCompanyMap);
    Integer AltCompanySortOrder = DataHelper.getSortOrder(AltCompanyMap);
    if (AltCompanyFetch != null) out.setAltCompanyFetch(AltCompanyFetch);
    if (AltCompanySortDir != null) out.setAltCompanySortDirection(AltCompanySortDir);
    if (AltCompanySortOrder != null) out.setAltCompanySortOrder(AltCompanySortOrder);

    Filter[] AltCompanyFilter = DataHelper.mapToFilterArray(AltCompanyMap, String.class);
    if (AltCompanyFilter != null) {
      StringFilter[] AltCompanyFilters = new StringFilter[AltCompanyFilter.length];
      for (int i = 0; i < AltCompanyFilters.length; i++) {
        AltCompanyFilters[i] = (StringFilter) AltCompanyFilter[i];
      }
      try {
        out.setAltCompanyFilter(AltCompanyFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map GenderMap = (Map) record.get("Gender");
    Boolean GenderFetch = DataHelper.getFetch(GenderMap);
    Boolean GenderSortDir = DataHelper.getSortDirection(GenderMap);
    Integer GenderSortOrder = DataHelper.getSortOrder(GenderMap);
    if (GenderFetch != null) out.setGenderFetch(GenderFetch);
    if (GenderSortDir != null) out.setGenderSortDirection(GenderSortDir);
    if (GenderSortOrder != null) out.setGenderSortOrder(GenderSortOrder);

    Filter[] GenderFilter = DataHelper.mapToFilterArray(GenderMap, Integer.class);
    if (GenderFilter != null) {
      IntegerFilter[] GenderFilters = new IntegerFilter[GenderFilter.length];
      for (int i = 0; i < GenderFilters.length; i++) {
        GenderFilters[i] = (IntegerFilter) GenderFilter[i];
      }
      try {
        out.setGenderFilter(GenderFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map DeptMap = (Map) record.get("Dept");
    Boolean DeptFetch = DataHelper.getFetch(DeptMap);
    Boolean DeptSortDir = DataHelper.getSortDirection(DeptMap);
    Integer DeptSortOrder = DataHelper.getSortOrder(DeptMap);
    if (DeptFetch != null) out.setDeptFetch(DeptFetch);
    if (DeptSortDir != null) out.setDeptSortDirection(DeptSortDir);
    if (DeptSortOrder != null) out.setDeptSortOrder(DeptSortOrder);

    Filter[] DeptFilter = DataHelper.mapToFilterArray(DeptMap, String.class);
    if (DeptFilter != null) {
      StringFilter[] DeptFilters = new StringFilter[DeptFilter.length];
      for (int i = 0; i < DeptFilters.length; i++) {
        DeptFilters[i] = (StringFilter) DeptFilter[i];
      }
      try {
        out.setDeptFilter(DeptFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map DateActiveMap = (Map) record.get("DateActive");
    Boolean DateActiveFetch = DataHelper.getFetch(DateActiveMap);
    Boolean DateActiveSortDir = DataHelper.getSortDirection(DateActiveMap);
    Integer DateActiveSortOrder = DataHelper.getSortOrder(DateActiveMap);
    if (DateActiveFetch != null) out.setDateActiveFetch(DateActiveFetch);
    if (DateActiveSortDir != null) out.setDateActiveSortDirection(DateActiveSortDir);
    if (DateActiveSortOrder != null) out.setDateActiveSortOrder(DateActiveSortOrder);

    Filter[] DateActiveFilter = DataHelper.mapToFilterArray(DateActiveMap, Date.class);
    if (DateActiveFilter != null) {
      DateFilter[] DateActiveFilters = new DateFilter[DateActiveFilter.length];
      for (int i = 0; i < DateActiveFilters.length; i++) {
        DateActiveFilters[i] = (DateFilter) DateActiveFilter[i];
      }
      try {
        out.setDateActiveFilter(DateActiveFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map DateInactiveMap = (Map) record.get("DateInactive");
    Boolean DateInactiveFetch = DataHelper.getFetch(DateInactiveMap);
    Boolean DateInactiveSortDir = DataHelper.getSortDirection(DateInactiveMap);
    Integer DateInactiveSortOrder = DataHelper.getSortOrder(DateInactiveMap);
    if (DateInactiveFetch != null) out.setDateInactiveFetch(DateInactiveFetch);
    if (DateInactiveSortDir != null) out.setDateInactiveSortDirection(DateInactiveSortDir);
    if (DateInactiveSortOrder != null) out.setDateInactiveSortOrder(DateInactiveSortOrder);

    Filter[] DateInactiveFilter = DataHelper.mapToFilterArray(DateInactiveMap, Date.class);
    if (DateInactiveFilter != null) {
      DateFilter[] DateInactiveFilters = new DateFilter[DateInactiveFilter.length];
      for (int i = 0; i < DateInactiveFilters.length; i++) {
        DateInactiveFilters[i] = (DateFilter) DateInactiveFilter[i];
      }
      try {
        out.setDateInactiveFilter(DateInactiveFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map AddressLine1Map = (Map) record.get("AddressLine1");
    Boolean AddressLine1Fetch = DataHelper.getFetch(AddressLine1Map);
    Boolean AddressLine1SortDir = DataHelper.getSortDirection(AddressLine1Map);
    Integer AddressLine1SortOrder = DataHelper.getSortOrder(AddressLine1Map);
    if (AddressLine1Fetch != null) out.setAddressLine1Fetch(AddressLine1Fetch);
    if (AddressLine1SortDir != null) out.setAddressLine1SortDirection(AddressLine1SortDir);
    if (AddressLine1SortOrder != null) out.setAddressLine1SortOrder(AddressLine1SortOrder);

    Filter[] AddressLine1Filter = DataHelper.mapToFilterArray(AddressLine1Map, String.class);
    if (AddressLine1Filter != null) {
      StringFilter[] AddressLine1Filters = new StringFilter[AddressLine1Filter.length];
      for (int i = 0; i < AddressLine1Filters.length; i++) {
        AddressLine1Filters[i] = (StringFilter) AddressLine1Filter[i];
      }
      try {
        out.setAddressLine1Filter(AddressLine1Filters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map AddressLine2Map = (Map) record.get("AddressLine2");
    Boolean AddressLine2Fetch = DataHelper.getFetch(AddressLine2Map);
    Boolean AddressLine2SortDir = DataHelper.getSortDirection(AddressLine2Map);
    Integer AddressLine2SortOrder = DataHelper.getSortOrder(AddressLine2Map);
    if (AddressLine2Fetch != null) out.setAddressLine2Fetch(AddressLine2Fetch);
    if (AddressLine2SortDir != null) out.setAddressLine2SortDirection(AddressLine2SortDir);
    if (AddressLine2SortOrder != null) out.setAddressLine2SortOrder(AddressLine2SortOrder);

    Filter[] AddressLine2Filter = DataHelper.mapToFilterArray(AddressLine2Map, String.class);
    if (AddressLine2Filter != null) {
      StringFilter[] AddressLine2Filters = new StringFilter[AddressLine2Filter.length];
      for (int i = 0; i < AddressLine2Filters.length; i++) {
        AddressLine2Filters[i] = (StringFilter) AddressLine2Filter[i];
      }
      try {
        out.setAddressLine2Filter(AddressLine2Filters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map AddressLine3Map = (Map) record.get("AddressLine3");
    Boolean AddressLine3Fetch = DataHelper.getFetch(AddressLine3Map);
    Boolean AddressLine3SortDir = DataHelper.getSortDirection(AddressLine3Map);
    Integer AddressLine3SortOrder = DataHelper.getSortOrder(AddressLine3Map);
    if (AddressLine3Fetch != null) out.setAddressLine3Fetch(AddressLine3Fetch);
    if (AddressLine3SortDir != null) out.setAddressLine3SortDirection(AddressLine3SortDir);
    if (AddressLine3SortOrder != null) out.setAddressLine3SortOrder(AddressLine3SortOrder);

    Filter[] AddressLine3Filter = DataHelper.mapToFilterArray(AddressLine3Map, String.class);
    if (AddressLine3Filter != null) {
      StringFilter[] AddressLine3Filters = new StringFilter[AddressLine3Filter.length];
      for (int i = 0; i < AddressLine3Filters.length; i++) {
        AddressLine3Filters[i] = (StringFilter) AddressLine3Filter[i];
      }
      try {
        out.setAddressLine3Filter(AddressLine3Filters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map AddressLine4Map = (Map) record.get("AddressLine4");
    Boolean AddressLine4Fetch = DataHelper.getFetch(AddressLine4Map);
    Boolean AddressLine4SortDir = DataHelper.getSortDirection(AddressLine4Map);
    Integer AddressLine4SortOrder = DataHelper.getSortOrder(AddressLine4Map);
    if (AddressLine4Fetch != null) out.setAddressLine4Fetch(AddressLine4Fetch);
    if (AddressLine4SortDir != null) out.setAddressLine4SortDirection(AddressLine4SortDir);
    if (AddressLine4SortOrder != null) out.setAddressLine4SortOrder(AddressLine4SortOrder);

    Filter[] AddressLine4Filter = DataHelper.mapToFilterArray(AddressLine4Map, String.class);
    if (AddressLine4Filter != null) {
      StringFilter[] AddressLine4Filters = new StringFilter[AddressLine4Filter.length];
      for (int i = 0; i < AddressLine4Filters.length; i++) {
        AddressLine4Filters[i] = (StringFilter) AddressLine4Filter[i];
      }
      try {
        out.setAddressLine4Filter(AddressLine4Filters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map CityMap = (Map) record.get("City");
    Boolean CityFetch = DataHelper.getFetch(CityMap);
    Boolean CitySortDir = DataHelper.getSortDirection(CityMap);
    Integer CitySortOrder = DataHelper.getSortOrder(CityMap);
    if (CityFetch != null) out.setCityFetch(CityFetch);
    if (CitySortDir != null) out.setCitySortDirection(CitySortDir);
    if (CitySortOrder != null) out.setCitySortOrder(CitySortOrder);

    Filter[] CityFilter = DataHelper.mapToFilterArray(CityMap, String.class);
    if (CityFilter != null) {
      StringFilter[] CityFilters = new StringFilter[CityFilter.length];
      for (int i = 0; i < CityFilters.length; i++) {
        CityFilters[i] = (StringFilter) CityFilter[i];
      }
      try {
        out.setCityFilter(CityFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map StateMap = (Map) record.get("State");
    Boolean StateFetch = DataHelper.getFetch(StateMap);
    Boolean StateSortDir = DataHelper.getSortDirection(StateMap);
    Integer StateSortOrder = DataHelper.getSortOrder(StateMap);
    if (StateFetch != null) out.setStateFetch(StateFetch);
    if (StateSortDir != null) out.setStateSortDirection(StateSortDir);
    if (StateSortOrder != null) out.setStateSortOrder(StateSortOrder);

    Filter[] StateFilter = DataHelper.mapToFilterArray(StateMap, String.class);
    if (StateFilter != null) {
      StringFilter[] StateFilters = new StringFilter[StateFilter.length];
      for (int i = 0; i < StateFilters.length; i++) {
        StateFilters[i] = (StringFilter) StateFilter[i];
      }
      try {
        out.setStateFilter(StateFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map PostalCodeMap = (Map) record.get("PostalCode");
    Boolean PostalCodeFetch = DataHelper.getFetch(PostalCodeMap);
    Boolean PostalCodeSortDir = DataHelper.getSortDirection(PostalCodeMap);
    Integer PostalCodeSortOrder = DataHelper.getSortOrder(PostalCodeMap);
    if (PostalCodeFetch != null) out.setPostalCodeFetch(PostalCodeFetch);
    if (PostalCodeSortDir != null) out.setPostalCodeSortDirection(PostalCodeSortDir);
    if (PostalCodeSortOrder != null) out.setPostalCodeSortOrder(PostalCodeSortOrder);

    Filter[] PostalCodeFilter = DataHelper.mapToFilterArray(PostalCodeMap, String.class);
    if (PostalCodeFilter != null) {
      StringFilter[] PostalCodeFilters = new StringFilter[PostalCodeFilter.length];
      for (int i = 0; i < PostalCodeFilters.length; i++) {
        PostalCodeFilters[i] = (StringFilter) PostalCodeFilter[i];
      }
      try {
        out.setPostalCodeFilter(PostalCodeFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map CountryCodeMap = (Map) record.get("CountryCode");
    Boolean CountryCodeFetch = DataHelper.getFetch(CountryCodeMap);
    Boolean CountryCodeSortDir = DataHelper.getSortDirection(CountryCodeMap);
    Integer CountryCodeSortOrder = DataHelper.getSortOrder(CountryCodeMap);
    if (CountryCodeFetch != null) out.setCountryCodeFetch(CountryCodeFetch);
    if (CountryCodeSortDir != null) out.setCountryCodeSortDirection(CountryCodeSortDir);
    if (CountryCodeSortOrder != null) out.setCountryCodeSortOrder(CountryCodeSortOrder);

    Filter[] CountryCodeFilter = DataHelper.mapToFilterArray(CountryCodeMap, Integer.class);
    if (CountryCodeFilter != null) {
      IntegerFilter[] CountryCodeFilters = new IntegerFilter[CountryCodeFilter.length];
      for (int i = 0; i < CountryCodeFilters.length; i++) {
        CountryCodeFilters[i] = (IntegerFilter) CountryCodeFilter[i];
      }
      try {
        out.setCountryCodeFilter(CountryCodeFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map FranchiseTaxCodeMap = (Map) record.get("FranchiseTaxCode");
    Boolean FranchiseTaxCodeFetch = DataHelper.getFetch(FranchiseTaxCodeMap);
    Boolean FranchiseTaxCodeSortDir = DataHelper.getSortDirection(FranchiseTaxCodeMap);
    Integer FranchiseTaxCodeSortOrder = DataHelper.getSortOrder(FranchiseTaxCodeMap);
    if (FranchiseTaxCodeFetch != null) out.setFranchiseTaxCodeFetch(FranchiseTaxCodeFetch);
    if (FranchiseTaxCodeSortDir != null)
      out.setFranchiseTaxCodeSortDirection(FranchiseTaxCodeSortDir);
    if (FranchiseTaxCodeSortOrder != null)
      out.setFranchiseTaxCodeSortOrder(FranchiseTaxCodeSortOrder);

    Filter[] FranchiseTaxCodeFilter =
        DataHelper.mapToFilterArray(FranchiseTaxCodeMap, Integer.class);
    if (FranchiseTaxCodeFilter != null) {
      IntegerFilter[] FranchiseTaxCodeFilters = new IntegerFilter[FranchiseTaxCodeFilter.length];
      for (int i = 0; i < FranchiseTaxCodeFilters.length; i++) {
        FranchiseTaxCodeFilters[i] = (IntegerFilter) FranchiseTaxCodeFilter[i];
      }
      try {
        out.setFranchiseTaxCodeFilter(FranchiseTaxCodeFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map GeocodeMap = (Map) record.get("Geocode");
    Boolean GeocodeFetch = DataHelper.getFetch(GeocodeMap);
    Boolean GeocodeSortDir = DataHelper.getSortDirection(GeocodeMap);
    Integer GeocodeSortOrder = DataHelper.getSortOrder(GeocodeMap);
    if (GeocodeFetch != null) out.setGeocodeFetch(GeocodeFetch);
    if (GeocodeSortDir != null) out.setGeocodeSortDirection(GeocodeSortDir);
    if (GeocodeSortOrder != null) out.setGeocodeSortOrder(GeocodeSortOrder);

    Filter[] GeocodeFilter = DataHelper.mapToFilterArray(GeocodeMap, String.class);
    if (GeocodeFilter != null) {
      StringFilter[] GeocodeFilters = new StringFilter[GeocodeFilter.length];
      for (int i = 0; i < GeocodeFilters.length; i++) {
        GeocodeFilters[i] = (StringFilter) GeocodeFilter[i];
      }
      try {
        out.setGeocodeFilter(GeocodeFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map CountyMap = (Map) record.get("County");
    Boolean CountyFetch = DataHelper.getFetch(CountyMap);
    Boolean CountySortDir = DataHelper.getSortDirection(CountyMap);
    Integer CountySortOrder = DataHelper.getSortOrder(CountyMap);
    if (CountyFetch != null) out.setCountyFetch(CountyFetch);
    if (CountySortDir != null) out.setCountySortDirection(CountySortDir);
    if (CountySortOrder != null) out.setCountySortOrder(CountySortOrder);

    Filter[] CountyFilter = DataHelper.mapToFilterArray(CountyMap, String.class);
    if (CountyFilter != null) {
      StringFilter[] CountyFilters = new StringFilter[CountyFilter.length];
      for (int i = 0; i < CountyFilters.length; i++) {
        CountyFilters[i] = (StringFilter) CountyFilter[i];
      }
      try {
        out.setCountyFilter(CountyFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    return out;
  }
  /**
   * convert Map to AccountHqContractObjectKeyFilter.
   *
   * @param record the Map containing the data to convert to the object, not including the root
   * @return AccountHqContractObjectKeyFilter the converted object
   */
  public static AccountHqContractObjectKeyFilter getFilter(Map record) {
    Object[] list = null;
    Object obj = null;
    if (record == null) return null;
    AccountHqContractObjectKeyFilter out = new AccountHqContractObjectKeyFilter();

    Map AccountInternalIdMap = (Map) record.get("AccountInternalId");
    Boolean AccountInternalIdFetch = DataHelper.getFetch(AccountInternalIdMap);
    Boolean AccountInternalIdSortDir = DataHelper.getSortDirection(AccountInternalIdMap);
    Integer AccountInternalIdSortOrder = DataHelper.getSortOrder(AccountInternalIdMap);
    if (AccountInternalIdFetch != null) out.setAccountInternalIdFetch(AccountInternalIdFetch);
    if (AccountInternalIdSortDir != null)
      out.setAccountInternalIdSortDirection(AccountInternalIdSortDir);
    if (AccountInternalIdSortOrder != null)
      out.setAccountInternalIdSortOrder(AccountInternalIdSortOrder);

    Filter[] AccountInternalIdFilter =
        DataHelper.mapToFilterArray(AccountInternalIdMap, Integer.class);
    if (AccountInternalIdFilter != null) {
      IntegerFilter[] AccountInternalIdFilters = new IntegerFilter[AccountInternalIdFilter.length];
      for (int i = 0; i < AccountInternalIdFilters.length; i++) {
        AccountInternalIdFilters[i] = (IntegerFilter) AccountInternalIdFilter[i];
      }
      try {
        out.setAccountInternalIdFilter(AccountInternalIdFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map TrackingIdMap = (Map) record.get("TrackingId");
    Boolean TrackingIdFetch = DataHelper.getFetch(TrackingIdMap);
    Boolean TrackingIdSortDir = DataHelper.getSortDirection(TrackingIdMap);
    Integer TrackingIdSortOrder = DataHelper.getSortOrder(TrackingIdMap);
    if (TrackingIdFetch != null) out.setTrackingIdFetch(TrackingIdFetch);
    if (TrackingIdSortDir != null) out.setTrackingIdSortDirection(TrackingIdSortDir);
    if (TrackingIdSortOrder != null) out.setTrackingIdSortOrder(TrackingIdSortOrder);

    Filter[] TrackingIdFilter = DataHelper.mapToFilterArray(TrackingIdMap, Integer.class);
    if (TrackingIdFilter != null) {
      IntegerFilter[] TrackingIdFilters = new IntegerFilter[TrackingIdFilter.length];
      for (int i = 0; i < TrackingIdFilters.length; i++) {
        TrackingIdFilters[i] = (IntegerFilter) TrackingIdFilter[i];
      }
      try {
        out.setTrackingIdFilter(TrackingIdFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map TrackingIdServMap = (Map) record.get("TrackingIdServ");
    Boolean TrackingIdServFetch = DataHelper.getFetch(TrackingIdServMap);
    Boolean TrackingIdServSortDir = DataHelper.getSortDirection(TrackingIdServMap);
    Integer TrackingIdServSortOrder = DataHelper.getSortOrder(TrackingIdServMap);
    if (TrackingIdServFetch != null) out.setTrackingIdServFetch(TrackingIdServFetch);
    if (TrackingIdServSortDir != null) out.setTrackingIdServSortDirection(TrackingIdServSortDir);
    if (TrackingIdServSortOrder != null) out.setTrackingIdServSortOrder(TrackingIdServSortOrder);

    Filter[] TrackingIdServFilter = DataHelper.mapToFilterArray(TrackingIdServMap, Integer.class);
    if (TrackingIdServFilter != null) {
      IntegerFilter[] TrackingIdServFilters = new IntegerFilter[TrackingIdServFilter.length];
      for (int i = 0; i < TrackingIdServFilters.length; i++) {
        TrackingIdServFilters[i] = (IntegerFilter) TrackingIdServFilter[i];
      }
      try {
        out.setTrackingIdServFilter(TrackingIdServFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Map StartDtMap = (Map) record.get("StartDt");
    Boolean StartDtFetch = DataHelper.getFetch(StartDtMap);
    Boolean StartDtSortDir = DataHelper.getSortDirection(StartDtMap);
    Integer StartDtSortOrder = DataHelper.getSortOrder(StartDtMap);
    if (StartDtFetch != null) out.setStartDtFetch(StartDtFetch);
    if (StartDtSortDir != null) out.setStartDtSortDirection(StartDtSortDir);
    if (StartDtSortOrder != null) out.setStartDtSortOrder(StartDtSortOrder);

    Filter[] StartDtFilter = DataHelper.mapToFilterArray(StartDtMap, Date.class);
    if (StartDtFilter != null) {
      DateFilter[] StartDtFilters = new DateFilter[StartDtFilter.length];
      for (int i = 0; i < StartDtFilters.length; i++) {
        StartDtFilters[i] = (DateFilter) StartDtFilter[i];
      }
      try {
        out.setStartDtFilter(StartDtFilters);
      } catch (Exception x) {
        x.printStackTrace();
      }
    }

    Boolean Fetch = DataHelper.getFetch(record);
    if (Fetch != null) out.setFetch(Fetch);
    Integer Index = DataHelper.getIndex(record);
    if (Index != null) out.setIndex(Index);
    return out;
  }