Package com.sun.jdo.spi.persistence.support.sqlstore.query.util.type

Examples of com.sun.jdo.spi.persistence.support.sqlstore.query.util.type.ClassType


        match(_t,CLASS_DEF);
        _t = _t.getNextSibling();
        if ( inputState.guessing==0 ) {
         
          // check persistence capable
          ClassType candidateClass = (ClassType)c.getJQLType();
          candidateRD = createRetrieveDesc("this", candidateClass); //NOI18N
          candidateRD.setPrefetchEnabled(prefetchEnabled);
         
        }
      }
View Full Code Here


    _t = _t.getNextSibling();
    if ( inputState.guessing==0 ) {
     
      // Calculate the value of the static field at compile time
      // and treat it as constant value.
      ClassType classType = (ClassType)t.getJQLType();
      FieldInfo fieldInfo = classType.getFieldInfo(i.getText());
      try
      {
      value = fieldInfo.getField().get(null);
      s_AST.setType(VALUE);
      s_AST.setValue(value);
      s_AST.setFirstChild(null);
      }
      catch (IllegalAccessException e)
      {
      throw new JDOFatalUserException(
      I18NHelper.getMessage(messages,
      "jqlc.optimizer.staticfieldaccess.illegal"//NOI18N
      i.getText(), classType.getName()), e);
      }
     
    }
    staticFieldAccess_AST = (JQLAST)currentAST.root;
    returnAST = staticFieldAccess_AST;
View Full Code Here

      {
      // If the object of the field access is a constant value,
      // evaluate the field access at compile time and
      // treat the expression as constant value.
      Object object = o_AST.getValue();
      ClassType classType = (ClassType)o_AST.getJQLType();
      Object value = CodeGeneration.getFieldValue(classType, object,
      name_AST.getText());
      f_AST.setType(VALUE);
      f_AST.setValue(value);
      f_AST.setFirstChild(null);
View Full Code Here

      {
      // If the object of the navigation is a constant value,
      // evaluate the field access at compile time and
      // treat the expression as constant value.
      Object object = o_AST.getValue();
      ClassType classType = (ClassType)o_AST.getJQLType();
      Object value = CodeGeneration.getFieldValue(classType, object,
      name_AST.getText());
      n_AST.setType(VALUE);
      n_AST.setValue(value);
      n_AST.setFirstChild(null);
View Full Code Here

        String name = ident.getText();
        dot.setText(expr.getText() + '.' + name);
        if (exprType instanceof ClassType)
        {
            // left expression is of a class type
            ClassType classType = (ClassType)exprType;
            if (args == null)
            {
                // no paranethesis specified => field access
                FieldInfo fieldInfo = classType.getFieldInfo(name);
                if (fieldInfo == null)
                {
                    errorMsg.error(ident.getLine(), ident.getColumn(),
                                   I18NHelper.getMessage(messages, "jqlc.semantic.generic.unknownfield"//NOI18N
                                                         ident.getText(), exprType.getName()));
View Full Code Here

        {
        case FIELD_ACCESS:
        case NAVIGATION:
            if ((child != null) && (child.getNextSibling() != null))
            {
                ClassType classType = (ClassType)child.getJQLType();
                String fieldName = child.getNextSibling().getText();
                return classType.getFieldInfo(fieldName);
            }
            errorMsg.fatal(I18NHelper.getMessage(messages, "jqlc.semantic.getcollectionfield.missingchildren")); //NOI18N
            break;
        case TYPECAST:
            if ((child != null) && (child.getNextSibling() != null))
View Full Code Here

TOP

Related Classes of com.sun.jdo.spi.persistence.support.sqlstore.query.util.type.ClassType

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.