Package net.sourceforge.squirrel_sql.plugins.hibernate.mapping

Examples of net.sourceforge.squirrel_sql.plugins.hibernate.mapping.MappedClassInfo


   public TupelResult(ArrayList<MappedClassInfo> mappedClassInfos, Object array)
   {
      for (int i = 0; i < mappedClassInfos.size(); i++)
      {
         MappedClassInfo mappedClassInfo = mappedClassInfos.get(i);
         Object obj = Array.get(array, i);
         _singleResults.add(new SingleResult(obj, mappedClassInfo));

         _toString += mappedClassInfo.getClassName();

         if(i < mappedClassInfos.size() - 1)
         {
            _toString += ";";
         }
View Full Code Here


      for (PropertyInfo propertyInfo : propertyInfos)
      {
         String propertyName = propertyInfo.getHibernatePropertyInfo().getPropertyName();

         MappedClassInfo mci = null;
         ArrayList objects = new ArrayList();

         boolean persistentCollection = false;
         boolean persistentCollectionInitialized = false;
View Full Code Here

      }
   }

   private SingleType createSingleTypeResultType(String mappedClassName, ArrayList<MappedClassInfo> allMappedClassInfos, Class persistenCollectionClass, List objects)
   {
      MappedClassInfo mappedClassInfo = ViewObjectsUtil.findMappedClassInfo(mappedClassName, allMappedClassInfos, false);

      return new SingleType(mappedClassInfo, allMappedClassInfos, persistenCollectionClass, objects);
   }
View Full Code Here

      }



      ArrayList<CompletionInfo> ret = new ArrayList<CompletionInfo>();
      MappedClassInfo lastFoundBuf = _lastFoundMappedClassInfo;
      if(null != lastFoundBuf)
      {
         if(1 == parser.size())
         {
            ret.addAll(lastFoundBuf.getMatchingAttributes(parser));
         }
         else
         {

            for (PropertyInfo propertyInfo : lastFoundBuf.getAttributes())
            {
               if(propertyInfo.getHibernatePropertyInfo().getPropertyName().equals(parser.getToken(0)))
               {
                  MappedClassInfo mappedClassInfo = propertyInfo.getMappedClassInfo();
                  CompletionParser simpleAttrFakeParser = new CompletionParser(mappedClassInfo.getClassName() + "." + parser.getAllButFirst());
                  ArrayList<PropertyInfo> matchingAttributes = mappedClassInfo.getQualifiedMatchingAttributes(simpleAttrFakeParser);
                  ret.addAll(matchingAttributes);
               }
            }
         }
      }
View Full Code Here

   }

   private void onTableOrViewFound(String name)
   {
      MappedClassInfo mappedClassInfo = _mappedClassInfoBySimpleClassName.get(name);

      if(null != mappedClassInfo)
      {
         _lastFoundMappedClassInfo = mappedClassInfo;
      }
View Full Code Here

   {
      if(root.getResultType() instanceof SingleType)
      {
         SingleType type = (SingleType) root.getResultType();

         MappedClassInfo mci = type.getMappedClassInfo();
         System.out.println("##\nRoot-Result consists of only one mapped class: " + mci.getClassName() + "\n##");

         for (SingleResult result : type.getResults())
         {
            Object firstObject = result.getObject();
            displayMappedObject(mappedClassInfos, mci, firstObject, persistenCollectionClass);
         }
      }
      else
      {
         System.out.println("##\nRoot-Result consists more than one mapped class\n##");


         System.out.println("##Displaying result ordered by type:");
         for (IType kidType : root.getResultType().getKidTypes())
         {
            SingleType type = (SingleType) kidType;

            System.out.println("*Results for class: " + type.getMappedClassInfo().getClassName());

            for (SingleResult queryResult : type.getResults())
            {
               MappedClassInfo mci = queryResult.getMappedClassInfo();
               Object obj = queryResult.getObject();

               displayMappedObject(mappedClassInfos, mci, obj, persistenCollectionClass);
            }
         }

         System.out.println("##Displaying result ordered as read:\n");
         ArrayList<? extends IResult> results = root.getResultType().getResults();

         for (IResult result : results)
         {
            ArrayList<SingleResult> singleResults = ((TupelResult) result).getSingleResults();


            System.out.println("##Displaying result block:");
            for (SingleResult singleResult : singleResults)
            {
               MappedClassInfo mci = singleResult.getMappedClassInfo();
               Object obj = singleResult.getObject();

               displayMappedObject(mappedClassInfos, mci, obj, persistenCollectionClass);
            }
         }
View Full Code Here

         _toString = s_stringMgr.getString("PersistentCollectionResult.initialized", propertyName, className);


         Iterator iterator = ((Collection) new ReflectionCaller(_persistentCollection).getCallee()).iterator();

         MappedClassInfo mci = null;
         while(iterator.hasNext())
         {
            Object obj = iterator.next();

            if(null == mci)
View Full Code Here

               mappedClassInfoData = _hibernateServerConnection.getMappedClassInfoData();
            }

            for (MappedClassInfoData aMappedClassInfoData : mappedClassInfoData)
            {
               _mappedClassInfos.add(new MappedClassInfo(aMappedClassInfoData));
            }
         }

         return _mappedClassInfos;
      }
View Full Code Here

   {
      ArrayList<AliasInfo> ret = new ArrayList<AliasInfo>();

      int[] i = new int[1];

      MappedClassInfo lastMappedClass = null;

      while(i[0] < hql.length())
      {
         String token = nextToken(i, hql);
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.plugins.hibernate.mapping.MappedClassInfo

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.