Package org.apache.derby.iapi.types

Examples of org.apache.derby.iapi.types.JSQLType


      }
      else
      {
        DataTypeDescriptor dtd = value.getTypeServices();
        if (dtd != null)
          jsqlType = new JSQLType( dtd );
      }
    }

    return jsqlType;
  }
View Full Code Here


        return DataTypeDescriptor.getSQLDataTypeDescriptor( getJavaTypeName()) ;
    }

  public boolean isPrimitiveType() throws StandardException
  {
    JSQLType  myType = getJSQLType();
   
    if ( myType == null ) { return false; }
    else { return ( myType.getCategory() == JSQLType.JAVA_PRIMITIVE ); }
  }
View Full Code Here

    else { return ( myType.getCategory() == JSQLType.JAVA_PRIMITIVE ); }
  }

  public String getJavaTypeName() throws StandardException
  {
    JSQLType  myType = getJSQLType();

    if ( myType == null ) { return ""; }

    switch( myType.getCategory() )
    {
        case JSQLType.JAVA_CLASS: return myType.getJavaClassName();

        case JSQLType.JAVA_PRIMITIVE: return JSQLType.getPrimitiveName( myType.getPrimitiveKind() );

        default:

        if (SanityManager.DEBUG)
        { SanityManager.THROWASSERT( "Inappropriate JSQLType: " + myType ); }
View Full Code Here

    return "";
  }

  public void setJavaTypeName(String javaTypeName)
  {
    jsqlType = new JSQLType( javaTypeName );
  }
View Full Code Here

  }

  public String getPrimitiveTypeName()
    throws StandardException
  {
    JSQLType  myType = getJSQLType();

    if ( myType == null ) { return ""; }

    switch( myType.getCategory() )
    {
        case JSQLType.JAVA_PRIMITIVE: return JSQLType.getPrimitiveName( myType.getPrimitiveKind() );

        default:

        if (SanityManager.DEBUG)
        { SanityManager.THROWASSERT( "Inappropriate JSQLType: " + myType ); }
View Full Code Here

  String[]  getPrimitiveSignature( boolean castToPrimitiveAsNecessary )
    throws StandardException
  {
    int          count = signature.length;
    String[]       primParmTypeNames = new String[ count ];
    JSQLType      jsqlType;

    for (int i = 0; i < count; i++)
    {
      jsqlType = signature[ i ];

      if ( jsqlType == null ) { primParmTypeNames[i] = ""; }
      else
      {
        switch( jsqlType.getCategory() )
          {
              case JSQLType.SQLTYPE:

            if ((procedurePrimitiveArrayType != null)
              && (i < procedurePrimitiveArrayType.length)
              && (procedurePrimitiveArrayType[i] != null)) {

              primParmTypeNames[i] = procedurePrimitiveArrayType[i];

            } else {


              TypeId  ctid = mapToTypeID( jsqlType );

              if (ctid.isNumericTypeId() || ctid.isBooleanTypeId())
              {
                TypeCompiler tc = getTypeCompiler(ctid);
                primParmTypeNames[i] = tc.getCorrespondingPrimitiveTypeName();
                if ( castToPrimitiveAsNecessary) { methodParms[i].castToPrimitive(true); }
              }
              else { primParmTypeNames[i] = ctid.getCorrespondingJavaTypeName(); }
            }

            break;

                case JSQLType.JAVA_CLASS:

            primParmTypeNames[i] = jsqlType.getJavaClassName();
            break;

                case JSQLType.JAVA_PRIMITIVE:

            primParmTypeNames[i] = JSQLType.primitiveNames[ jsqlType.getPrimitiveKind() ];
            if ( castToPrimitiveAsNecessary) { methodParms[i].castToPrimitive(true); }
            break;

                default:
View Full Code Here

  /* Name of field holding receiver value, if any */
  private LocalField receiverField;

  public boolean isPrimitiveType() throws StandardException
  {
    JSQLType  myType = getJSQLType();
   
    if ( myType == null ) { return false; }
    else { return ( myType.getCategory() == JSQLType.JAVA_PRIMITIVE ); }
  }
View Full Code Here

    else { return ( myType.getCategory() == JSQLType.JAVA_PRIMITIVE ); }
  }

  public String getJavaTypeName() throws StandardException
  {
    JSQLType  myType = getJSQLType();

    if ( myType == null ) { return ""; }

    switch( myType.getCategory() )
    {
        case JSQLType.JAVA_CLASS: return myType.getJavaClassName();

        case JSQLType.JAVA_PRIMITIVE: return JSQLType.primitiveNames[ myType.getPrimitiveKind() ];

        default:

        if (SanityManager.DEBUG)
        { SanityManager.THROWASSERT( "Inappropriate JSQLType: " + myType ); }
View Full Code Here

    return "";
  }

  public void setJavaTypeName(String javaTypeName)
  {
    jsqlType = new JSQLType( javaTypeName );
  }
View Full Code Here

  }

  public String getPrimitiveTypeName()
    throws StandardException
  {
    JSQLType  myType = getJSQLType();

    if ( myType == null ) { return ""; }

    switch( myType.getCategory() )
    {
        case JSQLType.JAVA_PRIMITIVE: return JSQLType.primitiveNames[ myType.getPrimitiveKind() ];

        default:

        if (SanityManager.DEBUG)
        { SanityManager.THROWASSERT( "Inappropriate JSQLType: " + myType ); }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.types.JSQLType

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.