Commit 1294cbb8 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

protein modification uses string mapping for state

parent 1fe7ff92
......@@ -6,6 +6,8 @@ import java.text.DecimalFormat;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
......@@ -65,6 +67,7 @@ public class ModificationResidue implements Serializable, ElementModification {
/**
* State in which this modification is.
*/
@Enumerated(EnumType.STRING)
private ModificationState state = null;
@Column(name = "position")
......
-- state of modification_residue is mapped via string
alter table modification_residue_table add column state_string varchar(255);
update modification_residue_table set state_string='PHOSPHORYLATED' where state=0;
update modification_residue_table set state_string='ACETYLATED' where state=1;
update modification_residue_table set state_string='UBIQUITINATED' where state=2;
update modification_residue_table set state_string='METHYLATED' where state=3;
update modification_residue_table set state_string='HYDROXYLATED' where state=4;
update modification_residue_table set state_string='MYRISTOYLATED' where state=5;
update modification_residue_table set state_string='SULFATED' where state=6;
update modification_residue_table set state_string='PRENYLATED' where state=7;
update modification_residue_table set state_string='GLYCOSYLATED' where state=8;
update modification_residue_table set state_string='PALMYTOYLATED' where state=9;
update modification_residue_table set state_string='UNKNOWN' where state=10;
update modification_residue_table set state_string='EMPTY' where state=11;
update modification_residue_table set state_string='PROTONATED' where state=12;
update modification_residue_table set state_string='DONT_CARE' where state=13;
alter table modification_residue_table drop column state;
alter table modification_residue_table rename column state_string to state;
......@@ -31,7 +31,7 @@ public class AliasDaoTest extends PersistTestFunctions {
@Before
public void setUp() throws Exception {
project = projectDao.getProjectByProjectId(projectId);
if (project!=null) {
if (project != null) {
projectDao.delete(project);
}
project = new Project();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment