public String getDefault() {
   Iterator i = this.iterator();
   while (i.hasNext()) {
     WebSiteLanguage language = (WebSiteLanguage) i.next();
     if (language.getDefaultItem()) {
       return language.getLanguageLocale();
     }
   }
   return "en_US";
 }
 public int getDefaultId() {
   Iterator i = this.iterator();
   while (i.hasNext()) {
     WebSiteLanguage language = (WebSiteLanguage) i.next();
     if (language.getDefaultItem()) {
       return language.getId();
     }
   }
   return -1;
 }
 public int getLanguageId(HttpServletRequest request) {
   int defaultId = -1;
   String uri = request.getRequestURL().toString();
   Iterator<WebSiteLanguage> i = this.iterator();
   while (i.hasNext()) {
     WebSiteLanguage thisItem = i.next();
     if (uri.indexOf(thisItem.getLanguageLocale()) > -1) {
       return thisItem.getId();
     }
     if (thisItem.getDefaultItem()) {
       defaultId = thisItem.getId();
     }
   }
   return defaultId;
 }