Package nexj.core.scripting

Examples of nexj.core.scripting.Symbol


                  head.setTail(Boolean.valueOf((!((Boolean)head.getTail()).booleanValue() ^ bAscending)));
               }
            }
            else
            {
               Symbol sym = (Symbol)orderBy.getHead();

               if (sym == null)
               {
                  throw new ClassCastException();
               }

               metaclass.getAttribute(sym.getName());
               orderBy.setHead(new Pair(sym, Boolean.valueOf(bAscending)));
            }
           
            if (first == null)
            {
View Full Code Here


            if (pair == null || !(pair.getHead() instanceof Symbol))
            {
               throw new IllegalArgumentException("Invalid query class name");
            }
           
            Symbol classSymbol = (Symbol)pair.getHead();

            pair = pair.getNext();
           
            Pair attributes = null;
            Object where = null;
           
            if (pair != null)
            {
               attributes = (Pair)pair.getHead();
               pair = pair.getNext();
              
               if (pair != null)
               {
                  where = pair.getHead();
                 
                  if (pair.getTail() != null)
                  {
                     throw new IllegalArgumentException("Too many query arguments");
                  }
               }
            }
           
            Query query = Query.createRead(m_context.getMetadata().getMetaclass(classSymbol.getName()),
               attributes, where, null, -1, 0, false, Query.SEC_NONE, m_context);

            resultList.addAll((List)RPCUtil.transfer(query.read(), attributes, identityMap, RPCUtil.TF_ALL));
         }
View Full Code Here

   /**
    * Tests an *uncached* calculated attribute that has an initializer.
    */
   public void testUncachedCalculatedValueWithInitializer()
   {
      final Symbol INITIALIZED = Symbol.define("INITIALIZED");
      final Symbol CALCULATED = Symbol.define("CALCULATED");
      final Metaclass userClass = Repository.getMetadata().getMetaclass("User");
      final int attribute = userClass.findAttribute("regionUncached").getOrdinal();
      UnitOfWork oldUOW;
      Instance instance;

View Full Code Here

   /**
    * Tests a *cached* calculated attribute that has an initializer.
    */
   public void testCachedCalculatedValueWithInitializer()
   {
      final Symbol INITIALIZED = Symbol.define("INITIALIZED");
      final Symbol CALCULATED = Symbol.define("CALCULATED");
      final Metaclass userClass = Repository.getMetadata().getMetaclass("User");
      final int attribute = userClass.findAttribute("regionCached").getOrdinal();
      UnitOfWork oldUOW;
      Instance instance;

View Full Code Here

      if (associationPath != null)
      {
         for (; associationPath != null; associationPath = associationPath.getNext())
         {
            Symbol partSymbol = ((ObjectMessagePartMapping)((MessagePart)associationPath.getHead()).getMapping())
               .getAttribute().getSymbol();

            reverseAssocPath = new Pair(partSymbol, reverseAssocPath);
         }
View Full Code Here

      m_attributeArray = new Attribute[nCount];
      m_bDirectionArray = new boolean[nCount];

      for (int i = 0; i < nCount; i++)
      {
         Symbol attrSym = (Symbol)((Pair)attrDirectionList.get(i)).getHead();

         if (attrSym != null)
         {
            m_attributeArray[i] = metaclass.getAttribute(attrSym);
         }
View Full Code Here

      int nCount = metaclass.getInstanceAttributeCount();
      BitSet attrSet = new BitSet(nCount);

      while (attributes != null)
      {
         Symbol sym = (Symbol)attributes.getHead();
         Attribute attr = metaclass.getAttribute(sym);

         if (attr.isStatic())
         {
            throw new MetadataException("err.meta.persistence.virtual.updateStaticAttribute",
View Full Code Here

      Pair list = null;
      Lookup.Iterator itr = attrMap.iterator();

      while (itr.hasNext())
      {
         Symbol attribute = (Symbol)itr.next();
         Object value = itr.getValue();

         if (value instanceof Lookup)
         {
            value = new Pair(attribute, getAttributes((Lookup)value));
View Full Code Here

    */
   private void validateCompositionMap(Lookup attrMap, Metaclass metaclass)
   {
      for (Lookup.Iterator itr = attrMap.iterator(); itr.hasNext();)
      {
         Symbol sym = (Symbol)itr.next();
         Object value = itr.getValue();
         Attribute attr = metaclass.findAttribute(sym);

         if (value instanceof Lookup)
         {
View Full Code Here

         Pair pair;

         if (head instanceof Pair)
         {
            Pair field = (Pair)head;
            Symbol sym = (Symbol)field.getHead();

            if (sym == Symbol.ATAT)
            {
               field = field.getNext();

               if (metaclass.getMetadata().getMetaclass(
                  ((Symbol)field.getHead()).getName()).isUpcast(metaclass))
               {
                  transfer(instance, field.getNext(), diffMap, identityMap, nTF);
               }

               continue;
            }

            if (sym == Symbol.COLON)
            {
               sName = ((Symbol)field.getNext().getHead()).getName();
               tobj.setValue(sName, transfer(instance.findAnnotation(sName), null, diffMap, identityMap, nTF));

               continue;
            }

            sName = sym.getName();
            pair = field.getNext();
         }
         else
         {
            sName = ((Symbol)head).getName();
View Full Code Here

TOP

Related Classes of nexj.core.scripting.Symbol

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.