@Test public void getColumnLineWithNoTableAndCustomType_returnsJustTheColumnName(){ final ViewModelColumn viewModelColumn = new ViewModelColumn("NAME", "COLUMN_NAME", Column.Type.text, "VARCHAR(256)"); final String viewModelColumnLine = viewModelColumn.getColumnLine(); assertThat(viewModelColumnLine).isEqualTo("COLUMN_NAME"); }
@Override public String getColumnLine() { if (mColumn != null) { final String modelTableName = mColumn.getSqlName(); final String modelColumnName = mColumn.getName(); final StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(modelTableName); stringBuilder.append('.'); stringBuilder.append(modelColumnName); final String source = stringBuilder.toString(); return getColumnLine(source); } else if (mCustomSelection != null) { return getColumnLine(mCustomSelection); } final StringBuilder stringBuilder = new StringBuilder(); final String name = getName(); stringBuilder.append(name); return stringBuilder.toString(); }
ViewModelColumn extends Column { @Override public String getColumnLine() { if (mColumn != null) { final String modelTableName = mColumn.getSqlName(); final String modelColumnName = mColumn.getName(); final StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(modelTableName); stringBuilder.append('.'); stringBuilder.append(modelColumnName); final String source = stringBuilder.toString(); return getColumnLine(source); } else if (mCustomSelection != null) { return getColumnLine(mCustomSelection); } final StringBuilder stringBuilder = new StringBuilder(); final String name = getName(); stringBuilder.append(name); return stringBuilder.toString(); } }
ViewModelColumn extends Column { @Override public String getColumnLine() { if (mColumn != null) { final String modelTableName = mColumn.getSqlName(); final String modelColumnName = mColumn.getName(); final StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(modelTableName); stringBuilder.append('.'); stringBuilder.append(modelColumnName); final String source = stringBuilder.toString(); return getColumnLine(source); } else if (mCustomSelection != null) { return getColumnLine(mCustomSelection); } final StringBuilder stringBuilder = new StringBuilder(); final String name = getName(); stringBuilder.append(name); return stringBuilder.toString(); } ViewModelColumn(final String viewName, final String name, final Type type, final String stringType);  ViewModelColumn(final String viewName, final String name, final Type type);  ViewModelColumn(final String viewName, final String name, final Column column);  ViewModelColumn(final String viewName, final Column column);  ViewModelColumn(final String viewName, final String name, final String customSelection, final Type type); }
ViewModelColumn extends Column { @Override public String getColumnLine() { if (mColumn != null) { final String modelTableName = mColumn.getSqlName(); final String modelColumnName = mColumn.getName(); final StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(modelTableName); stringBuilder.append('.'); stringBuilder.append(modelColumnName); final String source = stringBuilder.toString(); return getColumnLine(source); } else if (mCustomSelection != null) { return getColumnLine(mCustomSelection); } final StringBuilder stringBuilder = new StringBuilder(); final String name = getName(); stringBuilder.append(name); return stringBuilder.toString(); } ViewModelColumn(final String viewName, final String name, final Type type, final String stringType);  ViewModelColumn(final String viewName, final String name, final Type type);  ViewModelColumn(final String viewName, final String name, final Column column);  ViewModelColumn(final String viewName, final Column column);  ViewModelColumn(final String viewName, final String name, final String customSelection, final Type type); @Override String getColumnLine(); }
ViewModelColumn extends Column { @Override public String getColumnLine() { if (mColumn != null) { final String modelTableName = mColumn.getSqlName(); final String modelColumnName = mColumn.getName(); final StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(modelTableName); stringBuilder.append('.'); stringBuilder.append(modelColumnName); final String source = stringBuilder.toString(); return getColumnLine(source); } else if (mCustomSelection != null) { return getColumnLine(mCustomSelection); } final StringBuilder stringBuilder = new StringBuilder(); final String name = getName(); stringBuilder.append(name); return stringBuilder.toString(); } ViewModelColumn(final String viewName, final String name, final Type type, final String stringType);  ViewModelColumn(final String viewName, final String name, final Type type);  ViewModelColumn(final String viewName, final String name, final Column column);  ViewModelColumn(final String viewName, final Column column);  ViewModelColumn(final String viewName, final String name, final String customSelection, final Type type); @Override String getColumnLine();  }