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

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


    private boolean unionCompatible( ValueNode left, ValueNode right )
        throws StandardException
    {
        TypeId leftTypeId = left.getTypeId();
        TypeId rightTypeId = right.getTypeId();
        ClassFactory cf = getClassFactory();

        if (
            !left.getTypeCompiler().storable(rightTypeId, cf) &&
            !right.getTypeCompiler().storable(leftTypeId, cf)
            )
View Full Code Here


          SubqueryList    subqueryList,
          Vector        aggregateVector)
      throws StandardException
  {
    DataTypeDescriptor   dts = null;
    ClassFactory    cf;

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

    instantiateAggDef();

    /* Add ourselves to the aggregateVector before we do anything else */
    aggregateVector.addElement(this);
 
View Full Code Here

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

    int count = list.size();
    for (int i = 0; i < count; i++)
    {
      AggregatorInfo aggInfo = (AggregatorInfo) list.elementAt(i);
View Full Code Here

         )
        throws SQLException
    {
        try {
      CompilerContext cc = (CompilerContext) ContextService.getContext( CompilerContext.CONTEXT_ID );
            ClassFactory    classFactory = cc.getClassFactory();

            String              toolClassName = findToolClassName( toolName, optionalArgs );           
            OptionalTool    tool = null;

            try {
                tool = (OptionalTool) classFactory.loadApplicationClass( toolClassName ).newInstance();
            }
            catch (ClassNotFoundException cnfe) { throw wrap( cnfe ); }
            catch (InstantiationException ie) { throw wrap( ie ); }
            catch (IllegalAccessException iae) { throw wrap( iae ); }
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();
            int sz = rightOperandList.size();
            for (int i = 0; i < sz; i++) {
                ValueNode vn = (ValueNode) rightOperandList.elementAt(i);
                targetType = targetType.getDominantType(
                        vn.getTypeServices(), cf);
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

    private boolean unionCompatible( ValueNode left, ValueNode right )
        throws StandardException
    {
        TypeId leftTypeId = left.getTypeId();
        TypeId rightTypeId = right.getTypeId();
        ClassFactory cf = getClassFactory();

        if (
            !left.getTypeCompiler().storable(rightTypeId, cf) &&
            !right.getTypeCompiler().storable(leftTypeId, cf)
            )
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 ]; }

            AggregateAliasInfo  aai = (AggregateAliasInfo) _alias.getAliasInfo();
            DataTypeDescriptor  expectedInputType = DataTypeDescriptor.getType( aai.getForType() );
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

    private boolean unionCompatible( ValueNode left, ValueNode right )
        throws StandardException
    {
        TypeId leftTypeId = left.getTypeId();
        TypeId rightTypeId = right.getTypeId();
        ClassFactory cf = getClassFactory();

        if (
            !left.getTypeCompiler().storable(rightTypeId, cf) &&
            !right.getTypeCompiler().storable(leftTypeId, cf)
            )
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.