1 21 22 package org.apache.derby.catalog.types; 23 24 import org.apache.derby.iapi.services.io.StoredFormatIds; 25 import org.apache.derby.iapi.services.io.FormatableInstanceGetter; 26 27 public class TypesImplInstanceGetter extends FormatableInstanceGetter { 28 29 public Object getNewInstance() { 30 31 switch (fmtId) { 32 case StoredFormatIds.BOOLEAN_TYPE_ID_IMPL: 33 case StoredFormatIds.INT_TYPE_ID_IMPL: 34 case StoredFormatIds.SMALLINT_TYPE_ID_IMPL: 35 case StoredFormatIds.TINYINT_TYPE_ID_IMPL: 36 case StoredFormatIds.LONGINT_TYPE_ID_IMPL: 37 case StoredFormatIds.DOUBLE_TYPE_ID_IMPL: 38 case StoredFormatIds.REAL_TYPE_ID_IMPL: 39 case StoredFormatIds.REF_TYPE_ID_IMPL: 40 case StoredFormatIds.CHAR_TYPE_ID_IMPL: 41 case StoredFormatIds.VARCHAR_TYPE_ID_IMPL: 42 case StoredFormatIds.LONGVARCHAR_TYPE_ID_IMPL: 43 case StoredFormatIds.NATIONAL_CHAR_TYPE_ID_IMPL: 44 case StoredFormatIds.NATIONAL_VARCHAR_TYPE_ID_IMPL: 45 case StoredFormatIds.NATIONAL_LONGVARCHAR_TYPE_ID_IMPL: 46 case StoredFormatIds.BIT_TYPE_ID_IMPL: 47 case StoredFormatIds.VARBIT_TYPE_ID_IMPL: 48 case StoredFormatIds.LONGVARBIT_TYPE_ID_IMPL: 49 case StoredFormatIds.DATE_TYPE_ID_IMPL: 50 case StoredFormatIds.TIME_TYPE_ID_IMPL: 51 case StoredFormatIds.TIMESTAMP_TYPE_ID_IMPL: 52 case StoredFormatIds.BLOB_TYPE_ID_IMPL: 53 case StoredFormatIds.CLOB_TYPE_ID_IMPL: 54 case StoredFormatIds.NCLOB_TYPE_ID_IMPL: 55 case StoredFormatIds.XML_TYPE_ID_IMPL: 56 return new BaseTypeIdImpl(fmtId); 57 case StoredFormatIds.DECIMAL_TYPE_ID_IMPL: 58 return new DecimalTypeIdImpl(); 59 default: 60 return null; 61 } 62 } 63 } 64 | Popular Tags |