++
рефакторинг бд файлов тестов.
This commit is contained in:
45
src/_VisualDVM/TestingSystem/Common/TestFile/TestFile.java
Normal file
45
src/_VisualDVM/TestingSystem/Common/TestFile/TestFile.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package _VisualDVM.TestingSystem.Common.TestFile;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import _VisualDVM.ProjectData.Files.projectFile_;
|
||||
import _VisualDVM.TestingSystem.Common.Test.Test;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
import java.io.File;
|
||||
public class TestFile extends projectFile_ {
|
||||
@Expose
|
||||
@Description("PRIMARY KEY,AUTOINCREMENT")
|
||||
public int id;
|
||||
public int test_id = CommonConstants.Nan;
|
||||
public String name; //имя относительно корневой папки проекта. не ключ.
|
||||
@Override
|
||||
public Object getPK() {
|
||||
return id;
|
||||
}
|
||||
@Override
|
||||
public Object getEmptyFK() {
|
||||
return CommonConstants.Nan;
|
||||
}
|
||||
@Override
|
||||
public void SynchronizeFields(DBObject src) {
|
||||
super.SynchronizeFields(src);
|
||||
TestFile src_ = (TestFile) src;
|
||||
id = src_.id;
|
||||
test_id = src_.test_id;
|
||||
name = src_.name;
|
||||
}
|
||||
public TestFile() {
|
||||
}
|
||||
public TestFile(Test test) {
|
||||
test_id = test.id;
|
||||
}
|
||||
public TestFile(File file_in){
|
||||
super(file_in);
|
||||
name = file_in.getName();
|
||||
}
|
||||
public TestFile(Test test, File file_in){
|
||||
this(file_in);
|
||||
test_id = test.id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user