46 lines
1.3 KiB
Java
46 lines
1.3 KiB
Java
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; //имя относительно корневой папки проекта. не ключ.
|
|
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;
|
|
}
|
|
@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;
|
|
}
|
|
}
|