Skip to content

Commit

Permalink
fix :: added ART Object support #3
Browse files Browse the repository at this point in the history
  • Loading branch information
nrudenko committed Jun 2, 2014
1 parent 9141ab3 commit af5ba58
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ public String getColumnsSql() {

StringBuilder columnsSql = new StringBuilder(getName());
columnsSql
.append(" ")
.append(type.getSqlRep());
.append(" ")
.append(type.getSqlRep());

if (customAdditional != null) {
columnsSql
.append(" ")
.append(customAdditional);
.append(" ")
.append(customAdditional);
}
return columnsSql.toString();
}
Expand All @@ -64,12 +64,16 @@ public Column as(Column column) {
return new Column(getName() + " AS " + column.getName());
}

public boolean isCorrect() {
return name != null && name.length() > 0 && type != null && type != DbType.NO_TYPE;
}

@Override
public String toString() {
return "Column{" +
"name='" + name + '\'' +
", type=" + type +
", customAdditional='" + customAdditional + '\'' +
'}';
"name='" + name + '\'' +
", type=" + type +
", customAdditional='" + customAdditional + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public ArrayList<Column> getColumns() {
for (int i = 0; i < classFields.size(); i++) {
Field field = classFields.get(i);
Column column = ReflectionUtils.fieldToColumn(field);

This comment has been minimized.

Copy link
@bosicc

bosicc Jun 2, 2014

We will have still two additional columns for next fields:
private transient Class<?> shadow$klass;
private transient int shadow$monitor;

if (column != null) {
if (column != null && column.isCorrect()) {
result.add(column);
}
}
Expand Down

0 comments on commit af5ba58

Please sign in to comment.