1 /*
2 * Created on 26.04.2004
3 */
4 package org.xpcards.model;
5
6 /***
7 * @author Mikhail Galyutin
8 */
9 public abstract class ProjectSource extends ModelElement {
10
11 /***
12 * Indicates that Project source or model object are outdated
13 * @return
14 */
15 public abstract boolean isModified();
16
17 public abstract void setModified(boolean modified);
18
19 /***
20 * Indicates if the project is opened in Collection
21 * @return
22 */
23 public abstract boolean isOpened();
24
25 public abstract void setOpened(boolean opened);
26
27 /***
28 * Load operation, have to update modified flag
29 */
30 public abstract void updateProject() throws Exception;
31
32 /***
33 * Save opearation, have to update modified flag
34 */
35 public abstract void commitProject() throws Exception;
36
37 /***
38 * @return
39 */
40 public abstract Project getProject();
41
42 /***
43 * @see java.lang.Object#equals(java.lang.Object)
44 */
45 public boolean equals(Object obj) {
46 if ( obj instanceof ProjectSource ) {
47 ProjectSource o = (ProjectSource) obj;
48 if ( isOpened() != o.isOpened()) {
49 return false;
50 }
51 if ( isModified() != o.isModified()) {
52 return false;
53 }
54 if ( getProject() != o.getProject() ) {
55 return false;
56 }
57 return super.equals(obj);
58 }
59 return false;
60 }
61
62 }
This page was automatically generated by Maven