перенос метода получающего поле объекта для отображения
This commit is contained in:
@@ -452,4 +452,17 @@ public class Message extends FileObject {
|
||||
return !(o instanceof FileObjectWithMessages) || ((FileObjectWithMessages) o).HasMessage(this);
|
||||
} else return false;
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
return group_s;
|
||||
case 2:
|
||||
return line;
|
||||
case 3:
|
||||
return value;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,19 +18,6 @@ public class MessagesDBTable<M extends Message> extends iDBTable<M> {
|
||||
super(d_in);
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(M object, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
return object.group_s;
|
||||
case 2:
|
||||
return object.line;
|
||||
case 3:
|
||||
return object.value;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public Comparator<M> getComparator() {
|
||||
return Comparator.comparingInt(o -> o.line);
|
||||
}
|
||||
|
||||
@@ -45,4 +45,13 @@ public class MessageRecommendation extends iDBObject {
|
||||
public boolean isVisible() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
return text;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,15 +34,6 @@ public class RecommendationsDBTable extends iDBTable<MessageRecommendation> {
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(MessageRecommendation object, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
return object.text;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public String getSingleDescription() {
|
||||
return "рекомендация";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user