Package org.jpox

Examples of org.jpox.ClassLoaderResolver.classForName()


                    // Files have listeners so go through them in the same order
                    Iterator<EventListenerMetaData> listenerIter = listenerMetaData.iterator();
                    while (listenerIter.hasNext())
                    {
                        EventListenerMetaData elmd = listenerIter.next();
                        Class listenerClass = clr.classForName(elmd.getClassName());
                        String methodName = elmd.getMethodNameForCallbackClass(callbackClass.getName());
                        if (methodName != null)
                        {
                            // Separate listener class taking the PC object as input
                            Object listener = listenerClass.newInstance();
View Full Code Here


                    // Class has listeners so go through them in the same order
                    Iterator<EventListenerMetaData> listenerIter = listenerMetaData.iterator();
                    while (listenerIter.hasNext())
                    {
                        EventListenerMetaData elmd = listenerIter.next();
                        Class listenerClass = clr.classForName(elmd.getClassName());
                        String methodName = elmd.getMethodNameForCallbackClass(callbackClass.getName());
                        if (methodName != null)
                        {
                            if (elmd.getClassName().equals(acmd.getFullClassName()))
                            {
View Full Code Here

    {
        if (expr instanceof ClassExpression)
        {
            ClassLoaderResolver clr = qs.getClassLoaderResolver();
            Class instanceofClass = ((ClassExpression)expr).getCls();
            Class fieldClass = clr.classForName(mapping.getType());
            if (!fieldClass.isAssignableFrom(instanceofClass) && !instanceofClass.isAssignableFrom(fieldClass))
            {
                // Field type and instanceof type are totally incompatible, so just return false
                return new BooleanLiteral(qs, mapping, true).eq(new BooleanLiteral(qs, mapping, false));
            }
View Full Code Here

    private Object getObjectForAbstractClass(ObjectManager om, final Object rs, int[] param, AbstractClassMetaData cmd)
    {
        ClassLoaderResolver clr = om.getClassLoaderResolver();

        // Abstract class, so we need to generate an AID before proceeding
        Class objectIdClass = clr.classForName(cmd.getObjectidClass());
        Class pcClass = clr.classForName(cmd.getFullClassName());
        Object id;
        if (cmd.usesSingleFieldIdentityClass())
        {
            id = createSingleFieldIdentity(om, rs, param, cmd, objectIdClass, pcClass);
View Full Code Here

    {
        ClassLoaderResolver clr = om.getClassLoaderResolver();

        // Abstract class, so we need to generate an AID before proceeding
        Class objectIdClass = clr.classForName(cmd.getObjectidClass());
        Class pcClass = clr.classForName(cmd.getFullClassName());
        Object id;
        if (cmd.usesSingleFieldIdentityClass())
        {
            id = createSingleFieldIdentity(om, rs, param, cmd, objectIdClass, pcClass);
        }
View Full Code Here

                expressionsIndex[j] = param[paramIndex++];
            }
            statementExpressionIndex[fmd.getAbsoluteFieldNumber()].setExpressionIndex(expressionsIndex);
        }

        return om.findObjectUsingAID(clr.classForName(cmd.getFullClassName()),
            new FieldValues()
            {
            // StateManager calls the fetchFields method
            public void fetchFields(StateManager sm)
            {
View Full Code Here

          {
              sm.setStoringPC();
          }

            MetaDataManager mmgr = om.getStoreManager().getOMFContext().getMetaDataManager();
          boolean isPersistentInterface = mmgr.getMetaDataForInterface(clr.classForName(getType()), clr) != null;
          if (isPersistentInterface)
          {
              // Field is declared as a "persistent-interface" type so all impls of that type should match
              type = clr.classForName(getType());
          }
View Full Code Here

            MetaDataManager mmgr = om.getStoreManager().getOMFContext().getMetaDataManager();
          boolean isPersistentInterface = mmgr.getMetaDataForInterface(clr.classForName(getType()), clr) != null;
          if (isPersistentInterface)
          {
              // Field is declared as a "persistent-interface" type so all impls of that type should match
              type = clr.classForName(getType());
          }
          else if (fmd != null && fmd.getFieldTypes() != null && fmd.getFieldTypes().length == 1)
          {
              isPersistentInterface = mmgr.getMetaDataForInterface(clr.classForName(fmd.getFieldTypes()[0]), clr) != null;
              if (isPersistentInterface)
View Full Code Here

              // Field is declared as a "persistent-interface" type so all impls of that type should match
              type = clr.classForName(getType());
          }
          else if (fmd != null && fmd.getFieldTypes() != null && fmd.getFieldTypes().length == 1)
          {
              isPersistentInterface = mmgr.getMetaDataForInterface(clr.classForName(fmd.getFieldTypes()[0]), clr) != null;
              if (isPersistentInterface)
              {
                  // Field is declared as interface and accepts "persistent-interface" value, so all impls should match
                  type = clr.classForName(fmd.getFieldTypes()[0]);
              }
View Full Code Here

          {
              isPersistentInterface = mmgr.getMetaDataForInterface(clr.classForName(fmd.getFieldTypes()[0]), clr) != null;
              if (isPersistentInterface)
              {
                  // Field is declared as interface and accepts "persistent-interface" value, so all impls should match
                  type = clr.classForName(fmd.getFieldTypes()[0]);
              }
          }

          for (int i=0; i<javaTypeMappings.length; i++)
          {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.