Clover coverage report - brownies library - 1.0-beta-1
Coverage timestamp: 月 8 16 2004 17:14:42 GMT+09:00
file stats: LOC: 81   Methods: 7
NCLOC: 29   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
Fields.java - 60% 71.4% 64.7%
coverage coverage
 1   
 /*
 2   
  * Joey and its relative products are published under the terms
 3   
  * of the Apache Software License.
 4   
  */
 5   
 /*
 6   
  * Created on 2004/02/21
 7   
  */
 8   
 package org.asyrinx.brownie.core.sql;
 9   
 
 10   
 /**
 11   
  * @author akima
 12   
  */
 13   
 public class Fields extends Elements {
 14   
 
 15   
     /**
 16   
      *  
 17   
      */
 18  9
     public Fields(IBuilder builder) {
 19  9
         super(builder);
 20   
     }
 21   
 
 22   
     private String delimiter = ", ";
 23   
 
 24   
     /**
 25   
      * フィールド群を追加します。
 26   
      * 
 27   
      * @param fields
 28   
      */
 29  0
     public Fields addNewFields() {
 30  0
         final Fields result = new Fields(this.builder);
 31  0
         super.addImpl(result);
 32  0
         return result;
 33   
     }
 34   
 
 35   
     /**
 36   
      * フィールドを追加します。
 37   
      * 
 38   
      * @param field
 39   
      */
 40  6
     public Fields add(String field) {
 41  6
         return add(null, field, null);
 42   
     }
 43   
 
 44   
     /**
 45   
      * テーブル(エイリアス)名、フィールド名、フィールドエイリアス名、関数名を指定して フィールドを追加するメソッドです。 <br>
 46   
      * 例1: [フィールド名] 例2: [フィールド名] as [フィールドエイリアス名] 例3: [テーブル(エイリアス)名].[フィールド名]
 47   
      * 例4: [テーブル(エイリアス)名].[フィールド名] as [フィールドエイリアス名]
 48   
      */
 49  6
     public Fields add(String tableAlias, String fieldName, String aliasName) {
 50  6
         return add(tableAlias, fieldName, aliasName, null);
 51   
     }
 52   
 
 53   
     /**
 54   
      * テーブル(エイリアス)名、フィールド名、フィールドエイリアス名、関数名を指定して フィールドを追加するメソッドです。 <br>
 55   
      * 例1: [フィールド名] 例2: [フィールド名] as [フィールドエイリアス名] 例3: [テーブル(エイリアス)名].[フィールド名]
 56   
      * 例4: [テーブル(エイリアス)名].[フィールド名] as [フィールドエイリアス名] 例5: [関数名] ( [フィールド名] ) 例6:
 57   
      * [関数名] ( [フィールド名] ) as [フィールドエイリアス名] 例7: [関数名] ( [テーブル(エイリアス)名].[フィールド名] )
 58   
      * as [フィールドエイリアス名]
 59   
      */
 60  6
     public Fields add(String tableAlias, String fieldName, String aliasName,
 61   
             String functionName) {
 62  6
         super.addImpl(builder.buildField(tableAlias, fieldName, aliasName,
 63   
                 functionName));
 64  6
         return this;
 65   
     }
 66   
 
 67   
     /**
 68   
      * @return
 69   
      */
 70  4
     public String getDelimiter() {
 71  4
         return delimiter;
 72   
     }
 73   
 
 74   
     /**
 75   
      * @param string
 76   
      */
 77  0
     public void setDelimiter(String string) {
 78  0
         delimiter = string;
 79   
     }
 80   
 
 81   
 }