EMMA Coverage Report (generated Wed Jun 28 22:15:27 PDT 2006)
[all classes][org.apache.derby.iapi.sql]

COVERAGE SUMMARY FOR SOURCE FILE [StatementUtil.java]

nameclass, %method, %block, %line, %
StatementUtil.java100% (1/1)67%  (2/3)87%  (41/47)71%  (5/7)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class StatementUtil100% (1/1)67%  (2/3)87%  (41/47)71%  (5/7)
<static initializer> 100% (1/1)100% (32/32)100% (1/1)
StatementUtil (): void 0%   (0/1)0%   (0/3)0%   (0/1)
typeName (int): String 100% (1/1)75%  (9/12)80%  (4/5)

1/*
2 
3   Derby - Class org.apache.derby.iapi.sql.StatementUtil
4 
5   Copyright 2000, 2004 The Apache Software Foundation or its licensors, as applicable.
6 
7   Licensed under the Apache License, Version 2.0 (the "License");
8   you may not use this file except in compliance with the License.
9   You may obtain a copy of the License at
10 
11      http://www.apache.org/licenses/LICENSE-2.0
12 
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18 
19 */
20 
21package org.apache.derby.iapi.sql;
22 
23import org.apache.derby.iapi.error.StandardException;
24import org.apache.derby.iapi.services.i18n.MessageService;
25import org.apache.derby.iapi.reference.SQLState;
26 
27/**
28 * Utilities for dealing with statements.
29 *
30 * @author jeff
31 */
32public class StatementUtil
33{
34        private StatementUtil(){};        // Do not instantiate
35 
36        public static String typeName(int typeNumber)
37        {
38                String retval;
39 
40                switch (typeNumber)
41                {
42                  case StatementType.INSERT:
43                  case StatementType.BULK_INSERT_REPLACE:
44                  case StatementType.UPDATE:
45                  case StatementType.DELETE:
46                  case StatementType.ENABLED:
47                  case StatementType.DISABLED:
48                        retval = TypeNames[typeNumber];
49                        break;
50 
51                  default:
52                        retval = MessageService.getTextMessage(SQLState.LANG_UNKNOWN);
53                        break;
54                }
55 
56                return retval;
57        }
58 
59        private static final String[] TypeNames = 
60                                { 
61                                        "",
62                                        "INSERT",
63                                        "INSERT",
64                                        "UPDATE",
65                                        "DELETE",
66                                        "ENABLED",
67                                        "DISABLED"
68                                };
69}

[all classes][org.apache.derby.iapi.sql]
EMMA 2.0.5312 (C) Vladimir Roubtsov