1 21 22 package org.apache.derby.iapi.sql; 23 24 import org.apache.derby.iapi.error.StandardException; 25 import org.apache.derby.iapi.services.i18n.MessageService; 26 import org.apache.derby.iapi.reference.SQLState; 27 28 33 public class StatementUtil 34 { 35 private StatementUtil(){}; 37 public static String typeName(int typeNumber) 38 { 39 String retval; 40 41 switch (typeNumber) 42 { 43 case StatementType.INSERT: 44 case StatementType.BULK_INSERT_REPLACE: 45 case StatementType.UPDATE: 46 case StatementType.DELETE: 47 case StatementType.ENABLED: 48 case StatementType.DISABLED: 49 retval = TypeNames[typeNumber]; 50 break; 51 52 default: 53 retval = MessageService.getTextMessage(SQLState.LANG_UNKNOWN); 54 break; 55 } 56 57 return retval; 58 } 59 60 private static final String [] TypeNames = 61 { 62 "", 63 "INSERT", 64 "INSERT", 65 "UPDATE", 66 "DELETE", 67 "ENABLED", 68 "DISABLED" 69 }; 70 } 71 | Popular Tags |