1
2 package olr.om;
3
4
5 import java.util.List;
6
7 import org.apache.torque.TorqueException;
8 import org.apache.torque.om.Persistent;
9
10 /***
11 * The skeleton for this class was autogenerated by Torque on:
12 *
13 * [Fri Jun 18 10:10:23 CEST 2004]
14 *
15 * You should add additional methods to this class to meet the
16 * application requirements. This class will only be generated as
17 * long as it does not already exist in the output directory.
18 */
19 public class Model extends olr.om.BaseModel implements Persistent
20 {
21 public Model()
22 {
23 this.setIsCourse(false);
24 }
25
26 public Model(String name, boolean isCourse)
27 throws TorqueException
28 {
29 this.setName(name);
30 this.setRdfUser(OmContext.getUser());
31 this.setIsCourse(isCourse);
32 }
33
34 public int[] getModelStatementIds() throws Exception
35 {
36 final List modelStatements = getModelStatements();
37 final int[] ids = new int[modelStatements.size()];
38
39 for(int i=0; i<modelStatements.size(); i++)
40 ids[i] = ((ModelStatement)modelStatements.get(i)).getStatementId();
41
42 return ids;
43 }
44 }