|
|||||||||||||||||||
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 | - | 76.9% | 80% | 77.8% |
|
1 |
/*
|
|
2 |
* Joey and its relative products are published under the terms
|
|
3 |
* of the Apache Software License.
|
|
4 |
*/
|
|
5 |
/*
|
|
6 |
* Created on 2004/03/01
|
|
7 |
*/
|
|
8 |
package org.asyrinx.brownie.core.sql2;
|
|
9 |
|
|
10 |
/**
|
|
11 |
* @author akima
|
|
12 |
*/
|
|
13 |
public class Fields extends Elements { |
|
14 |
|
|
15 | 18 |
public void accept(Visitor visitor) { |
16 | 18 |
visitor.visit(this);
|
17 |
} |
|
18 |
|
|
19 |
/**
|
|
20 |
* フィールド群を追加します。
|
|
21 |
*
|
|
22 |
* @param fields
|
|
23 |
*/
|
|
24 | 0 |
public Fields addNewFields() {
|
25 | 0 |
final Fields result = new Fields();
|
26 | 0 |
super.addImpl(result);
|
27 | 0 |
return result;
|
28 |
} |
|
29 |
|
|
30 |
/**
|
|
31 |
* フィールドを追加します。
|
|
32 |
*
|
|
33 |
* @param field
|
|
34 |
*/
|
|
35 | 15 |
public Fields add(String field) {
|
36 | 15 |
return add(null, field, null); |
37 |
} |
|
38 |
|
|
39 |
/**
|
|
40 |
* テーブル(エイリアス)名、フィールド名、フィールドエイリアス名、関数名を指定して フィールドを追加するメソッドです。 <br>
|
|
41 |
* 例1: [フィールド名] 例2: [フィールド名] as [フィールドエイリアス名] 例3: [テーブル(エイリアス)名].[フィールド名]
|
|
42 |
* 例4: [テーブル(エイリアス)名].[フィールド名] as [フィールドエイリアス名]
|
|
43 |
*/
|
|
44 | 15 |
public Fields add(String tableAlias, String fieldName, String aliasName) {
|
45 | 15 |
return add(tableAlias, fieldName, aliasName, null); |
46 |
} |
|
47 |
|
|
48 |
/**
|
|
49 |
* テーブル(エイリアス)名、フィールド名、フィールドエイリアス名、関数名を指定して フィールドを追加するメソッドです。 <br>
|
|
50 |
* 例1: [フィールド名] 例2: [フィールド名] as [フィールドエイリアス名] 例3: [テーブル(エイリアス)名].[フィールド名]
|
|
51 |
* 例4: [テーブル(エイリアス)名].[フィールド名] as [フィールドエイリアス名] 例5: [関数名] ( [フィールド名] ) 例6:
|
|
52 |
* [関数名] ( [フィールド名] ) as [フィールドエイリアス名] 例7: [関数名] ( [テーブル(エイリアス)名].[フィールド名] )
|
|
53 |
* as [フィールドエイリアス名]
|
|
54 |
*/
|
|
55 | 15 |
public Fields add(String tableAlias, String fieldName, String aliasName,
|
56 |
String functionName) { |
|
57 | 15 |
final Field result = new Field();
|
58 | 15 |
result.setTableAlias(tableAlias); |
59 | 15 |
result.setFieldName(fieldName); |
60 | 15 |
result.setAliasName(aliasName); |
61 | 15 |
result.setFunctionName(functionName); |
62 | 15 |
addImpl(result); |
63 | 15 |
return this; |
64 |
} |
|
65 |
|
|
66 |
} |
|