aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/com/iciql/SelectColumn.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/iciql/SelectColumn.java')
-rw-r--r--src/main/java/com/iciql/SelectColumn.java59
1 files changed, 29 insertions, 30 deletions
diff --git a/src/main/java/com/iciql/SelectColumn.java b/src/main/java/com/iciql/SelectColumn.java
index 43a1a93..ef39703 100644
--- a/src/main/java/com/iciql/SelectColumn.java
+++ b/src/main/java/com/iciql/SelectColumn.java
@@ -21,37 +21,36 @@ import com.iciql.TableDefinition.FieldDefinition;
/**
* This class represents a column of a table in a query.
- *
- * @param <T>
- * the table data type
+ *
+ * @param <T> the table data type
*/
class SelectColumn<T> {
- private SelectTable<T> selectTable;
- private FieldDefinition fieldDef;
-
- SelectColumn(SelectTable<T> table, FieldDefinition fieldDef) {
- this.selectTable = table;
- this.fieldDef = fieldDef;
- }
-
- void appendSQL(SQLStatement stat) {
- if (selectTable.getQuery().isJoin()) {
- stat.appendSQL(selectTable.getAs() + "." + fieldDef.columnName);
- } else {
- stat.appendColumn(fieldDef.columnName);
- }
- }
-
- FieldDefinition getFieldDefinition() {
- return fieldDef;
- }
-
- SelectTable<T> getSelectTable() {
- return selectTable;
- }
-
- Object getCurrentValue() {
- return fieldDef.getValue(selectTable.getCurrent());
- }
+ private SelectTable<T> selectTable;
+ private FieldDefinition fieldDef;
+
+ SelectColumn(SelectTable<T> table, FieldDefinition fieldDef) {
+ this.selectTable = table;
+ this.fieldDef = fieldDef;
+ }
+
+ void appendSQL(SQLStatement stat) {
+ if (selectTable.getQuery().isJoin()) {
+ stat.appendSQL(selectTable.getAs() + "." + fieldDef.columnName);
+ } else {
+ stat.appendColumn(fieldDef.columnName);
+ }
+ }
+
+ FieldDefinition getFieldDefinition() {
+ return fieldDef;
+ }
+
+ SelectTable<T> getSelectTable() {
+ return selectTable;
+ }
+
+ Object getCurrentValue() {
+ return fieldDef.getValue(selectTable.getCurrent());
+ }
}