import java.io.Serializable;
import org.splat.dal.bo.kernel.Persistent;
-import org.splat.dal.dao.som.Database;
import org.splat.kernel.InvalidPropertyException;
import org.splat.service.technical.ProjectSettingsService;
-import org.splat.service.technical.ProjectSettingsService.Step;
-import org.splat.service.technical.ProjectSettingsServiceImpl;
public class SimulationContextType extends Persistent implements Serializable {
// Persistent fields
private String name;
private ProgressState state;
- private int step;
+ private int step;
// Required by the serialization
private static final long serialVersionUID = 4819425038576161242L;
public ProjectSettingsService.Step getStep () {
return step;
}
- public Properties setState (ProgressState state) {
+ public Properties setProgressState (ProgressState state) {
this.state = state;
return this;
}
// Public member functions
// ==============================================================================================================================
- public boolean approve () {
-// -------------------------
- if (state != ProgressState.inCHECK) return false;
- this.state = ProgressState.APPROVED; // The type name is supposed being localized
- Database.getSession().update(this);
- return true;
- }
-
public boolean equals(Object entity) {
// ------------------------------------
if (entity == null) return false;
}
}
- public ProjectSettingsService.Step getAttachedStep () {
-// ----------------------------------------------
- return ProjectSettingsServiceImpl.getStep(step);
- }
-
public String getName () {
// ------------------------
return name;
// ----------------------------
return (state == ProgressState.APPROVED);
}
+ /**
+ * Get the state.
+ * @return the state
+ */
+ public ProgressState getState() {
+ return state;
+ }
+ /**
+ * Set the state.
+ * @param state the state to set
+ */
+ public void setState(ProgressState state) {
+ this.state = state;
+ }
+ /**
+ * Get the step.
+ * @return the step
+ */
+ public int getStep() {
+ return step;
+ }
+ /**
+ * Set the step.
+ * @param step the step to set
+ */
+ public void setStep(int step) {
+ this.step = step;
+ }
+
}
\ No newline at end of file