Package org.apache.derby.iapi.services.loader

Examples of org.apache.derby.iapi.services.loader.ClassFactory


        FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
      throws StandardException
  {
        DataDictionary  dd = getDataDictionary();
    DataTypeDescriptor   dts = null;
    ClassFactory    cf;

    cf = getClassFactory();
    classInspector = cf.getClassInspector();

        if ( userAggregateName != null )
        {
            userAggregateName.bind();
        }
View Full Code Here


      }

      TypeId typeId = columnDescriptor.getType().getTypeId();

      // Don't allow a column to be created on a non-orderable type
      ClassFactory cf = lcc.getLanguageConnectionFactory().getClassFactory();
      boolean isIndexable = typeId.orderable(cf);

      if (isIndexable && typeId.userType()) {
        String userClass = typeId.getCorrespondingJavaTypeName();

        // Don't allow indexes to be created on classes that
        // are loaded from the database. This is because recovery
        // won't be able to see the class and it will need it to
        // run the compare method.
        try {
          if (cf.isApplicationClass(cf.loadApplicationClass(userClass)))
            isIndexable = false;
        } catch (ClassNotFoundException cnfe) {
          // shouldn't happen as we just check the class is orderable
          isIndexable = false;
        }
View Full Code Here

        if (!rightOperandList.allSamePrecendence(
                judgeTypeId.typePrecedence())) {
            // Iterate through the entire list of values to find out
            // what the dominant type is.
            ClassFactory cf = getClassFactory();

            for (ValueNode vn : rightOperandList) {
                targetType = targetType.getDominantType(
                        vn.getTypeServices(), cf);
            }
View Full Code Here

            String  customOptTraceName = configurationParameters[ 1 ];

            try {
                ClassFactoryContext cfc = (ClassFactoryContext) ContextService.getContext( ClassFactoryContext.CONTEXT_ID );
                ClassFactory    classFactory = cfc.getClassFactory();

                tracer = (OptTrace) classFactory.loadApplicationClass( customOptTraceName ).newInstance();
            }
            catch (InstantiationException cnfe) { throw cantInstantiate( customOptTraceName ); }
            catch (ClassNotFoundException cnfe) { throw cantInstantiate( customOptTraceName ); }
            catch (IllegalAccessException cnfe) { throw cantInstantiate( customOptTraceName ); }
            catch (Throwable t) { throw wrap( t ); }
View Full Code Here

  {
    try
    {
      CompilerContext cc = (CompilerContext)
        ContextService.getContext(CompilerContext.CONTEXT_ID);
            ClassFactory    classFactory = cc.getClassFactory();
            TypeCompilerFactory tcf = cc.getTypeCompilerFactory();

            Class<?>   derbyAggregatorInterface = classFactory.loadApplicationClass( "org.apache.derby.agg.Aggregator" );
            Class<?>   userAggregatorClass = classFactory.loadApplicationClass( _alias.getJavaClassName() );

            Class[][]   typeBounds = classFactory.getClassInspector().getTypeBounds
                ( derbyAggregatorInterface, userAggregatorClass );

            if (
                (typeBounds == null) ||
                (typeBounds.length != AGGREGATOR_PARAM_COUNT) ||
                (typeBounds[ INPUT_TYPE ] == null) ||
                (typeBounds[ RETURN_TYPE ] == null)
                )
            {
                throw StandardException.newException
                    (
                     SQLState.LANG_ILLEGAL_UDA_CLASS,
                     _alias.getSchemaName(),
                     _alias.getName(),
                     userAggregatorClass.getName()
                     );
            }

            Class<?>[] genericParameterTypes =
                classFactory.getClassInspector().getGenericParameterTypes(
                    derbyAggregatorInterface, userAggregatorClass);

            if ( genericParameterTypes == null ) {
                genericParameterTypes = new Class<?>[ AGGREGATOR_PARAM_COUNT ];
            }
View Full Code Here

    SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, null, true);
    return dd.getFileInfoDescriptor(sd,sqlName);
  }

  private void notifyLoader(boolean reload) throws StandardException {
    ClassFactory cf = lcc.getLanguageConnectionFactory().getClassFactory();
    cf.notifyModifyJar(reload);
  }
View Full Code Here

  ) throws StandardException
  {
    GenericAggregator   aggregators[];
        Vector<GenericAggregator>
                tmpAggregators = new Vector<GenericAggregator>();
    ClassFactory    cf = lcc.getLanguageConnectionFactory().getClassFactory();

        for (AggregatorInfo aggInfo : list)
    {
      if (! (eliminateDistincts && aggInfo.isDistinct()))
      // if (eliminateDistincts == aggInfo.isDistinct())
View Full Code Here

    throws StandardException
  {
    LanguageConnectionContext lcc =
      (LanguageConnectionContext) ContextService.getContext
                                          (LanguageConnectionContext.CONTEXT_ID);
    ClassFactory classFactory = lcc.getLanguageConnectionFactory().getClassFactory();

    GeneratedClass gc = classFactory.loadGeneratedClass(className, byteCode);

    /*
    ** No special try catch logic to write out bad classes
    ** here.  We don't expect any problems, and in any
    ** event, we don't have the class builder available
View Full Code Here

    throws StandardException
  {
    LanguageConnectionContext lcc =
      (LanguageConnectionContext) ContextService.getContext
                                          (LanguageConnectionContext.CONTEXT_ID);
    ClassFactory classFactory = lcc.getLanguageConnectionFactory().getClassFactory();

    GeneratedClass gc = classFactory.loadGeneratedClass(className, byteCode);

    /*
    ** No special try catch logic to write out bad classes
    ** here.  We don't expect any problems, and in any
    ** event, we don't have the class builder available
View Full Code Here

        continue;

      /*
      ** Check type compatability.
      */
      ClassFactory cf = getClassFactory();
      if ( !unionCompatible( thisExpr, otherExpr ) )
      {
        throw StandardException.newException(SQLState.LANG_NOT_UNION_COMPATIBLE,
                                                     thisTypeId.getSQLTypeName(),
                                                     otherTypeId.getSQLTypeName(),
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.services.loader.ClassFactory

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.