Package org.apache.derby.catalog.types

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


   */
  public boolean storable(TypeId otherType, ClassFactory cf)
  {
        if ( !otherType.isUserDefinedTypeId() ) { return false; }

        UserDefinedTypeIdImpl thisTypeID = (UserDefinedTypeIdImpl) getTypeId().getBaseTypeId();
        UserDefinedTypeIdImpl thatTypeID = (UserDefinedTypeIdImpl) otherType.getBaseTypeId();

        if ( thisTypeID.isAnsiUDT() != thatTypeID.isAnsiUDT() ) { return false; }

        if ( thisTypeID.isAnsiUDT() )
        {
            return thisTypeID.getSQLTypeName().equals( thatTypeID.getSQLTypeName() );
        }
       
    return cf.getClassInspector().assignableTo(
         otherType.getCorrespondingJavaTypeName(),
         getTypeId().getCorrespondingJavaTypeName());
View Full Code Here


    public static TypeId getUserDefinedTypeId(String className)
        throws StandardException
    {
        return new TypeId(StoredFormatIds.USERDEFINED_TYPE_ID_V3,
                                new UserDefinedTypeIdImpl(className));
    }
View Full Code Here

        throws StandardException
    {
        return new TypeId
            (
             StoredFormatIds.USERDEFINED_TYPE_ID_V3,
             new UserDefinedTypeIdImpl(schemaName, unqualifiedName, className )
             );
    }
View Full Code Here

                return maxScale;
        }

        private void setUserTypeIdInfo()
        {
                UserDefinedTypeIdImpl baseUserTypeId =
                                                        (UserDefinedTypeIdImpl) baseTypeId;
                typePrecedence = USER_PRECEDENCE;
                javaTypeName = baseUserTypeId.getClassName();
        }
View Full Code Here

        if ( originalDTD.getCatalogType().isRowMultiSet() ) { return bindRowMultiSet( originalDTD ); }
       
        // nothing to do if this is not a user defined type
        if ( !originalDTD.getTypeId().userType() ) { return originalDTD; }

        UserDefinedTypeIdImpl userTypeID = (UserDefinedTypeIdImpl) originalDTD.getTypeId().getBaseTypeId();

        // also nothing to do if the type has already been resolved
        if ( userTypeID.isBound() ) { return originalDTD; }

        // ok, we have an unbound UDT. lookup this type in the data dictionary

        DataDictionary dd = getDataDictionary();
        SchemaDescriptor typeSchema = getSchemaDescriptor( userTypeID.getSchemaName() );
        char  udtNameSpace = AliasInfo.ALIAS_NAME_SPACE_UDT_AS_CHAR;
        String unqualifiedTypeName = userTypeID.getUnqualifiedName();
        AliasDescriptor ad = dd.getAliasDescriptor( typeSchema.getUUID().toString(), unqualifiedTypeName, udtNameSpace );

    if (ad == null)
    {
      throw StandardException.newException(SQLState.LANG_OBJECT_NOT_FOUND, ad.getAliasType(udtNameSpace),  unqualifiedTypeName);
View Full Code Here

        public static TypeId getUserDefinedTypeId(String className, boolean delimitedIdentifier)
            throws StandardException
        {
                return new TypeId(StoredFormatIds.USERDEFINED_TYPE_ID_V3,
                                        new UserDefinedTypeIdImpl(className), delimitedIdentifier
                                        );
        }
View Full Code Here

        throws StandardException
    {
        return new TypeId
            (
             StoredFormatIds.USERDEFINED_TYPE_ID_V3,
             new UserDefinedTypeIdImpl(schemaName, unqualifiedName, className )
             );
    }
View Full Code Here

                return maxScale;
        }

        private void setUserTypeIdInfo()
        {
                UserDefinedTypeIdImpl baseUserTypeId =
                                                        (UserDefinedTypeIdImpl) baseTypeId;
                typePrecedence = USER_PRECEDENCE;
                javaTypeName = baseUserTypeId.getClassName();
        }
View Full Code Here

              new TypeId(judgeTypeFormatId, null),
              judgePrecision,judgeScale,judgeIsNullable,
              judgeMaximumWidth,judgeCollationType,
              judgeCollationDerivation).getNull();
    else
      judge = (DataValueDescriptor) new TypeId(judgeTypeFormatId, new UserDefinedTypeIdImpl()).getNull();
     
    DataValueDescriptor minVal = v1;
    if (v2 != null &&
        (minVal.isNull() || judge.lessThan(v2, minVal).equals(true)))
      minVal = v2;
View Full Code Here

              new TypeId(judgeTypeFormatId, null),
              judgePrecision,judgeScale,judgeIsNullable,
              judgeMaximumWidth,judgeCollationType,
              judgeCollationDerivation).getNull();
    else
      judge =  new TypeId(judgeTypeFormatId, new UserDefinedTypeIdImpl()).getNull();

    DataValueDescriptor maxVal = v1;
    if (v2 != null &&
        (maxVal.isNull() || judge.greaterThan(v2, maxVal).equals(true)))
      maxVal = v2;
View Full Code Here

TOP

Related Classes of org.apache.derby.catalog.types.UserDefinedTypeIdImpl

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.