Package org.apache.derby.catalog.types

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


                                /* Is this type orderable? */

                                // For user java classes we are orderable if we
                                // implement java.lang.Orderable (JDK1.2) or
                                // have a int compareTo(Object) method (JDK1.1 or JDK1.2)
                                UserDefinedTypeIdImpl baseUserTypeId =
                                                                                (UserDefinedTypeIdImpl) baseTypeId;

                                String className = baseUserTypeId.getClassName();

                                try
                                {
                                        Class c = cf.getClassInspector().getClass(className);
                                        orderable = java.lang.Comparable.class.isAssignableFrom(c);
View Full Code Here


    }

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

                return maxScale;
        }

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

                                /* Is this type orderable? */

                                // For user java classes we are orderable if we
                                // implement java.lang.Orderable (JDK1.2) or
                                // have a int compareTo(Object) method (JDK1.1 or JDK1.2)
                                UserDefinedTypeIdImpl baseUserTypeId =
                                                                                (UserDefinedTypeIdImpl) baseTypeId;

                                String className = baseUserTypeId.getClassName();

                                try
                                {
                                        Class c = cf.getClassInspector().getClass(className);
                                        orderable = java.lang.Comparable.class.isAssignableFrom(c);
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, AliasDescriptor.getAliasType(udtNameSpace),  unqualifiedTypeName);
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, AliasDescriptor.getAliasType(udtNameSpace),  unqualifiedTypeName);
View Full Code Here

    /** Get the AliasDescriptor of a UDT */
    public  AliasDescriptor getUDTDesc( DataTypeDescriptor dtd )
        throws StandardException
    {
        UserDefinedTypeIdImpl userTypeID = (UserDefinedTypeIdImpl) dtd.getTypeId().getBaseTypeId();

        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 );

        return ad;
    }
View Full Code Here

              judgePrecision,judgeScale,judgeIsNullable,
              judgeMaximumWidth,judgeCollationType,
              judgeCollationDerivation).getNull();
        } else {
            judge = new TypeId(judgeTypeFormatId,
                               new UserDefinedTypeIdImpl()).getNull();
        }
     
    DataValueDescriptor minVal = v1;
    if (v2 != null &&
        (minVal.isNull() || judge.lessThan(v2, minVal).equals(true)))
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

  {
        if ( getTypeId().getBaseTypeId().isAnsiUDT() )
        {
            if ( !otherType.getBaseTypeId().isAnsiUDT() ) { return false; }
           
            UserDefinedTypeIdImpl thisTypeID = (UserDefinedTypeIdImpl) getTypeId().getBaseTypeId();
            UserDefinedTypeIdImpl thatTypeID = (UserDefinedTypeIdImpl) otherType.getBaseTypeId();
           
            return thisTypeID.getSQLTypeName().equals( thatTypeID.getSQLTypeName() );
        }
       
    /*
    ** We are a non-ANSI user defined type, we are
    ** going to have to let the client find out
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.