Перенос.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package GlobalData.SapforProfileSetting;
|
||||
import Common.Current;
|
||||
import Common.Database.iDBObject;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
public class SapforProfileSetting extends iDBObject {
|
||||
@Description("DEFAULT 'Undefined'")
|
||||
public SettingName name = SettingName.Undefined;
|
||||
@Description("DEFAULT ''")
|
||||
public String value = "";
|
||||
@Description("DEFAULT -1")
|
||||
public int sapforprofile_id = Utils.Nan;
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Current.HasSapforProfile() && Current.getSapforProfile().id == sapforprofile_id;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package GlobalData.SapforProfileSetting;
|
||||
import Common.Current;
|
||||
import Common.Database.iDBTable;
|
||||
import Common.UI.DataSetControlForm;
|
||||
public class SapforProfileSettingsDBTable extends iDBTable<SapforProfileSetting> {
|
||||
public SapforProfileSettingsDBTable() {
|
||||
super(SapforProfileSetting.class);
|
||||
}
|
||||
@Override
|
||||
protected DataSetControlForm createUI() {
|
||||
return new DataSetControlForm(this){
|
||||
@Override
|
||||
protected void AdditionalInitColumns() {
|
||||
columns.get(0).setVisible(false);
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Current CurrentName() {
|
||||
return Current.SapforProfileSetting;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
return new String[]{
|
||||
"имя",
|
||||
"значение"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(SapforProfileSetting object, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
return object.name.getDescription();
|
||||
case 2:
|
||||
return object.value;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user