Examples of TypeDescriptorImpl


Examples of org.apache.derby.catalog.types.TypeDescriptorImpl

      }
    }
    else
    {
      String promoteName = null;
      TypeDescriptorImpl returnType = (TypeDescriptorImpl) routineInfo.getReturnType();
      String requiredType;
      if (returnType == null)
      {
        // must have a void method for a procedure call.
        requiredType = "void";
      }
      else
      {
        TypeId returnTypeId = TypeId.getBuiltInTypeId(returnType.getJDBCTypeId());

        if (
            returnType.isRowMultiSet() &&
            ( routineInfo.getParameterStyle() == RoutineAliasInfo.PS_DERBY_JDBC_RESULT_SET )
        )
        {
            requiredType = ResultSet.class.getName();
        }
                else if ( returnType.getTypeId().userType() )
                {
                    requiredType = ((UserDefinedTypeIdImpl) returnType.getTypeId()).getClassName();
                }
        else
        {
           requiredType = returnTypeId.getCorrespondingJavaTypeName();

          if (!requiredType.equals(typeName)) {
            switch (returnType.getJDBCTypeId()) {
            case java.sql.Types.BOOLEAN:
            case java.sql.Types.SMALLINT:
            case java.sql.Types.INTEGER:
            case java.sql.Types.BIGINT:
            case java.sql.Types.REAL:
View Full Code Here

Examples of org.apache.derby.catalog.types.TypeDescriptorImpl

     * @param catalogType
     * @return TypeId that represents the base type, null if not applicable.
     */
    public static TypeId getTypeId(TypeDescriptor catalogType)
    {
        TypeDescriptorImpl tdi = (TypeDescriptorImpl) catalogType;
        final int jdbcType = catalogType.getJDBCTypeId();
        TypeId typeId = TypeId.getBuiltInTypeId(jdbcType);
        if (typeId != null)
            return typeId;
       
        if (jdbcType == Types.JAVA_OBJECT) {
            return new TypeId( StoredFormatIds.USERDEFINED_TYPE_ID_V3, tdi.getTypeId() );
        }

        if ( tdi.isRowMultiSet() )
        {
            return new TypeId( StoredFormatIds.ROW_MULTISET_TYPE_ID_IMPL, tdi.getTypeId() );
        }
       
        return null;
    }
View Full Code Here

Examples of org.apache.derby.catalog.types.TypeDescriptorImpl

   */
  public DataTypeDescriptor(TypeId typeId, int precision, int scale,
    boolean isNullable, int maximumWidth)
  {
    this.typeId = typeId;
    typeDescriptor = new TypeDescriptorImpl(typeId.getBaseTypeId(),
                        precision,
                        scale,
                        isNullable,
                        maximumWidth);
  }
View Full Code Here

Examples of org.apache.derby.catalog.types.TypeDescriptorImpl

   */
  public DataTypeDescriptor(TypeId typeId, boolean isNullable,
    int maximumWidth)
  {
    this.typeId = typeId;
    typeDescriptor = new TypeDescriptorImpl(typeId.getBaseTypeId(),
                        isNullable,
                        maximumWidth);
  }
View Full Code Here

Examples of org.apache.derby.catalog.types.TypeDescriptorImpl


  public DataTypeDescriptor(TypeId typeId, boolean isNullable) {

    this.typeId = typeId;
    typeDescriptor = new TypeDescriptorImpl(typeId.getBaseTypeId(),
                        typeId.getMaximumPrecision(),
                        typeId.getMaximumScale(),
                        isNullable,
                        typeId.getMaximumMaximumWidth());
  }
View Full Code Here

Examples of org.apache.derby.catalog.types.TypeDescriptorImpl

                        typeId.getMaximumMaximumWidth());
  }
  public DataTypeDescriptor(DataTypeDescriptor source, boolean isNullable)
  {
    this.typeId = source.typeId;
    typeDescriptor = new TypeDescriptorImpl(source.typeDescriptor,
                        source.getPrecision(),
                        source.getScale(),
                        isNullable,
                        source.getMaximumWidth());
  }
View Full Code Here

Examples of org.apache.derby.catalog.types.TypeDescriptorImpl

                int scale,
                boolean isNullable,
                int maximumWidth)
  {
    this.typeId = source.typeId;
    typeDescriptor = new TypeDescriptorImpl(source.typeDescriptor,
                        precision,
                        scale,
                        isNullable,
                        maximumWidth);
  }
View Full Code Here

Examples of org.apache.derby.catalog.types.TypeDescriptorImpl

   */
  public DataTypeDescriptor(DataTypeDescriptor source, boolean isNullable,
    int maximumWidth)
  {
    this.typeId = source.typeId;
    typeDescriptor = new TypeDescriptorImpl(source.typeDescriptor,
                        isNullable,
                        maximumWidth);
  }
View Full Code Here

Examples of org.apache.derby.catalog.types.TypeDescriptorImpl

    String          colName = null;
    String          defaultID = null;
    String          tabID = null;
    Integer          colID = null;
    TypeDescriptorImpl    typeDesc = null;
    Object          defaultSerializable = null;
    long          autoincStart = 0;
    long          autoincInc = 0;
    //The SYSCOLUMNS table's autoinc related columns change with different
    //values depending on what happened to the autoinc column, ie is the
View Full Code Here

Examples of org.apache.derby.catalog.types.TypeDescriptorImpl

    ** intended to be movable to the client, so they don't have
    ** the entire implementation.  We need to wrap them in DataTypeServices
    ** and TypeId objects that contain the full implementations for
    ** language processing.
    */
    TypeDescriptorImpl typeDescriptor = (TypeDescriptorImpl) row.getColumn(SYSCOLUMNS_COLUMNDATATYPE).
                          getObject();
    typeId = typeDescriptor.getTypeId();

    /*
    ** The BaseTypeIdImpl tells what type of TypeId it is supposed to
    ** be wrapped in.
    */
 
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.