1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package com.isenshi.util.converter.function;
17
18 import java.util.Properties;
19
20 import org.seasar.tuigwaa.model.core.TgwAttribute;
21 import org.seasar.tuigwaa.model.core.TgwEntity;
22 import org.seasar.tuigwaa.util.TgwNameUtils;
23
24 import com.isenshi.util.functor.UnaryFunction;
25
26 public abstract class ConverterFunction implements UnaryFunction {
27
28 private String sourceField;
29
30 private String targetField;
31
32 private TgwEntity entity;
33
34 public String getSourceField() {
35 return sourceField;
36 }
37
38 public void setSourceField(String sourceField) {
39 this.sourceField = sourceField;
40 }
41
42 public String getTargetField() {
43 return targetField;
44 }
45
46 public void setTargetField(String targetField) {
47 this.targetField = targetField;
48 }
49
50 public TgwEntity getEntity() {
51 return entity;
52 }
53
54 public void setEntity(TgwEntity entity) {
55 this.entity = entity;
56 }
57
58 public TgwAttribute getAttribute() {
59 return getEntity().getField(
60 TgwNameUtils.toPropertyName(getTargetField()));
61 }
62
63 public Properties getExtraProperties(){
64 return null;
65 }
66
67
68
69 }