Package nexj.core.meta

Examples of nexj.core.meta.MetadataLookupException


      if (column != null)
      {
         return column;
      }

      throw new MetadataLookupException("err.meta.columnLookup", sName, this);
   }
View Full Code Here


   {
      Index index = findIndex(sName);

      if (index == null)
      {
         throw new MetadataLookupException("err.meta.tableIndexLookup", sName, this);
      }

      return index;
   }
View Full Code Here

                        {
                           Metaclass parent = m_metadata.getMetaclass(sParentEnumeration);

                           if (!((Set)m_enumerationValueMap.get(sParentEnumeration)).contains(parent.getAttribute("value").getType().convert(sParentValue)))
                           {
                              throw new MetadataLookupException("err.meta.enumParentValueLookup", sParentValue, sParentEnumeration);
                           }
                        }
                     });
                  }
                  else
                  {
                     if (sParentEnumeration != null)
                     {
                        throw new MetadataException("err.meta.enumNoParentValue", new Object[]{sValue, sEnumerationName});
                     }
                  }

                  if (m_bValidatedOnly)
                  {
                     XMLUtil.withFirstChildElement(valueElement, "Locales", false, new ElementHandler()
                     {
                        public void handleElement(Element localesElement)
                        {
                           final Set localeSet = new HashHolder();

                           XMLUtil.forEachChildElement(localesElement, "Locale",
                              m_helper.new ElementHandler("locale")
                           {
                              public void handleElement(Element localeElement, String sLocale)
                              {
                                 if (!localeSet.add(sLocale))
                                 {
                                    throw new MetadataException("err.meta.enumValueLocaleDup",
                                       new Object[]{sLocale, sValue, sEnumerationName});
                                 }

                                 XMLUtil.getReqStringAttr(localeElement, "caption");
                              }
                           });
                        }
                     });
                  }
               }
            });

            if (behaveAsSet.size() != 0)
            {
               // Remove the values that have no behavior
               for (int i = 0, n = fixupList.size(); i != n; i += 3)
               {
                  if (!((Boolean)fixupList.get(i + 2)).booleanValue())
                  {
                     valueSet.remove(fixupList.get(i + 1));
                  }
               }

               for (Iterator itr = behaveAsSet.iterator(); itr.hasNext();)
               {
                  String sValue = (String)itr.next();

                  if (!valueSet.contains(sValue))
                  {
                     throw new MetadataLookupException("err.meta.enumBehaveAsValueLookup",
                        sValue, sEnumerationName);
                  }
               }
            }
View Full Code Here

         meta = m_metadata.findMetaclass(sName);
      }

      if (meta == null)
      {
         throw new MetadataLookupException("err.meta.transformationEndpointLookup", sName, sTransformationName);
      }

      return meta;
   }
View Full Code Here

      if (column != null)
      {
         return column;
      }

      throw new MetadataLookupException("err.meta.columnLookup", sName, this);
   }
View Full Code Here

      if (index != null)
      {
         return index;
      }

      throw new MetadataLookupException("err.meta.tableIndexLookup", sName, this);
   }
View Full Code Here

   {
      super.validate(metadata, warnings);

      if (m_adapter == null)
      {
         throw new MetadataLookupException("err.meta.adapterLookup", new Object[]{m_adapter, null});
      }
   }
View Full Code Here

      if (obj != null)
      {
         return obj;
      }

      throw new MetadataLookupException("err.meta.objectLookup", sName, this);
   }
View Full Code Here

      if (table != null)
      {
         return table;
      }
     
      throw new MetadataLookupException("err.meta.tableLookup", sName, this);
   }
View Full Code Here

      if (index != null)
      {
         return index;
      }
     
      throw new MetadataLookupException("err.meta.schemaIndexLookup", sName, this);
   }
View Full Code Here

TOP

Related Classes of nexj.core.meta.MetadataLookupException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.