-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathPromotionColumn.java
More file actions
78 lines (69 loc) · 2.07 KB
/
PromotionColumn.java
File metadata and controls
78 lines (69 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.teradata.tpcds.column;
import com.teradata.tpcds.Table;
import static com.teradata.tpcds.Table.PROMOTION;
import static com.teradata.tpcds.column.ColumnTypes.IDENTIFIER;
import static com.teradata.tpcds.column.ColumnTypes.INTEGER;
import static com.teradata.tpcds.column.ColumnTypes.character;
import static com.teradata.tpcds.column.ColumnTypes.decimal;
import static com.teradata.tpcds.column.ColumnTypes.varchar;
public enum PromotionColumn
implements Column
{
P_PROMO_SK(IDENTIFIER),
P_PROMO_ID(character(16)),
P_START_DATE_SK(IDENTIFIER),
P_END_DATE_SK(IDENTIFIER),
P_ITEM_SK(IDENTIFIER),
P_COST(decimal(15, 2)),
P_RESPONSE_TARGET(INTEGER),
P_PROMO_NAME(character(50)),
P_CHANNEL_DMAIL(character(1)),
P_CHANNEL_EMAIL(character(1)),
P_CHANNEL_CATALOG(character(1)),
P_CHANNEL_TV(character(1)),
P_CHANNEL_RADIO(character(1)),
P_CHANNEL_PRESS(character(1)),
P_CHANNEL_EVENT(character(1)),
P_CHANNEL_DEMO(character(1)),
P_CHANNEL_DETAILS(varchar(100)),
P_PURPOSE(character(15)),
P_DISCOUNT_ACTIVE(character(1));
private final ColumnType type;
PromotionColumn(ColumnType type)
{
this.type = type;
}
@Override
public Table getTable()
{
return PROMOTION;
}
@Override
public String getName()
{
return name().toLowerCase();
}
@Override
public ColumnType getType()
{
return type;
}
@Override
public int getPosition()
{
return ordinal();
}
}