summaryrefslogtreecommitdiff
path: root/orkbasej/java
diff options
context:
space:
mode:
authorRalph Atallah <ralphat@users.sourceforge.net>2008-11-17 18:34:22 +0000
committerRalph Atallah <ralphat@users.sourceforge.net>2008-11-17 18:34:22 +0000
commit5768f0fa6a9f6a13183336e2587ca99e7a43936b (patch)
tree73022494d9b6db118b508302935b2f13760ba4e1 /orkbasej/java
parent8278fd69bdca293e4e8a094dcdb7d985c97f3b7d (diff)
IMPORTANT NOTE: With this commit, OrkWeb and OrkTrack are NO LONGER COMPATIBLE WITH PREVIOUS VERSIONS!
- Modified classes and underlying SQL table names by prefixing them with "ork". This allows oreka to run in any database without risk of collision with existing tables. - Now using MySQLInnoDBDialect to access DB instead of MySQLMyISAMDialect. - Fixed Browse page filtering to allow open-ended start and end dates git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@570 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasej/java')
-rw-r--r--orkbasej/java/mysql.hbm.template.xml2
-rw-r--r--orkbasej/java/net/sf/oreka/HibernateManager.java46
-rw-r--r--orkbasej/java/net/sf/oreka/bo/UserBo.java10
-rw-r--r--orkbasej/java/net/sf/oreka/persistent/AnnotationsTest.java24
-rw-r--r--orkbasej/java/net/sf/oreka/persistent/OrkDomain.java (renamed from orkbasej/java/net/sf/oreka/persistent/Domain.java)190
-rw-r--r--orkbasej/java/net/sf/oreka/persistent/OrkLoginString.java (renamed from orkbasej/java/net/sf/oreka/persistent/LoginString.java)262
-rw-r--r--orkbasej/java/net/sf/oreka/persistent/OrkPort.java (renamed from orkbasej/java/net/sf/oreka/persistent/RecPort.java)74
-rw-r--r--orkbasej/java/net/sf/oreka/persistent/OrkPortFace.java (renamed from orkbasej/java/net/sf/oreka/persistent/RecPortFace.java)106
-rw-r--r--orkbasej/java/net/sf/oreka/persistent/OrkProgram.java (renamed from orkbasej/java/net/sf/oreka/persistent/RecProgram.java)1024
-rw-r--r--orkbasej/java/net/sf/oreka/persistent/OrkSegment.java (renamed from orkbasej/java/net/sf/oreka/persistent/RecSegment.java)666
-rw-r--r--orkbasej/java/net/sf/oreka/persistent/OrkService.java (renamed from orkbasej/java/net/sf/oreka/persistent/Service.java)352
-rw-r--r--orkbasej/java/net/sf/oreka/persistent/OrkSession.java (renamed from orkbasej/java/net/sf/oreka/persistent/RecSession.java)164
-rw-r--r--orkbasej/java/net/sf/oreka/persistent/OrkTape.java (renamed from orkbasej/java/net/sf/oreka/persistent/RecTape.java)524
-rw-r--r--orkbasej/java/net/sf/oreka/persistent/OrkUser.java (renamed from orkbasej/java/net/sf/oreka/persistent/User.java)420
-rw-r--r--orkbasej/java/net/sf/oreka/srvc/UserService.java4
-rw-r--r--orkbasej/java/net/sf/oreka/srvc/UserServiceHbn.java66
-rw-r--r--orkbasej/java/net/sf/oreka/srvc/test/UserServiceHbnTest.java10
-rw-r--r--orkbasej/java/net/sf/oreka/test/FillDatabase.java38
-rw-r--r--orkbasej/java/net/sf/oreka/test/FillDatabaseProgram.java8
-rw-r--r--orkbasej/java/net/sf/oreka/test/FillDatabaseUser.java12
20 files changed, 2001 insertions, 2001 deletions
diff --git a/orkbasej/java/mysql.hbm.template.xml b/orkbasej/java/mysql.hbm.template.xml
index 2ff47f4..3806981 100644
--- a/orkbasej/java/mysql.hbm.template.xml
+++ b/orkbasej/java/mysql.hbm.template.xml
@@ -4,7 +4,7 @@
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
- <property name="hibernate.dialect">org.hibernate.dialect.MySQLMyISAMDialect</property>
+ <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/test</property>
<property name="hibernate.connection.password">password</property>
diff --git a/orkbasej/java/net/sf/oreka/HibernateManager.java b/orkbasej/java/net/sf/oreka/HibernateManager.java
index a22c44c..729ece0 100644
--- a/orkbasej/java/net/sf/oreka/HibernateManager.java
+++ b/orkbasej/java/net/sf/oreka/HibernateManager.java
@@ -21,16 +21,16 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Properties;
-import net.sf.oreka.persistent.Domain;
-import net.sf.oreka.persistent.LoginString;
-import net.sf.oreka.persistent.RecPort;
-import net.sf.oreka.persistent.RecPortFace;
-import net.sf.oreka.persistent.RecProgram;
-import net.sf.oreka.persistent.RecSegment;
-import net.sf.oreka.persistent.RecSession;
-import net.sf.oreka.persistent.RecTape;
-import net.sf.oreka.persistent.Service;
-import net.sf.oreka.persistent.User;
+import net.sf.oreka.persistent.OrkDomain;
+import net.sf.oreka.persistent.OrkLoginString;
+import net.sf.oreka.persistent.OrkPort;
+import net.sf.oreka.persistent.OrkPortFace;
+import net.sf.oreka.persistent.OrkProgram;
+import net.sf.oreka.persistent.OrkSegment;
+import net.sf.oreka.persistent.OrkSession;
+import net.sf.oreka.persistent.OrkTape;
+import net.sf.oreka.persistent.OrkService;
+import net.sf.oreka.persistent.OrkUser;
import org.apache.log4j.Logger;
import org.hibernate.HibernateException;
@@ -84,16 +84,16 @@ public class HibernateManager {
config.setProperty("hibernate.proxool.pool_alias", alias);
config.setProperty("hibernate.proxool.existing_pool", "true");
- config.addAnnotatedClass(RecProgram.class);
- config.addAnnotatedClass(RecSession.class);
- config.addAnnotatedClass(RecSegment.class);
- config.addAnnotatedClass(RecTape.class);
- config.addAnnotatedClass(User.class);
- config.addAnnotatedClass(LoginString.class);
- config.addAnnotatedClass(Domain.class);
- config.addAnnotatedClass(Service.class);
- config.addAnnotatedClass(RecPort.class);
- config.addAnnotatedClass(RecPortFace.class);
+ config.addAnnotatedClass(OrkProgram.class);
+ config.addAnnotatedClass(OrkSession.class);
+ config.addAnnotatedClass(OrkSegment.class);
+ config.addAnnotatedClass(OrkTape.class);
+ config.addAnnotatedClass(OrkUser.class);
+ config.addAnnotatedClass(OrkLoginString.class);
+ config.addAnnotatedClass(OrkDomain.class);
+ config.addAnnotatedClass(OrkService.class);
+ config.addAnnotatedClass(OrkPort.class);
+ config.addAnnotatedClass(OrkPortFace.class);
sessionFactory = config.buildSessionFactory();
// Add admin user if does not exist yet
@@ -103,13 +103,13 @@ public class HibernateManager {
{
hbnSession = getSession();
tx = hbnSession.beginTransaction();
- User admin = (User)hbnSession.get(User.class, 1);
+ OrkUser admin = (OrkUser)hbnSession.get(OrkUser.class, 1);
if(admin == null) {
- admin = new User();
+ admin = new OrkUser();
admin.setPassword("admin");
admin.setFirstname("adminfn");
admin.setLastname("adminln");
- LoginString ls = new LoginString();
+ OrkLoginString ls = new OrkLoginString();
ls.setUser(admin);
ls.setLoginString("admin");
hbnSession.save(admin);
diff --git a/orkbasej/java/net/sf/oreka/bo/UserBo.java b/orkbasej/java/net/sf/oreka/bo/UserBo.java
index f5ef2ea..315b82b 100644
--- a/orkbasej/java/net/sf/oreka/bo/UserBo.java
+++ b/orkbasej/java/net/sf/oreka/bo/UserBo.java
@@ -3,15 +3,15 @@ package net.sf.oreka.bo;
import java.io.Serializable;
import java.util.Iterator;
-import net.sf.oreka.persistent.LoginString;
-import net.sf.oreka.persistent.User;
+import net.sf.oreka.persistent.OrkLoginString;
+import net.sf.oreka.persistent.OrkUser;
import org.apache.log4j.Logger;
public class UserBo implements Serializable {
static Logger logger = Logger.getLogger(UserBo.class);
- private User user = new User();
+ private OrkUser user = new OrkUser();
private boolean selected = false;
@@ -36,11 +36,11 @@ public class UserBo implements Serializable {
return false;
}
- public User getUser() {
+ public OrkUser getUser() {
return user;
}
- public void setUser(User user) {
+ public void setUser(OrkUser user) {
this.user = user;
}
diff --git a/orkbasej/java/net/sf/oreka/persistent/AnnotationsTest.java b/orkbasej/java/net/sf/oreka/persistent/AnnotationsTest.java
index 43a973a..aae1f91 100644
--- a/orkbasej/java/net/sf/oreka/persistent/AnnotationsTest.java
+++ b/orkbasej/java/net/sf/oreka/persistent/AnnotationsTest.java
@@ -77,16 +77,16 @@ public class AnnotationsTest {
config.configure("hsqldb.hbm.xml");
config.addAnnotatedClass(AnnotatedTestClass.class);
- config.addAnnotatedClass(RecProgram.class);
- config.addAnnotatedClass(RecSession.class);
- config.addAnnotatedClass(RecSegment.class);
- config.addAnnotatedClass(RecTape.class);
- config.addAnnotatedClass(User.class);
- config.addAnnotatedClass(LoginString.class);
- config.addAnnotatedClass(Domain.class);
- config.addAnnotatedClass(Service.class);
- config.addAnnotatedClass(RecPort.class);
- config.addAnnotatedClass(RecPortFace.class);
+ config.addAnnotatedClass(OrkProgram.class);
+ config.addAnnotatedClass(OrkSession.class);
+ config.addAnnotatedClass(OrkSegment.class);
+ config.addAnnotatedClass(OrkTape.class);
+ config.addAnnotatedClass(OrkUser.class);
+ config.addAnnotatedClass(OrkLoginString.class);
+ config.addAnnotatedClass(OrkDomain.class);
+ config.addAnnotatedClass(OrkService.class);
+ config.addAnnotatedClass(OrkPort.class);
+ config.addAnnotatedClass(OrkPortFace.class);
SessionFactory sessions = config.buildSessionFactory();
Session session = sessions.openSession();
@@ -279,7 +279,7 @@ public class AnnotationsTest {
tx = session.beginTransaction();
System.out.println("hello");
- RecSegment seg = new RecSegment();
+ OrkSegment seg = new OrkSegment();
GregorianCalendar cal = new GregorianCalendar();
Date now = cal.getTime();
seg.setTimestamp(now);
@@ -296,7 +296,7 @@ public class AnnotationsTest {
.list()
.iterator();
if(segments.hasNext()) {
- RecSegment seg2 = (RecSegment)segments.next();
+ OrkSegment seg2 = (OrkSegment)segments.next();
System.out.println("db timestamp:" + seg2.getTimestamp().getTime() + " my:" + now.getTime());
}
else {
diff --git a/orkbasej/java/net/sf/oreka/persistent/Domain.java b/orkbasej/java/net/sf/oreka/persistent/OrkDomain.java
index 7a0926b..ab5c955 100644
--- a/orkbasej/java/net/sf/oreka/persistent/Domain.java
+++ b/orkbasej/java/net/sf/oreka/persistent/OrkDomain.java
@@ -1,95 +1,95 @@
-/*
- * Oreka -- A media capture and retrieval platform
- *
- * Copyright (C) 2005, orecx LLC
- *
- * http://www.orecx.com
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License.
- * Please refer to http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-/**
- *
- */
-package net.sf.oreka.persistent;
-import java.io.Serializable;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratorType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-/**
- * @hibernate.class
- */
-@Entity
-@Table(name = "domain")
-public class Domain implements Serializable {
-
- private int id;
- private String name = "";
- private String description = "";
-
- /**
- *
- */
- public Domain() {
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the description.
- */
- public String getDescription() {
- return description;
- }
-
-
- /**
- * @param description The description to set.
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
-
- /**
- * @hibernate.id
- * generator-class="native"
- * @return Returns the id.
- */
- @Id(generate=GeneratorType.AUTO)
- public int getId() {
- return id;
- }
-
-
- /**
- * @param id The id to set.
- */
- public void setId(int id) {
- this.id = id;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the name.
- */
- public String getName() {
- return name;
- }
-
-
- /**
- * @param name The name to set.
- */
- public void setName(String name) {
- this.name = name;
- }
-}
+/*
+ * Oreka -- A media capture and retrieval platform
+ *
+ * Copyright (C) 2005, orecx LLC
+ *
+ * http://www.orecx.com
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License.
+ * Please refer to http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+/**
+ *
+ */
+package net.sf.oreka.persistent;
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratorType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+/**
+ * @hibernate.class
+ */
+@Entity
+@Table(name = "orkdomain")
+public class OrkDomain implements Serializable {
+
+ private int id;
+ private String name = "";
+ private String description = "";
+
+ /**
+ *
+ */
+ public OrkDomain() {
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the description.
+ */
+ public String getDescription() {
+ return description;
+ }
+
+
+ /**
+ * @param description The description to set.
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+
+ /**
+ * @hibernate.id
+ * generator-class="native"
+ * @return Returns the id.
+ */
+ @Id(generate=GeneratorType.AUTO)
+ public int getId() {
+ return id;
+ }
+
+
+ /**
+ * @param id The id to set.
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the name.
+ */
+ public String getName() {
+ return name;
+ }
+
+
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+}
diff --git a/orkbasej/java/net/sf/oreka/persistent/LoginString.java b/orkbasej/java/net/sf/oreka/persistent/OrkLoginString.java
index c650859..98f6722 100644
--- a/orkbasej/java/net/sf/oreka/persistent/LoginString.java
+++ b/orkbasej/java/net/sf/oreka/persistent/OrkLoginString.java
@@ -1,131 +1,131 @@
-/*
- * Oreka -- A media capture and retrieval platform
- *
- * Copyright (C) 2005, orecx LLC
- *
- * http://www.orecx.com
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License.
- * Please refer to http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-/**
- *
- */
-package net.sf.oreka.persistent;
-
-import java.io.Serializable;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratorType;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-/**
- * @hibernate.class
- */
-@Entity
-@Table(name = "loginstring")
-public class LoginString implements Serializable {
-
- private int id;
- private String loginString;
- private User user;
- private Domain domain;
-
- /**
- * @hibernate.many-to-one
- * @return Returns the domain.
- */
- @ManyToOne
- public Domain getDomain() {
- return domain;
- }
-
-
- /**
- * @param domain The domain to set.
- */
- public void setDomain(Domain domain) {
- this.domain = domain;
- }
-
-
- /**
- * @hibernate.id
- * generator-class="native"
- * @return Returns the id.
- */
- @Id(generate=GeneratorType.AUTO)
- public int getId() {
- return id;
- }
-
-
- /**
- * @param id The id to set.
- */
- public void setId(int id) {
- this.id = id;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the loginString.
- */
- public String getLoginString() {
- return loginString;
- }
-
-
- /**
- * @param loginString The loginString to set.
- */
- public void setLoginString(String loginString) {
- this.loginString = loginString;
- }
-
-
- /**
- * @hibernate.many-to-one
- * @return Returns the user.
- */
- @ManyToOne
- public User getUser() {
- return user;
- }
-
-
- /**
- * @param user The user to set.
- */
- public void setUser(User user) {
- this.user = user;
- }
-
-// public void bidirSetUser(User user) {
-// this.user = user;
-// if(user != null) {
-// user.getLoginStrings().add(this);
-// }
-// }
-//
-// public void bidirRemoveUser(User user) {
-// this.user = null;
-// if(user != null) {
-// user.getLoginStrings().remove(this);
-// }
-// }
-
- /**
- *
- */
- public LoginString() {
- }
-
-}
+/*
+ * Oreka -- A media capture and retrieval platform
+ *
+ * Copyright (C) 2005, orecx LLC
+ *
+ * http://www.orecx.com
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License.
+ * Please refer to http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+/**
+ *
+ */
+package net.sf.oreka.persistent;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratorType;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+/**
+ * @hibernate.class
+ */
+@Entity
+@Table(name = "orkloginstring")
+public class OrkLoginString implements Serializable {
+
+ private int id;
+ private String loginString;
+ private OrkUser user;
+ private OrkDomain domain;
+
+ /**
+ * @hibernate.many-to-one
+ * @return Returns the domain.
+ */
+ @ManyToOne
+ public OrkDomain getDomain() {
+ return domain;
+ }
+
+
+ /**
+ * @param domain The domain to set.
+ */
+ public void setDomain(OrkDomain domain) {
+ this.domain = domain;
+ }
+
+
+ /**
+ * @hibernate.id
+ * generator-class="native"
+ * @return Returns the id.
+ */
+ @Id(generate=GeneratorType.AUTO)
+ public int getId() {
+ return id;
+ }
+
+
+ /**
+ * @param id The id to set.
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the loginString.
+ */
+ public String getLoginString() {
+ return loginString;
+ }
+
+
+ /**
+ * @param loginString The loginString to set.
+ */
+ public void setLoginString(String loginString) {
+ this.loginString = loginString;
+ }
+
+
+ /**
+ * @hibernate.many-to-one
+ * @return Returns the user.
+ */
+ @ManyToOne
+ public OrkUser getUser() {
+ return user;
+ }
+
+
+ /**
+ * @param user The user to set.
+ */
+ public void setUser(OrkUser user) {
+ this.user = user;
+ }
+
+// public void bidirSetUser(User user) {
+// this.user = user;
+// if(user != null) {
+// user.getLoginStrings().add(this);
+// }
+// }
+//
+// public void bidirRemoveUser(User user) {
+// this.user = null;
+// if(user != null) {
+// user.getLoginStrings().remove(this);
+// }
+// }
+
+ /**
+ *
+ */
+ public OrkLoginString() {
+ }
+
+}
diff --git a/orkbasej/java/net/sf/oreka/persistent/RecPort.java b/orkbasej/java/net/sf/oreka/persistent/OrkPort.java
index ebd83d0..f3de87d 100644
--- a/orkbasej/java/net/sf/oreka/persistent/RecPort.java
+++ b/orkbasej/java/net/sf/oreka/persistent/OrkPort.java
@@ -1,37 +1,37 @@
-/*
- * Oreka -- A media capture and retrieval platform
- *
- * Copyright (C) 2005, orecx LLC
- *
- * http://www.orecx.com
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License.
- * Please refer to http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-package net.sf.oreka.persistent;
-
-import java.io.Serializable;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratorType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-@Entity
-@Table(name = "recport")
-public class RecPort implements Serializable {
-
- private int id;
-
- @Id(generate=GeneratorType.AUTO)
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-}
+/*
+ * Oreka -- A media capture and retrieval platform
+ *
+ * Copyright (C) 2005, orecx LLC
+ *
+ * http://www.orecx.com
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License.
+ * Please refer to http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+package net.sf.oreka.persistent;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratorType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "orkport")
+public class OrkPort implements Serializable {
+
+ private int id;
+
+ @Id(generate=GeneratorType.AUTO)
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+}
diff --git a/orkbasej/java/net/sf/oreka/persistent/RecPortFace.java b/orkbasej/java/net/sf/oreka/persistent/OrkPortFace.java
index e1671d6..c1704d0 100644
--- a/orkbasej/java/net/sf/oreka/persistent/RecPortFace.java
+++ b/orkbasej/java/net/sf/oreka/persistent/OrkPortFace.java
@@ -1,53 +1,53 @@
-/*
- * Oreka -- A media capture and retrieval platform
- *
- * Copyright (C) 2005, orecx LLC
- *
- * http://www.orecx.com
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License.
- * Please refer to http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-package net.sf.oreka.persistent;
-
-import java.io.Serializable;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-@Entity
-@Table(name = "recportface")
-public class RecPortFace implements Serializable {
-
- private RecPort recPort;
- private Service service;
- private String name;
-
- @Id
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- @ManyToOne
- public RecPort getRecPort() {
- return recPort;
- }
- public void setRecPort(RecPort recPort) {
- this.recPort = recPort;
- }
- @ManyToOne
- public Service getService() {
- return service;
- }
- public void setService(Service service) {
- this.service = service;
- }
-
-}
+/*
+ * Oreka -- A media capture and retrieval platform
+ *
+ * Copyright (C) 2005, orecx LLC
+ *
+ * http://www.orecx.com
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License.
+ * Please refer to http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+package net.sf.oreka.persistent;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "orkportface")
+public class OrkPortFace implements Serializable {
+
+ private OrkPort port;
+ private OrkService service;
+ private String name;
+
+ @Id
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ @ManyToOne
+ public OrkPort getPort() {
+ return port;
+ }
+ public void setPort(OrkPort recPort) {
+ this.port = recPort;
+ }
+ @ManyToOne
+ public OrkService getService() {
+ return service;
+ }
+ public void setService(OrkService service) {
+ this.service = service;
+ }
+
+}
diff --git a/orkbasej/java/net/sf/oreka/persistent/RecProgram.java b/orkbasej/java/net/sf/oreka/persistent/OrkProgram.java
index 206ff69..6b0bb5f 100644
--- a/orkbasej/java/net/sf/oreka/persistent/RecProgram.java
+++ b/orkbasej/java/net/sf/oreka/persistent/OrkProgram.java
@@ -1,512 +1,512 @@
-/*
- * Oreka -- A media capture and retrieval platform
- *
- * Copyright (C) 2005, orecx LLC
- *
- * http://www.orecx.com
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License.
- * Please refer to http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-/**
- *
- */
-package net.sf.oreka.persistent;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-import java.util.Collection;
-import java.util.Date;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratorType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinTable;
-import javax.persistence.ManyToMany;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-import net.sf.oreka.Cycle;
-import net.sf.oreka.Day;
-import net.sf.oreka.Direction;
-
-/**
- * @hibernate.class
- */
-@Entity
-@Table(name = "recprogram")
-public class RecProgram implements Serializable {
-
- private int id;
- private String name = "";
- private String description = "";
- private boolean discarded = false;
- private Date timestamp;
- private User owner;
- private boolean active = true;
- private Direction direction = Direction.ALL;
- private int minDuration = 0;
- private int maxDuration = 0;
- private double randomPercent = 0.0;
- private Cycle cycle = Cycle.PERMANENT;
- private Day startDay = Day.UNKN;
- private Day stopDay = Day.UNKN;
- private Date startTime = null;
- private Date stopTime = null;
- private int recPerCycle = 0;
- private int recordedSoFar = 0;
- private String localParty = "";
- private String remoteParty = "";
- private int keepForHours = 0;
- private User targetUser;
- private RecPort targetPort;
-
- //private Set RecSegments;
- private Collection<RecSegment> recSegments;
-
- /**
- * @hibernate.set
- * lazy="true"
- * table="PrgToSeg"
- * @hibernate.collection-key
- * column="RecProgram"
- * @hibernate.collection-many-to-many
- * column="RecSegment"
- * class="net.sf.oreka.persistent.RecSegment"
- * @return Returns the recSegments.
- */
- @ManyToMany
-// (
-// targetEntity="net.sf.oreka.persistent.RecSegment"
-// )
- @JoinTable(
- table=@Table(name="progtoseg"),
- joinColumns={@JoinColumn(name="ProgId")},
- inverseJoinColumns={@JoinColumn(name="SegId")}
- )
- public Collection<RecSegment> getRecSegments() {
- return recSegments;
- }
-
-
- /**
- * @param recSegments The recSegments to set.
- */
- public void setRecSegments(Collection<RecSegment> recSegments) {
- this.recSegments = recSegments;
- }
-
-
- public RecProgram () {
- SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
- try {
- startTime = sdf.parse("00:00:00");
- stopTime = sdf.parse("00:00:00");
- }
- catch (Exception e) {;}
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the active.
- */
- public boolean isActive() {
- return active;
- }
-
-
- /**
- * @param active The active to set.
- */
- public void setActive(boolean active) {
- this.active = active;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the cycle.
- */
- public Cycle getCycle() {
- return cycle;
- }
-
-
- /**
- * @param cycle The cycle to set.
- */
- public void setCycle(Cycle cycle) {
- this.cycle = cycle;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the description.
- */
- public String getDescription() {
- return description;
- }
-
-
- /**
- * @param description The description to set.
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the direction.
- */
- public Direction getDirection() {
- return direction;
- }
-
-
- /**
- * @param direction The direction to set.
- */
- public void setDirection(Direction direction) {
- this.direction = direction;
- }
-
-
- /**
- * @return Returns the discarded.
- */
- public boolean isDiscarded() {
- return discarded;
- }
-
-
- /**
- * @param discarded The discarded to set.
- */
- public void setDiscarded(boolean discarded) {
- this.discarded = discarded;
- }
-
-
- /**
- * @hibernate.id
- * generator-class="native"
- * @return Returns the id.
- */
- @Id(generate=GeneratorType.AUTO)
- public int getId() {
- return id;
- }
-
-
- /**
- * @param id The id to set.
- */
- public void setId(int id) {
- this.id = id;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the keepForHours.
- */
- public int getKeepForHours() {
- return keepForHours;
- }
-
-
- /**
- * @param keepForHours The keepForHours to set.
- */
- public void setKeepForHours(int keepForHours) {
- this.keepForHours = keepForHours;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the localParty.
- */
- public String getLocalParty() {
- return localParty;
- }
-
-
- /**
- * @param localParty The localParty to set.
- */
- public void setLocalParty(String localParty) {
- this.localParty = localParty;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the maxDuration.
- */
- public int getMaxDuration() {
- return maxDuration;
- }
-
-
- /**
- * @param maxDuration The maxDuration to set.
- */
- public void setMaxDuration(int maxDuration) {
- this.maxDuration = maxDuration;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the minDuration.
- */
- public int getMinDuration() {
- return minDuration;
- }
-
-
- /**
- * @param minDuration The minDuration to set.
- */
- public void setMinDuration(int minDuration) {
- this.minDuration = minDuration;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the name.
- */
- public String getName() {
- return name;
- }
-
-
- /**
- * @param name The name to set.
- */
- public void setName(String name) {
- this.name = name;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the randomPercent.
- */
- public double getRandomPercent() {
- return randomPercent;
- }
-
-
- /**
- * @param randomPercent The randomPercent to set.
- */
- public void setRandomPercent(double randomPercent) {
- this.randomPercent = randomPercent;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the recordedSoFar.
- */
- public int getRecordedSoFar() {
- return recordedSoFar;
- }
-
-
- /**
- * @param recordedSoFar The recordedSoFar to set.
- */
- public void setRecordedSoFar(int recordedSoFar) {
- this.recordedSoFar = recordedSoFar;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the recPerCycle.
- */
- public int getRecPerCycle() {
- return recPerCycle;
- }
-
-
- /**
- * @param recPerCycle The recPerCycle to set.
- */
- public void setRecPerCycle(int recPerCycle) {
- this.recPerCycle = recPerCycle;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the remoteParty.
- */
- public String getRemoteParty() {
- return remoteParty;
- }
-
-
- /**
- * @param remoteParty The remoteParty to set.
- */
- public void setRemoteParty(String remoteParty) {
- this.remoteParty = remoteParty;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the startTime.
- */
- public Date getStartTime() {
- return startTime;
- }
-
-
- /**
- * @param startTime The startTime to set.
- */
- public void setStartTime(Date startTime) {
- this.startTime = startTime;
- }
-
-
- public Day getStartDay() {
- return startDay;
- }
-
-
-
- public void setStartDay(Day startDay) {
- this.startDay = startDay;
- }
-
-
-
- public Day getStopDay() {
- return stopDay;
- }
-
-
-
- public void setStopDay(Day stopDay) {
- this.stopDay = stopDay;
- }
-
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the stopTime.
- */
- public Date getStopTime() {
- return stopTime;
- }
-
-
- /**
- * @param stopTime The stopTime to set.
- */
- public void setStopTime(Date stopTime) {
- this.stopTime = stopTime;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the targetPort.
- */
- @ManyToOne
- public RecPort getTargetPort() {
- return targetPort;
- }
-
-
- /**
- * @param targetPort The targetPort to set.
- */
- public void setTargetPort(RecPort targetPort) {
- this.targetPort = targetPort;
- }
-
- /**
- * @hibernate.many-to-one
- * @return Returns the targetUser.
- */
- @ManyToOne
- public User getTargetUser() {
- return targetUser;
- }
-
-
-
- /**
- * @param targetUser The targetUser to set.
- */
- public void setTargetUser(User targetUser) {
- this.targetUser = targetUser;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the timestamp.
- */
- public Date getTimestamp() {
- return timestamp;
- }
-
-
- /**
- * @param timestamp The timestamp to set.
- */
- public void setTimestamp(Date timestamp) {
- this.timestamp = timestamp;
- }
-
-
- /**
- * @hibernate.many-to-one
- * @return Returns the owner.
- */
- @ManyToOne
- public User getOwner() {
- return owner;
- }
-
-
-
- /**
- * @param owner The owner to set.
- */
- public void setOwner(User owner) {
- this.owner = owner;
- }
-}
+/*
+ * Oreka -- A media capture and retrieval platform
+ *
+ * Copyright (C) 2005, orecx LLC
+ *
+ * http://www.orecx.com
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License.
+ * Please refer to http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+/**
+ *
+ */
+package net.sf.oreka.persistent;
+
+import java.io.Serializable;
+import java.text.SimpleDateFormat;
+import java.util.Collection;
+import java.util.Date;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratorType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.JoinTable;
+import javax.persistence.ManyToMany;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+import net.sf.oreka.Cycle;
+import net.sf.oreka.Day;
+import net.sf.oreka.Direction;
+
+/**
+ * @hibernate.class
+ */
+@Entity
+@Table(name = "orkprogram")
+public class OrkProgram implements Serializable {
+
+ private int id;
+ private String name = "";
+ private String description = "";
+ private boolean discarded = false;
+ private Date timestamp;
+ private OrkUser creator;
+ private boolean active = true;
+ private Direction direction = Direction.ALL;
+ private int minDuration = 0;
+ private int maxDuration = 0;
+ private double randomPercent = 0.0;
+ private Cycle cycle = Cycle.PERMANENT;
+ private Day startDay = Day.UNKN;
+ private Day stopDay = Day.UNKN;
+ private Date startTime = null;
+ private Date stopTime = null;
+ private int recPerCycle = 0;
+ private int recordedSoFar = 0;
+ private String localParty = "";
+ private String remoteParty = "";
+ private int keepForHours = 0;
+ private OrkUser targetUser;
+ private OrkPort targetPort;
+
+ //private Set RecSegments;
+ private Collection<OrkSegment> recSegments;
+
+ /**
+ * @hibernate.set
+ * lazy="true"
+ * table="PrgToSeg"
+ * @hibernate.collection-key
+ * column="RecProgram"
+ * @hibernate.collection-many-to-many
+ * column="RecSegment"
+ * class="net.sf.oreka.persistent.RecSegment"
+ * @return Returns the recSegments.
+ */
+ @ManyToMany
+// (
+// targetEntity="net.sf.oreka.persistent.RecSegment"
+// )
+ @JoinTable(
+ table=@Table(name="orkprogtoseg"),
+ joinColumns={@JoinColumn(name="progId")},
+ inverseJoinColumns={@JoinColumn(name="segId")}
+ )
+ public Collection<OrkSegment> getRecSegments() {
+ return recSegments;
+ }
+
+
+ /**
+ * @param recSegments The recSegments to set.
+ */
+ public void setRecSegments(Collection<OrkSegment> recSegments) {
+ this.recSegments = recSegments;
+ }
+
+
+ public OrkProgram () {
+ SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
+ try {
+ startTime = sdf.parse("00:00:00");
+ stopTime = sdf.parse("00:00:00");
+ }
+ catch (Exception e) {;}
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the active.
+ */
+ public boolean isActive() {
+ return active;
+ }
+
+
+ /**
+ * @param active The active to set.
+ */
+ public void setActive(boolean active) {
+ this.active = active;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the cycle.
+ */
+ public Cycle getCycle() {
+ return cycle;
+ }
+
+
+ /**
+ * @param cycle The cycle to set.
+ */
+ public void setCycle(Cycle cycle) {
+ this.cycle = cycle;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the description.
+ */
+ public String getDescription() {
+ return description;
+ }
+
+
+ /**
+ * @param description The description to set.
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the direction.
+ */
+ public Direction getDirection() {
+ return direction;
+ }
+
+
+ /**
+ * @param direction The direction to set.
+ */
+ public void setDirection(Direction direction) {
+ this.direction = direction;
+ }
+
+
+ /**
+ * @return Returns the discarded.
+ */
+ public boolean isDiscarded() {
+ return discarded;
+ }
+
+
+ /**
+ * @param discarded The discarded to set.
+ */
+ public void setDiscarded(boolean discarded) {
+ this.discarded = discarded;
+ }
+
+
+ /**
+ * @hibernate.id
+ * generator-class="native"
+ * @return Returns the id.
+ */
+ @Id(generate=GeneratorType.AUTO)
+ public int getId() {
+ return id;
+ }
+
+
+ /**
+ * @param id The id to set.
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the keepForHours.
+ */
+ public int getKeepForHours() {
+ return keepForHours;
+ }
+
+
+ /**
+ * @param keepForHours The keepForHours to set.
+ */
+ public void setKeepForHours(int keepForHours) {
+ this.keepForHours = keepForHours;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the localParty.
+ */
+ public String getLocalParty() {
+ return localParty;
+ }
+
+
+ /**
+ * @param localParty The localParty to set.
+ */
+ public void setLocalParty(String localParty) {
+ this.localParty = localParty;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the maxDuration.
+ */
+ public int getMaxDuration() {
+ return maxDuration;
+ }
+
+
+ /**
+ * @param maxDuration The maxDuration to set.
+ */
+ public void setMaxDuration(int maxDuration) {
+ this.maxDuration = maxDuration;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the minDuration.
+ */
+ public int getMinDuration() {
+ return minDuration;
+ }
+
+
+ /**
+ * @param minDuration The minDuration to set.
+ */
+ public void setMinDuration(int minDuration) {
+ this.minDuration = minDuration;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the name.
+ */
+ public String getName() {
+ return name;
+ }
+
+
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the randomPercent.
+ */
+ public double getRandomPercent() {
+ return randomPercent;
+ }
+
+
+ /**
+ * @param randomPercent The randomPercent to set.
+ */
+ public void setRandomPercent(double randomPercent) {
+ this.randomPercent = randomPercent;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the recordedSoFar.
+ */
+ public int getRecordedSoFar() {
+ return recordedSoFar;
+ }
+
+
+ /**
+ * @param recordedSoFar The recordedSoFar to set.
+ */
+ public void setRecordedSoFar(int recordedSoFar) {
+ this.recordedSoFar = recordedSoFar;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the recPerCycle.
+ */
+ public int getRecPerCycle() {
+ return recPerCycle;
+ }
+
+
+ /**
+ * @param recPerCycle The recPerCycle to set.
+ */
+ public void setRecPerCycle(int recPerCycle) {
+ this.recPerCycle = recPerCycle;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the remoteParty.
+ */
+ public String getRemoteParty() {
+ return remoteParty;
+ }
+
+
+ /**
+ * @param remoteParty The remoteParty to set.
+ */
+ public void setRemoteParty(String remoteParty) {
+ this.remoteParty = remoteParty;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the startTime.
+ */
+ public Date getStartTime() {
+ return startTime;
+ }
+
+
+ /**
+ * @param startTime The startTime to set.
+ */
+ public void setStartTime(Date startTime) {
+ this.startTime = startTime;
+ }
+
+
+ public Day getStartDay() {
+ return startDay;
+ }
+
+
+
+ public void setStartDay(Day startDay) {
+ this.startDay = startDay;
+ }
+
+
+
+ public Day getStopDay() {
+ return stopDay;
+ }
+
+
+
+ public void setStopDay(Day stopDay) {
+ this.stopDay = stopDay;
+ }
+
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the stopTime.
+ */
+ public Date getStopTime() {
+ return stopTime;
+ }
+
+
+ /**
+ * @param stopTime The stopTime to set.
+ */
+ public void setStopTime(Date stopTime) {
+ this.stopTime = stopTime;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the targetPort.
+ */
+ @ManyToOne
+ public OrkPort getTargetPort() {
+ return targetPort;
+ }
+
+
+ /**
+ * @param targetPort The targetPort to set.
+ */
+ public void setTargetPort(OrkPort targetPort) {
+ this.targetPort = targetPort;
+ }
+
+ /**
+ * @hibernate.many-to-one
+ * @return Returns the targetUser.
+ */
+ @ManyToOne
+ public OrkUser getTargetUser() {
+ return targetUser;
+ }
+
+
+
+ /**
+ * @param targetUser The targetUser to set.
+ */
+ public void setTargetUser(OrkUser targetUser) {
+ this.targetUser = targetUser;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the timestamp.
+ */
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+
+ /**
+ * @param timestamp The timestamp to set.
+ */
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+
+ /**
+ * @hibernate.many-to-one
+ * @return Returns the owner.
+ */
+ @ManyToOne
+ public OrkUser getCreator() {
+ return creator;
+ }
+
+
+
+ /**
+ * @param owner The owner to set.
+ */
+ public void setCreator(OrkUser creator) {
+ this.creator = creator;
+ }
+}
diff --git a/orkbasej/java/net/sf/oreka/persistent/RecSegment.java b/orkbasej/java/net/sf/oreka/persistent/OrkSegment.java
index 4ab9a1e..1227c00 100644
--- a/orkbasej/java/net/sf/oreka/persistent/RecSegment.java
+++ b/orkbasej/java/net/sf/oreka/persistent/OrkSegment.java
@@ -1,333 +1,333 @@
-/*
- * Oreka -- A media capture and retrieval platform
- *
- * Copyright (C) 2005, orecx LLC
- *
- * http://www.orecx.com
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License.
- * Please refer to http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-package net.sf.oreka.persistent;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratorType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinTable;
-import javax.persistence.ManyToMany;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-import net.sf.oreka.Direction;
-
-/**
- * @hibernate.class
- */
-@Entity
-@Table(name = "recsegment")
-public class RecSegment implements Serializable {
-
- private int id;
- private RecSession recSession;
- private long recSessionOffset;
- private RecTape recTape;
- private long recTapeOffset;
- private Date timestamp = new Date(0);
- private long duration;
- private String localParty = "";
- private String localEntryPoint = "";
- private String remoteParty = "";
- private Direction direction;;
- private User user;
- private String loginString = "";
- private RecPort recPort;
- private String recPortName;
- //private java.util.Set RecPrograms;
- private Collection<RecProgram> recPrograms;
-
- public RecSegment() {
- direction = Direction.UNKN;
- recPrograms = new ArrayList<RecProgram>();
- }
-
- /**
- * @hibernate.property
- *
- * @hibernate.column
- * name="direction"
- * index="direction"
- * not-null="true"
- * @return Returns the direction.
- */
- public Direction getDirection() {
- return direction;
- }
-
- /**
- * @param direction The direction to set.
- */
- public void setDirection(Direction direction) {
- this.direction = direction;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the duration.
- */
- public long getDuration() {
- return duration;
- }
-
- /**
- * @param duration The duration to set.
- */
- public void setDuration(long duration) {
- this.duration = duration;
- }
-
- /**
- * @hibernate.id
- * generator-class="native"
- * @hibernate.collection-many-to-many
- * column="RecSegmentId"
- * class="RecProgram"
- * @return Returns the id.
- */
- @Id(generate=GeneratorType.AUTO)
- public int getId() {
- return id;
- }
-
- /**
- * @param id The id to set.
- */
- public void setId(int id) {
- this.id = id;
- }
-
- /**
- * @hibernate.property
- *
- * @hibernate.column
- * name="localParty"
- * index="localParty"
- * not-null="true"
- *
- * @return Returns the localParty.
- */
- public String getLocalParty() {
- return localParty;
- }
-
- /**
- * @param localParty The localParty to set.
- */
- public void setLocalParty(String localParty) {
- this.localParty = localParty;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the loginString.
- */
- public String getLoginString() {
- return loginString;
- }
-
- /**
- * @param loginString The loginString to set.
- */
- public void setLoginString(String loginString) {
- this.loginString = loginString;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the remoteParty.
- */
- public String getRemoteParty() {
- return remoteParty;
- }
-
- /**
- * @param remoteParty The remoteParty to set.
- */
- public void setRemoteParty(String remoteParty) {
- this.remoteParty = remoteParty;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the RecTapeOffset.
- */
- public long getRecTapeOffset() {
- return recTapeOffset;
- }
-
- /**
- * @param RecTapeOffset The RecTapeOffset to set.
- */
- public void setRecTapeOffset(long recTapeOffset) {
- this.recTapeOffset = recTapeOffset;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the timestamp.
- */
- public Date getTimestamp() {
- return timestamp;
- }
-
- /**
- * @param timestamp The timestamp to set.
- */
- public void setTimestamp(Date timestamp) {
- this.timestamp = timestamp;
- }
-
- /**
- * @hibernate.many-to-one
- * @return Returns the RecSession.
- */
- @ManyToOne
- public RecSession getRecSession() {
- return recSession;
- }
-
- /**
- * @param RecSession The RecSession to set.
- */
- public void setRecSession(RecSession recSession) {
- this.recSession = recSession;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the RecSessionOffset.
- */
- public long getRecSessionOffset() {
- return recSessionOffset;
- }
-
- /**
- * @param RecSessionOffset The RecSessionOffset to set.
- */
- public void setRecSessionOffset(long recSessionOffset) {
- this.recSessionOffset = recSessionOffset;
- }
-
- /**
- * @hibernate.many-to-one
- * @return Returns the recTape.
- */
- @ManyToOne
- public RecTape getRecTape() {
- return recTape;
- }
-
-
- /**
- * @param recTape The recTape to set.
- */
- public void setRecTape(RecTape recTape) {
- this.recTape = recTape;
- }
-
- /**
- * @hibernate.set
- * lazy="true"
- * table="PrgToSeg"
- * @hibernate.collection-key
- * column="RecSegment"
- * @hibernate.collection-many-to-many
- * column="RecProgram"
- * class="net.sf.oreka.persistent.RecProgram"
- * @return Returns the recPrograms.
- */
- @ManyToMany
- @JoinTable(
- table=@Table(name="progtoseg"),
- joinColumns={@JoinColumn(name="SegId")},
- inverseJoinColumns={@JoinColumn(name="ProgId")}
- )
- public Collection<RecProgram> getRecPrograms() {
- return recPrograms;
- }
-
-
- /**
- * @param recPrograms The recPrograms to set.
- */
- public void setRecPrograms(Collection<RecProgram> recPrograms) {
- this.recPrograms = recPrograms;
- }
-
- /**
- * @hibernate.many-to-one
- * @return Returns the user.
- */
- @ManyToOne
- public User getUser() {
- return user;
- }
-
-
- /**
- * @param user The user to set.
- */
- public void setUser(User user) {
- this.user = user;
- }
-
- public String getLocalEntryPoint() {
- return localEntryPoint;
- }
-
- public void setLocalEntryPoint(String localEntryPoint) {
- this.localEntryPoint = localEntryPoint;
- }
-
- @Transient
- public long getStopTime() {
- return timestamp.getTime() + duration;
- }
-
- @ManyToOne
- public RecPort getRecPort() {
- return recPort;
- }
-
- public void setRecPort(RecPort port) {
- this.recPort = port;
- }
-
- public String getRecPortName() {
- return recPortName;
- }
-
-
- public void setRecPortName(String recPortName) {
- this.recPortName = recPortName;
- }
-
-
-
-
-}
+/*
+ * Oreka -- A media capture and retrieval platform
+ *
+ * Copyright (C) 2005, orecx LLC
+ *
+ * http://www.orecx.com
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License.
+ * Please refer to http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+package net.sf.oreka.persistent;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratorType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.JoinTable;
+import javax.persistence.ManyToMany;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+import net.sf.oreka.Direction;
+
+/**
+ * @hibernate.class
+ */
+@Entity
+@Table(name = "orksegment")
+public class OrkSegment implements Serializable {
+
+ private int id;
+ private OrkSession session;
+ private long sessionOffset;
+ private OrkTape tape;
+ private long tapeOffset;
+ private Date timestamp = new Date(0);
+ private long duration;
+ private String localParty = "";
+ private String localEntryPoint = "";
+ private String remoteParty = "";
+ private Direction direction;
+ private OrkUser user;
+ private String loginString = "";
+ private OrkPort port;
+ private String portName;
+ //private java.util.Set RecPrograms;
+ private Collection<OrkProgram> recPrograms;
+
+ public OrkSegment() {
+ direction = Direction.UNKN;
+ recPrograms = new ArrayList<OrkProgram>();
+ }
+
+ /**
+ * @hibernate.property
+ *
+ * @hibernate.column
+ * name="direction"
+ * index="direction"
+ * not-null="true"
+ * @return Returns the direction.
+ */
+ public Direction getDirection() {
+ return direction;
+ }
+
+ /**
+ * @param direction The direction to set.
+ */
+ public void setDirection(Direction direction) {
+ this.direction = direction;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the duration.
+ */
+ public long getDuration() {
+ return duration;
+ }
+
+ /**
+ * @param duration The duration to set.
+ */
+ public void setDuration(long duration) {
+ this.duration = duration;
+ }
+
+ /**
+ * @hibernate.id
+ * generator-class="native"
+ * @hibernate.collection-many-to-many
+ * column="RecSegmentId"
+ * class="RecProgram"
+ * @return Returns the id.
+ */
+ @Id(generate=GeneratorType.AUTO)
+ public int getId() {
+ return id;
+ }
+
+ /**
+ * @param id The id to set.
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ /**
+ * @hibernate.property
+ *
+ * @hibernate.column
+ * name="localParty"
+ * index="localParty"
+ * not-null="true"
+ *
+ * @return Returns the localParty.
+ */
+ public String getLocalParty() {
+ return localParty;
+ }
+
+ /**
+ * @param localParty The localParty to set.
+ */
+ public void setLocalParty(String localParty) {
+ this.localParty = localParty;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the loginString.
+ */
+ public String getLoginString() {
+ return loginString;
+ }
+
+ /**
+ * @param loginString The loginString to set.
+ */
+ public void setLoginString(String loginString) {
+ this.loginString = loginString;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the remoteParty.
+ */
+ public String getRemoteParty() {
+ return remoteParty;
+ }
+
+ /**
+ * @param remoteParty The remoteParty to set.
+ */
+ public void setRemoteParty(String remoteParty) {
+ this.remoteParty = remoteParty;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the RecTapeOffset.
+ */
+ public long getTapeOffset() {
+ return tapeOffset;
+ }
+
+ /**
+ * @param RecTapeOffset The RecTapeOffset to set.
+ */
+ public void setTapeOffset(long recTapeOffset) {
+ this.tapeOffset = recTapeOffset;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the timestamp.
+ */
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ * @param timestamp The timestamp to set.
+ */
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ /**
+ * @hibernate.many-to-one
+ * @return Returns the RecSession.
+ */
+ @ManyToOne
+ public OrkSession getSession() {
+ return session;
+ }
+
+ /**
+ * @param OrkSession The RecSession to set.
+ */
+ public void setSession(OrkSession recSession) {
+ this.session = recSession;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the RecSessionOffset.
+ */
+ public long getSessionOffset() {
+ return sessionOffset;
+ }
+
+ /**
+ * @param RecSessionOffset The RecSessionOffset to set.
+ */
+ public void setSessionOffset(long recSessionOffset) {
+ this.sessionOffset = recSessionOffset;
+ }
+
+ /**
+ * @hibernate.many-to-one
+ * @return Returns the recTape.
+ */
+ @ManyToOne
+ public OrkTape getTape() {
+ return tape;
+ }
+
+
+ /**
+ * @param recTape The recTape to set.
+ */
+ public void setTape(OrkTape recTape) {
+ this.tape = recTape;
+ }
+
+ /**
+ * @hibernate.set
+ * lazy="true"
+ * table="PrgToSeg"
+ * @hibernate.collection-key
+ * column="RecSegment"
+ * @hibernate.collection-many-to-many
+ * column="RecProgram"
+ * class="net.sf.oreka.persistent.RecProgram"
+ * @return Returns the recPrograms.
+ */
+ @ManyToMany
+ @JoinTable(
+ table=@Table(name="orkprogtoseg"),
+ joinColumns={@JoinColumn(name="segId")},
+ inverseJoinColumns={@JoinColumn(name="progId")}
+ )
+ public Collection<OrkProgram> getRecPrograms() {
+ return recPrograms;
+ }
+
+
+ /**
+ * @param recPrograms The recPrograms to set.
+ */
+ public void setRecPrograms(Collection<OrkProgram> recPrograms) {
+ this.recPrograms = recPrograms;
+ }
+
+ /**
+ * @hibernate.many-to-one
+ * @return Returns the user.
+ */
+ @ManyToOne
+ public OrkUser getUser() {
+ return user;
+ }
+
+
+ /**
+ * @param user The user to set.
+ */
+ public void setUser(OrkUser user) {
+ this.user = user;
+ }
+
+ public String getLocalEntryPoint() {
+ return localEntryPoint;
+ }
+
+ public void setLocalEntryPoint(String localEntryPoint) {
+ this.localEntryPoint = localEntryPoint;
+ }
+
+ @Transient
+ public long getStopTime() {
+ return timestamp.getTime() + duration;
+ }
+
+ @ManyToOne
+ public OrkPort getPort() {
+ return port;
+ }
+
+ public void setPort(OrkPort port) {
+ this.port = port;
+ }
+
+ public String getPortName() {
+ return portName;
+ }
+
+
+ public void setPortName(String recPortName) {
+ this.portName = recPortName;
+ }
+
+
+
+
+}
diff --git a/orkbasej/java/net/sf/oreka/persistent/Service.java b/orkbasej/java/net/sf/oreka/persistent/OrkService.java
index 701948e..7964834 100644
--- a/orkbasej/java/net/sf/oreka/persistent/Service.java
+++ b/orkbasej/java/net/sf/oreka/persistent/OrkService.java
@@ -1,176 +1,176 @@
-/*
- * Oreka -- A media capture and retrieval platform
- *
- * Copyright (C) 2005, orecx LLC
- *
- * http://www.orecx.com
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License.
- * Please refer to http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-/**
- *
- */
-package net.sf.oreka.persistent;
-
-import java.io.Serializable;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratorType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-import net.sf.oreka.ServiceClass;
-
-/**
- * @hibernate.class
- */
-@Entity
-@Table(name = "service")
-public class Service implements Serializable {
-
- private int id;
- private String name = "";
- private String hostname = "";
- private int tcpPort = 0;
- private String fileServeProtocol = "";
- private int fileServeTcpPort = 0;
- private String fileServePath = "";
- private ServiceClass serviceClass;
- private boolean recordMaster = false;
-
- /**
- *
- */
- public Service() {
- serviceClass = ServiceClass.UNKN;
- }
-
- /**
- *
- * @hibernate.property
- * not-null="true"
- * @return Returns the fileServePath.
- */
- public String getFileServePath() {
- return fileServePath;
- }
-
-
- /**
- * @param fileServePath The fileServePath to set.
- */
- public void setFileServePath(String fileServePath) {
- this.fileServePath = fileServePath;
- }
-
- public int getFileServeTcpPort() {
- return fileServeTcpPort;
- }
-
- public void setFileServeTcpPort(int fileServeTcpPort) {
- this.fileServeTcpPort = fileServeTcpPort;
- }
-
- public int getTcpPort() {
- return tcpPort;
- }
-
- public void setTcpPort(int tcpPort) {
- this.tcpPort = tcpPort;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the fileServeProtocol.
- */
- public String getFileServeProtocol() {
- return fileServeProtocol;
- }
-
-
- /**
- * @param fileServeProtocol The fileServeProtocol to set.
- */
- public void setFileServeProtocol(String fileServeProtocol) {
- this.fileServeProtocol = fileServeProtocol;
- }
-
-
- /**
- * @hibernate.property
- * unique="true"
- * not-null="true"
- * @return Returns the gUID.
- */
- public String getName() {
- return name;
- }
-
-
- /**
- * @param name The name to set.
- */
- public void setName(String name) {
- this.name = name;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the hostname.
- */
- public String getHostname() {
- return hostname;
- }
-
-
- /**
- * @param hostname The hostname to set.
- */
- public void setHostname(String hostname) {
- this.hostname = hostname;
- }
-
-
- /**
- * @hibernate.id
- * generator-class="native"
- * @return Returns the id.
- */
- @Id(generate=GeneratorType.AUTO)
- public int getId() {
- return id;
- }
-
-
- /**
- * @param id The id to set.
- */
- public void setId(int id) {
- this.id = id;
- }
-
- public ServiceClass getServiceClass() {
- return serviceClass;
- }
-
- public void setServiceClass(ServiceClass serviceClass) {
- this.serviceClass = serviceClass;
- }
-
- public boolean isRecordMaster() {
- return recordMaster;
- }
-
- public void setRecordMaster(boolean cdrMaster) {
- this.recordMaster = cdrMaster;
- }
-
-
-}
+/*
+ * Oreka -- A media capture and retrieval platform
+ *
+ * Copyright (C) 2005, orecx LLC
+ *
+ * http://www.orecx.com
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License.
+ * Please refer to http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+/**
+ *
+ */
+package net.sf.oreka.persistent;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratorType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import net.sf.oreka.ServiceClass;
+
+/**
+ * @hibernate.class
+ */
+@Entity
+@Table(name = "orkservice")
+public class OrkService implements Serializable {
+
+ private int id;
+ private String name = "";
+ private String hostname = "";
+ private int tcpPort = 0;
+ private String fileServeProtocol = "";
+ private int fileServeTcpPort = 0;
+ private String fileServePath = "";
+ private ServiceClass serviceClass;
+ private boolean recordMaster = false;
+
+ /**
+ *
+ */
+ public OrkService() {
+ serviceClass = ServiceClass.UNKN;
+ }
+
+ /**
+ *
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the fileServePath.
+ */
+ public String getFileServePath() {
+ return fileServePath;
+ }
+
+
+ /**
+ * @param fileServePath The fileServePath to set.
+ */
+ public void setFileServePath(String fileServePath) {
+ this.fileServePath = fileServePath;
+ }
+
+ public int getFileServeTcpPort() {
+ return fileServeTcpPort;
+ }
+
+ public void setFileServeTcpPort(int fileServeTcpPort) {
+ this.fileServeTcpPort = fileServeTcpPort;
+ }
+
+ public int getTcpPort() {
+ return tcpPort;
+ }
+
+ public void setTcpPort(int tcpPort) {
+ this.tcpPort = tcpPort;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the fileServeProtocol.
+ */
+ public String getFileServeProtocol() {
+ return fileServeProtocol;
+ }
+
+
+ /**
+ * @param fileServeProtocol The fileServeProtocol to set.
+ */
+ public void setFileServeProtocol(String fileServeProtocol) {
+ this.fileServeProtocol = fileServeProtocol;
+ }
+
+
+ /**
+ * @hibernate.property
+ * unique="true"
+ * not-null="true"
+ * @return Returns the gUID.
+ */
+ public String getName() {
+ return name;
+ }
+
+
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the hostname.
+ */
+ public String getHostname() {
+ return hostname;
+ }
+
+
+ /**
+ * @param hostname The hostname to set.
+ */
+ public void setHostname(String hostname) {
+ this.hostname = hostname;
+ }
+
+
+ /**
+ * @hibernate.id
+ * generator-class="native"
+ * @return Returns the id.
+ */
+ @Id(generate=GeneratorType.AUTO)
+ public int getId() {
+ return id;
+ }
+
+
+ /**
+ * @param id The id to set.
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public ServiceClass getServiceClass() {
+ return serviceClass;
+ }
+
+ public void setServiceClass(ServiceClass serviceClass) {
+ this.serviceClass = serviceClass;
+ }
+
+ public boolean isRecordMaster() {
+ return recordMaster;
+ }
+
+ public void setRecordMaster(boolean cdrMaster) {
+ this.recordMaster = cdrMaster;
+ }
+
+
+}
diff --git a/orkbasej/java/net/sf/oreka/persistent/RecSession.java b/orkbasej/java/net/sf/oreka/persistent/OrkSession.java
index eff8417..cbee4ee 100644
--- a/orkbasej/java/net/sf/oreka/persistent/RecSession.java
+++ b/orkbasej/java/net/sf/oreka/persistent/OrkSession.java
@@ -1,82 +1,82 @@
-/*
- * Oreka -- A media capture and retrieval platform
- *
- * Copyright (C) 2005, orecx LLC
- *
- * http://www.orecx.com
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License.
- * Please refer to http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-package net.sf.oreka.persistent;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratorType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-/**
- * @hibernate.class
- */
-@Entity
-@Table(name = "recsession")
-public class RecSession implements Serializable {
- private int id;
- private Date timestamp = new Date(0);
- private long duration;
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return
- */
- public long getDuration() {
- return duration;
- }
-
- public void setDuration(long duration) {
- this.duration = duration;
- }
-
- /**
- * @hibernate.id
- * generator-class="native"
- */
- @Id(generate=GeneratorType.AUTO)
- public int getId() {
- return id;
- }
-
-
- public void setId(int id) {
- this.id = id;
- }
-
- /**
- * @hibernate.property
- * @return
- */
- public Date getTimestamp() {
- return timestamp;
- }
-
- public void setTimestamp(Date timestamp) {
- this.timestamp = timestamp;
- }
-
- @Transient
- public long getStopTime() {
- return timestamp.getTime() + duration;
- }
-
- public void setStopTime(long stopTime) {
- duration = stopTime - timestamp.getTime();
- }
-}
+/*
+ * Oreka -- A media capture and retrieval platform
+ *
+ * Copyright (C) 2005, orecx LLC
+ *
+ * http://www.orecx.com
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License.
+ * Please refer to http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+package net.sf.oreka.persistent;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratorType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+/**
+ * @hibernate.class
+ */
+@Entity
+@Table(name = "orksession")
+public class OrkSession implements Serializable {
+ private int id;
+ private Date timestamp = new Date(0);
+ private long duration;
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return
+ */
+ public long getDuration() {
+ return duration;
+ }
+
+ public void setDuration(long duration) {
+ this.duration = duration;
+ }
+
+ /**
+ * @hibernate.id
+ * generator-class="native"
+ */
+ @Id(generate=GeneratorType.AUTO)
+ public int getId() {
+ return id;
+ }
+
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ /**
+ * @hibernate.property
+ * @return
+ */
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Transient
+ public long getStopTime() {
+ return timestamp.getTime() + duration;
+ }
+
+ public void setStopTime(long stopTime) {
+ duration = stopTime - timestamp.getTime();
+ }
+}
diff --git a/orkbasej/java/net/sf/oreka/persistent/RecTape.java b/orkbasej/java/net/sf/oreka/persistent/OrkTape.java
index 66d796d..f04b1c3 100644
--- a/orkbasej/java/net/sf/oreka/persistent/RecTape.java
+++ b/orkbasej/java/net/sf/oreka/persistent/OrkTape.java
@@ -1,262 +1,262 @@
-/*
- * Oreka -- A media capture and retrieval platform
- *
- * Copyright (C) 2005, orecx LLC
- *
- * http://www.orecx.com
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License.
- * Please refer to http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-package net.sf.oreka.persistent;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratorType;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-import net.sf.oreka.Direction;
-
-/**
- * @hibernate.class
- */
-@Entity
-@Table(name = "rectape")
-public class RecTape implements Serializable {
-
- private int id;
- private Date timestamp = new Date(0);
- private long duration;
- private String filename = "";
- private Service service;
- private String localParty = "";
- private String localEntryPoint = "";
- private String remoteParty = "";
- private Direction direction;
- private RecPort recPort;
- private String recPortName;
- private Date expiryTimestamp = new Date(0);
-
- public RecTape()
- {
- // Defaults
- direction = Direction.UNKN;
- }
-
- /**
- * @hibernate.property
- * @hibernate.column
- * name="direction"
- * index="direction"
- * not-null="true"
- * @return Returns the direction.
- */
- public Direction getDirection() {
- return direction;
- }
-
- /**
- * @param direction The direction to set.
- */
- public void setDirection(Direction direction) {
- this.direction = direction;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the duration.
- */
- public long getDuration() {
- return duration;
- }
-
- /**
- * @param duration The duration to set.
- */
- public void setDuration(long duration) {
- this.duration = duration;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the expiryTimestamp.
- */
- public Date getExpiryTimestamp() {
- return expiryTimestamp;
- }
-
- /**
- * @param expiryTimestamp The expiryTimestamp to set.
- */
- public void setExpiryTimestamp(Date expiryTimestamp) {
- this.expiryTimestamp = expiryTimestamp;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the filename.
- */
- public String getFilename() {
- return filename;
- }
-
- /**
- * @param filename The filename to set.
- */
- public void setFilename(String filename) {
- this.filename = filename;
- }
-
- /**
- * @hibernate.id
- * generator-class="native"
- * @return Returns the id.
- */
- @Id(generate=GeneratorType.AUTO)
- public int getId() {
- return id;
- }
-
- /**
- * @param id The id to set.
- */
- public void setId(int id) {
- this.id = id;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the localParty.
- */
- public String getLocalParty() {
- return localParty;
- }
-
- /**
- * @param localParty The localParty to set.
- */
- public void setLocalParty(String localParty) {
- this.localParty = localParty;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the port.
- */
- @ManyToOne
- public RecPort getRecPort() {
- return recPort;
- }
-
- /**
- * @param port The port to set.
- */
- public void setRecPort(RecPort port) {
- this.recPort = port;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the remoteParty.
- */
- public String getRemoteParty() {
- return remoteParty;
- }
-
- /**
- * @param remoteParty The remoteParty to set.
- */
- public void setRemoteParty(String remoteParty) {
- this.remoteParty = remoteParty;
- }
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the timestamp.
- */
- public Date getTimestamp() {
- return timestamp;
- }
-
- /**
- * @param timestamp The timestamp to set.
- */
- public void setTimestamp(Date timestamp) {
- this.timestamp = timestamp;
- }
-
- /**
- * @hibernate.many-to-one
- * @return Returns the service.
- */
- @ManyToOne
- public Service getService() {
- return service;
- }
-
-
- /**
- * @param server The service to set.
- */
- public void setService(Service service) {
- this.service = service;
- }
-
- public String getLocalEntryPoint() {
- return localEntryPoint;
- }
-
- public void setLocalEntryPoint(String localEntryPoint) {
- this.localEntryPoint = localEntryPoint;
- }
-
- @Transient
- public long getStopTime() {
- return timestamp.getTime() + duration;
- }
-
- @Transient
- public String getUrl() {
-
- if(service != null) {
- return service.getFileServeProtocol() + "://" +
- service.getHostname() + ":" + service.getFileServeTcpPort() +
- "/" + service.getFileServePath() + "/" + filename;
- }
- else {
- return "";
- }
- }
-
- @Transient
- public String getPlayUrl() {
-
- return "javascript:play('" + getUrl() + "')";
- }
-
- public String getRecPortName() {
- return recPortName;
- }
-
-
- public void setRecPortName(String recPortName) {
- this.recPortName = recPortName;
- }
-
-
-}
+/*
+ * Oreka -- A media capture and retrieval platform
+ *
+ * Copyright (C) 2005, orecx LLC
+ *
+ * http://www.orecx.com
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License.
+ * Please refer to http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+package net.sf.oreka.persistent;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratorType;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+import net.sf.oreka.Direction;
+
+/**
+ * @hibernate.class
+ */
+@Entity
+@Table(name = "orktape")
+public class OrkTape implements Serializable {
+
+ private int id;
+ private Date timestamp = new Date(0);
+ private long duration;
+ private String filename = "";
+ private OrkService service;
+ private String localParty = "";
+ private String localEntryPoint = "";
+ private String remoteParty = "";
+ private Direction direction;
+ private OrkPort port;
+ private String portName;
+ private Date expiryTimestamp = new Date(0);
+
+ public OrkTape()
+ {
+ // Defaults
+ direction = Direction.UNKN;
+ }
+
+ /**
+ * @hibernate.property
+ * @hibernate.column
+ * name="direction"
+ * index="direction"
+ * not-null="true"
+ * @return Returns the direction.
+ */
+ public Direction getDirection() {
+ return direction;
+ }
+
+ /**
+ * @param direction The direction to set.
+ */
+ public void setDirection(Direction direction) {
+ this.direction = direction;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the duration.
+ */
+ public long getDuration() {
+ return duration;
+ }
+
+ /**
+ * @param duration The duration to set.
+ */
+ public void setDuration(long duration) {
+ this.duration = duration;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the expiryTimestamp.
+ */
+ public Date getExpiryTimestamp() {
+ return expiryTimestamp;
+ }
+
+ /**
+ * @param expiryTimestamp The expiryTimestamp to set.
+ */
+ public void setExpiryTimestamp(Date expiryTimestamp) {
+ this.expiryTimestamp = expiryTimestamp;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the filename.
+ */
+ public String getFilename() {
+ return filename;
+ }
+
+ /**
+ * @param filename The filename to set.
+ */
+ public void setFilename(String filename) {
+ this.filename = filename;
+ }
+
+ /**
+ * @hibernate.id
+ * generator-class="native"
+ * @return Returns the id.
+ */
+ @Id(generate=GeneratorType.AUTO)
+ public int getId() {
+ return id;
+ }
+
+ /**
+ * @param id The id to set.
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the localParty.
+ */
+ public String getLocalParty() {
+ return localParty;
+ }
+
+ /**
+ * @param localParty The localParty to set.
+ */
+ public void setLocalParty(String localParty) {
+ this.localParty = localParty;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the port.
+ */
+ @ManyToOne
+ public OrkPort getPort() {
+ return port;
+ }
+
+ /**
+ * @param port The port to set.
+ */
+ public void setPort(OrkPort port) {
+ this.port = port;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the remoteParty.
+ */
+ public String getRemoteParty() {
+ return remoteParty;
+ }
+
+ /**
+ * @param remoteParty The remoteParty to set.
+ */
+ public void setRemoteParty(String remoteParty) {
+ this.remoteParty = remoteParty;
+ }
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the timestamp.
+ */
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ * @param timestamp The timestamp to set.
+ */
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ /**
+ * @hibernate.many-to-one
+ * @return Returns the service.
+ */
+ @ManyToOne
+ public OrkService getService() {
+ return service;
+ }
+
+
+ /**
+ * @param server The service to set.
+ */
+ public void setService(OrkService service) {
+ this.service = service;
+ }
+
+ public String getLocalEntryPoint() {
+ return localEntryPoint;
+ }
+
+ public void setLocalEntryPoint(String localEntryPoint) {
+ this.localEntryPoint = localEntryPoint;
+ }
+
+ @Transient
+ public long getStopTime() {
+ return timestamp.getTime() + duration;
+ }
+
+ @Transient
+ public String getUrl() {
+
+ if(service != null) {
+ return service.getFileServeProtocol() + "://" +
+ service.getHostname() + ":" + service.getFileServeTcpPort() +
+ "/" + service.getFileServePath() + "/" + filename;
+ }
+ else {
+ return "";
+ }
+ }
+
+ @Transient
+ public String getPlayUrl() {
+
+ return "javascript:play('" + getUrl() + "')";
+ }
+
+ public String getPortName() {
+ return portName;
+ }
+
+
+ public void setPortName(String recPortName) {
+ this.portName = recPortName;
+ }
+
+
+}
diff --git a/orkbasej/java/net/sf/oreka/persistent/User.java b/orkbasej/java/net/sf/oreka/persistent/OrkUser.java
index 2ce404f..1414abe 100644
--- a/orkbasej/java/net/sf/oreka/persistent/User.java
+++ b/orkbasej/java/net/sf/oreka/persistent/OrkUser.java
@@ -1,210 +1,210 @@
-/*
- * Oreka -- A media capture and retrieval platform
- *
- * Copyright (C) 2005, orecx LLC
- *
- * http://www.orecx.com
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License.
- * Please refer to http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-/**
- *
- */
-package net.sf.oreka.persistent;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratorType;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-
-/**
- * @hibernate.class
- */
-@Entity
-@Table(name = "user")
-public class User implements Serializable {
-
- private int id = 0;
- private String password = "";
- private String firstname = "";
- private String lastname = "";
- private String email = "";
- private boolean deleted = false;
- private boolean disabled = false;
- private Date dateCreated = new Date(0);
- private Date dateDisabled = new Date(0);
- private Date dateDeleted = new Date(0);
-
- //private Set<LoginString> loginStrings;
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the email.
- */
- public String getEmail() {
- return email;
- }
-
-
- /**
- * @param email The email to set.
- */
- public void setEmail(String email) {
- this.email = email;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the firstname.
- */
- public String getFirstname() {
- return firstname;
- }
-
-
- /**
- * @param firstname The firstname to set.
- */
- public void setFirstname(String firstname) {
- this.firstname = firstname;
- }
-
-
- /**
- * @hibernate.id
- * generator-class="native"
- * @return Returns the id.
- */
- @Id(generate=GeneratorType.AUTO)
- public int getId() {
- return id;
- }
-
-
- /**
- * @param id The id to set.
- */
- @Id(generate=GeneratorType.AUTO)
- public void setId(int id) {
- this.id = id;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the lastname.
- */
- public String getLastname() {
- return lastname;
- }
-
-
- /**
- * @param lastname The lastname to set.
- */
- public void setLastname(String lastname) {
- this.lastname = lastname;
- }
-
-
- /**
- * @hibernate.property
- * not-null="true"
- * @return Returns the password.
- */
- public String getPassword() {
- return password;
- }
-
-
- /**
- * @param password The password to set.
- */
- public void setPassword(String password) {
- this.password = password;
- }
-
-
- /**
- *
- */
- public User() {
- //loginStrings = new HashSet<LoginString>();
- }
-
- public Date getDateCreated() {
- return dateCreated;
- }
-
-
-
- public void setDateCreated(Date dateCreated) {
- this.dateCreated = dateCreated;
- }
-
-
-
- public Date getDateDeleted() {
- return dateDeleted;
- }
-
-
-
- public void setDateDeleted(Date dateDeleted) {
- this.dateDeleted = dateDeleted;
- }
-
-
-
- public Date getDateDisabled() {
- return dateDisabled;
- }
-
-
-
- public void setDateDisabled(Date dateDisabled) {
- this.dateDisabled = dateDisabled;
- }
-
-
-
- public boolean isDeleted() {
- return deleted;
- }
-
-
-
- public void setDeleted(boolean deleted) {
- this.deleted = deleted;
- }
-
-
-
- public boolean isDisabled() {
- return disabled;
- }
-
-
-
- public void setDisabled(boolean disabled) {
- this.disabled = disabled;
- }
-
-
-
-}
+/*
+ * Oreka -- A media capture and retrieval platform
+ *
+ * Copyright (C) 2005, orecx LLC
+ *
+ * http://www.orecx.com
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License.
+ * Please refer to http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+/**
+ *
+ */
+package net.sf.oreka.persistent;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratorType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+/**
+ * @hibernate.class
+ */
+@Entity
+@Table(name = "orkuser")
+public class OrkUser implements Serializable {
+
+ private int id = 0;
+ private String password = "";
+ private String firstname = "";
+ private String lastname = "";
+ private String email = "";
+ private boolean deleted = false;
+ private boolean disabled = false;
+ private Date dateCreated = new Date(0);
+ private Date dateDisabled = new Date(0);
+ private Date dateDeleted = new Date(0);
+
+ //private Set<LoginString> loginStrings;
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the email.
+ */
+ public String getEmail() {
+ return email;
+ }
+
+
+ /**
+ * @param email The email to set.
+ */
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the firstname.
+ */
+ public String getFirstname() {
+ return firstname;
+ }
+
+
+ /**
+ * @param firstname The firstname to set.
+ */
+ public void setFirstname(String firstname) {
+ this.firstname = firstname;
+ }
+
+
+ /**
+ * @hibernate.id
+ * generator-class="native"
+ * @return Returns the id.
+ */
+ @Id(generate=GeneratorType.AUTO)
+ public int getId() {
+ return id;
+ }
+
+
+ /**
+ * @param id The id to set.
+ */
+ @Id(generate=GeneratorType.AUTO)
+ public void setId(int id) {
+ this.id = id;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the lastname.
+ */
+ public String getLastname() {
+ return lastname;
+ }
+
+
+ /**
+ * @param lastname The lastname to set.
+ */
+ public void setLastname(String lastname) {
+ this.lastname = lastname;
+ }
+
+
+ /**
+ * @hibernate.property
+ * not-null="true"
+ * @return Returns the password.
+ */
+ public String getPassword() {
+ return password;
+ }
+
+
+ /**
+ * @param password The password to set.
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
+ /**
+ *
+ */
+ public OrkUser() {
+ //loginStrings = new HashSet<LoginString>();
+ }
+
+ public Date getDateCreated() {
+ return dateCreated;
+ }
+
+
+
+ public void setDateCreated(Date dateCreated) {
+ this.dateCreated = dateCreated;
+ }
+
+
+
+ public Date getDateDeleted() {
+ return dateDeleted;
+ }
+
+
+
+ public void setDateDeleted(Date dateDeleted) {
+ this.dateDeleted = dateDeleted;
+ }
+
+
+
+ public Date getDateDisabled() {
+ return dateDisabled;
+ }
+
+
+
+ public void setDateDisabled(Date dateDisabled) {
+ this.dateDisabled = dateDisabled;
+ }
+
+
+
+ public boolean isDeleted() {
+ return deleted;
+ }
+
+
+
+ public void setDeleted(boolean deleted) {
+ this.deleted = deleted;
+ }
+
+
+
+ public boolean isDisabled() {
+ return disabled;
+ }
+
+
+
+ public void setDisabled(boolean disabled) {
+ this.disabled = disabled;
+ }
+
+
+
+}
diff --git a/orkbasej/java/net/sf/oreka/srvc/UserService.java b/orkbasej/java/net/sf/oreka/srvc/UserService.java
index fd2485f..9f1f784 100644
--- a/orkbasej/java/net/sf/oreka/srvc/UserService.java
+++ b/orkbasej/java/net/sf/oreka/srvc/UserService.java
@@ -3,7 +3,7 @@ package net.sf.oreka.srvc;
import java.util.List;
import net.sf.oreka.bo.UserBo;
-import net.sf.oreka.persistent.User;
+import net.sf.oreka.persistent.OrkUser;
public interface UserService {
@@ -18,7 +18,7 @@ public interface UserService {
public String getUserLoginStrings(int userId);
public void setUserLoginStrings(int userId, String loginStringsCsv);
- public User getUserByLoginString(String loginString);
+ public OrkUser getUserByLoginString(String loginString);
public int getNumNonDisabledUsers();
}
diff --git a/orkbasej/java/net/sf/oreka/srvc/UserServiceHbn.java b/orkbasej/java/net/sf/oreka/srvc/UserServiceHbn.java
index 8ee6e00..402b862 100644
--- a/orkbasej/java/net/sf/oreka/srvc/UserServiceHbn.java
+++ b/orkbasej/java/net/sf/oreka/srvc/UserServiceHbn.java
@@ -10,8 +10,8 @@ import net.sf.oreka.HibernateManager;
import net.sf.oreka.OrkBase;
import net.sf.oreka.OrkException;
import net.sf.oreka.bo.UserBo;
-import net.sf.oreka.persistent.LoginString;
-import net.sf.oreka.persistent.User;
+import net.sf.oreka.persistent.OrkLoginString;
+import net.sf.oreka.persistent.OrkUser;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
@@ -38,7 +38,7 @@ public class UserServiceHbn implements UserService {
{
hbnSession = HibernateManager.instance().getSession();
- String queryString = new String("from LoginString as ls left join ls.user as user where ls.loginString=:ls and user.deleted=0 ");
+ String queryString = new String("from OrkLoginString as ls left join ls.user as user where ls.loginString=:ls and user.deleted=0 ");
if (OrkBase.instance().isDebugSwitch() == false) {
queryString = queryString + " and user.password=:password";
}
@@ -51,7 +51,7 @@ public class UserServiceHbn implements UserService {
Object[] row = (Object[])query.uniqueResult();
if (row != null) {
userBo = new UserBo();
- userBo.setUser((User)row[1]);
+ userBo.setUser((OrkUser)row[1]);
logger.debug("Found userid:" + userBo.getUser().getId() + " for login string:" + username);
}
}
@@ -72,7 +72,7 @@ public class UserServiceHbn implements UserService {
Session hbnSession = null;
Transaction tx = null;
- User user = null;
+ OrkUser user = null;
boolean success = false;
logger.debug("Trying to change password for userid:" + userId);
@@ -82,7 +82,7 @@ public class UserServiceHbn implements UserService {
hbnSession = HibernateManager.instance().getSession();
- user = (User)hbnSession.get(User.class, userId);
+ user = (OrkUser)hbnSession.get(OrkUser.class, userId);
if(user == null) {
logger.warn("Userid:" + userId + " does not exist");
}
@@ -115,7 +115,7 @@ public class UserServiceHbn implements UserService {
Session hbnSession = null;
Transaction tx = null;
logger.debug("Entering getUsers");
- List<User> users;
+ List<OrkUser> users;
int numResults = 0;
try
@@ -145,7 +145,7 @@ public class UserServiceHbn implements UserService {
}
*/
- StringBuffer queryString = new StringBuffer("from User as user where user.deleted=0 ");
+ StringBuffer queryString = new StringBuffer("from OrkUser as user where user.deleted=0 ");
Query query = hbnSession.createQuery(queryString.toString());
ScrollableResults scrollRes = query.scroll();
@@ -160,7 +160,7 @@ public class UserServiceHbn implements UserService {
while(scrollRes.next() && numRetrieved<number) {
numRetrieved++;
UserBo ubo = new UserBo();
- ubo.setUser((User)scrollRes.get()[0]);
+ ubo.setUser((OrkUser)scrollRes.get()[0]);
results.add(ubo);
}
@@ -183,7 +183,7 @@ public class UserServiceHbn implements UserService {
Session hbnSession = null;
Transaction tx = null;
- User user = null;
+ OrkUser user = null;
logger.debug("Deleting userid:" + userId);
@@ -192,7 +192,7 @@ public class UserServiceHbn implements UserService {
hbnSession = HibernateManager.instance().getSession();
- user = (User)hbnSession.get(User.class, userId);
+ user = (OrkUser)hbnSession.get(OrkUser.class, userId);
if(user == null) {
logger.warn("Userid:" + userId + " does not exist");
}
@@ -219,14 +219,14 @@ public class UserServiceHbn implements UserService {
Session hbnSession = null;
Transaction tx = null;
- User user = null;
+ OrkUser user = null;
logger.debug("Disabling userid:" + userId);
try
{
hbnSession = HibernateManager.instance().getSession();
- user = (User)hbnSession.get(User.class, userId);
+ user = (OrkUser)hbnSession.get(OrkUser.class, userId);
if(user == null) {
logger.warn("Userid:" + userId + " does not exist");
}
@@ -258,7 +258,7 @@ public class UserServiceHbn implements UserService {
HashSet<String> oldLoginStrings = new HashSet<String>();
HashSet<String> newLoginStrings = new HashSet<String>();
- HashMap<String, LoginString> loginStringMap = new HashMap<String, LoginString>();
+ HashMap<String, OrkLoginString> loginStringMap = new HashMap<String, OrkLoginString>();
Session hbnSession = null;
Transaction tx = null;
@@ -274,14 +274,14 @@ public class UserServiceHbn implements UserService {
newLoginStrings.add(loginStrings[i]);
// see if the login string exists for another user
- String queryString = new String("from LoginString as ls where ls.loginString=:loginString");
+ String queryString = new String("from OrkLoginString as ls where ls.loginString=:loginString");
Query query = hbnSession.createQuery(queryString);
query.setString("loginString", loginStrings[i]);
List list = query.list();
- LoginString ls = null;
+ OrkLoginString ls = null;
if(list.size() > 0) {
- ls = (LoginString)list.get(0);
+ ls = (OrkLoginString)list.get(0);
if(ls != null) {
if(ls.getUser() != null) {
if(ls.getUser().getId() != userId && !ls.getUser().isDeleted()) {
@@ -293,7 +293,7 @@ public class UserServiceHbn implements UserService {
}
// Create a new login string if it does not exist yet in the DB
if(ls == null) {
- ls = new LoginString();
+ ls = new OrkLoginString();
ls.setLoginString(loginStrings[i]);
hbnSession.save(ls);
}
@@ -301,17 +301,17 @@ public class UserServiceHbn implements UserService {
}
// 2. get the user and extract all old login strings
- User user = (User)hbnSession.get(User.class, userId);
+ OrkUser user = (OrkUser)hbnSession.get(OrkUser.class, userId);
if(user == null) {
throw new OrkException("UserId:" + userId + " does not exist");
}
- String queryString = new String("from LoginString as ls where ls.user=:user");
+ String queryString = new String("from OrkLoginString as ls where ls.user=:user");
Query query = hbnSession.createQuery(queryString);
query.setEntity("user", user);
List list = query.list();
Iterator it = list.iterator();
while(it.hasNext()) {
- LoginString ls = (LoginString)it.next();
+ OrkLoginString ls = (OrkLoginString)it.next();
oldLoginStrings.add(ls.getLoginString());
loginStringMap.put(ls.getLoginString(), ls);
}
@@ -321,7 +321,7 @@ public class UserServiceHbn implements UserService {
while(it.hasNext()) {
String ls = (String)it.next();
if(oldLoginStrings.contains(ls) == false) {
- LoginString lso = loginStringMap.get(ls);
+ OrkLoginString lso = loginStringMap.get(ls);
lso.setUser(user);
logger.debug("Added loginstring:" + lso.getLoginString() + " to user:" + user.getFirstname());
}
@@ -332,7 +332,7 @@ public class UserServiceHbn implements UserService {
while(it.hasNext()) {
String ls = (String)it.next();
if(newLoginStrings.contains(ls) == false) {
- LoginString lso = loginStringMap.get(ls);
+ OrkLoginString lso = loginStringMap.get(ls);
lso.setUser(null);
logger.debug("Removed loginstring:" + lso.getLoginString() + " from user:" + user.getFirstname());
}
@@ -359,24 +359,24 @@ public class UserServiceHbn implements UserService {
public String getUserLoginStrings(int userId) {
Session hbnSession = null;
- User user = null;
+ OrkUser user = null;
String loginStringsCsv = "";
try
{
hbnSession = HibernateManager.instance().getSession();
- user = (User)hbnSession.get(User.class, userId);
- String queryString = new String("from LoginString as ls where ls.user=:user");
+ user = (OrkUser)hbnSession.get(OrkUser.class, userId);
+ String queryString = new String("from OrkLoginString as ls where ls.user=:user");
Query query = hbnSession.createQuery(queryString);
query.setEntity("user", user);
List list = query.list();
Iterator it = list.iterator();
if(it.hasNext()) {
- loginStringsCsv = ((LoginString)it.next()).getLoginString();
+ loginStringsCsv = ((OrkLoginString)it.next()).getLoginString();
}
while(it.hasNext()) {
- loginStringsCsv += ", " + ((LoginString)it.next()).getLoginString();
+ loginStringsCsv += ", " + ((OrkLoginString)it.next()).getLoginString();
}
}
catch ( HibernateException he ) {
@@ -401,7 +401,7 @@ public class UserServiceHbn implements UserService {
{
hbnSession = HibernateManager.instance().getSession();
- Criteria crit = hbnSession.createCriteria(User.class);
+ Criteria crit = hbnSession.createCriteria(OrkUser.class);
crit.add( Expression.eq( "disabled", false ) );
crit.add( Expression.eq( "deleted", false ) );
@@ -425,20 +425,20 @@ public class UserServiceHbn implements UserService {
return numUsers;
}
- public User getUserByLoginString(String loginString) {
+ public OrkUser getUserByLoginString(String loginString) {
Session hbnSession = null;
- User user = null;
+ OrkUser user = null;
try
{
hbnSession = HibernateManager.instance().getSession();
- String queryString = new String("from LoginString as ls where ls.loginstring=:ls");
+ String queryString = new String("from OrkLoginString as ls where ls.loginstring=:ls");
Query query = hbnSession.createQuery(queryString);
query.setString("ls", loginString);
List list = query.list();
Iterator it = list.iterator();
if (it.hasNext()) {
- LoginString ls = (LoginString)it.next();
+ OrkLoginString ls = (OrkLoginString)it.next();
user = ls.getUser();
}
}
diff --git a/orkbasej/java/net/sf/oreka/srvc/test/UserServiceHbnTest.java b/orkbasej/java/net/sf/oreka/srvc/test/UserServiceHbnTest.java
index 213f676..584180c 100644
--- a/orkbasej/java/net/sf/oreka/srvc/test/UserServiceHbnTest.java
+++ b/orkbasej/java/net/sf/oreka/srvc/test/UserServiceHbnTest.java
@@ -4,8 +4,8 @@ import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import net.sf.oreka.HibernateManager;
-import net.sf.oreka.persistent.LoginString;
-import net.sf.oreka.persistent.User;
+import net.sf.oreka.persistent.OrkLoginString;
+import net.sf.oreka.persistent.OrkUser;
import net.sf.oreka.srvc.ObjectService;
import net.sf.oreka.srvc.ObjectServiceHbn;
import net.sf.oreka.srvc.UserService;
@@ -46,15 +46,15 @@ public class UserServiceHbnTest extends TestCase {
Session hbnSession = hibernateManager.getSession();
Transaction tx = hbnSession.beginTransaction();
- User user1 = new User();
+ OrkUser user1 = new OrkUser();
user1.setFirstname("fn1");
hbnSession.save(user1);
- User user2 = new User();
+ OrkUser user2 = new OrkUser();
user2.setFirstname("fn2");
hbnSession.save(user2);
- User deletedUser = new User();
+ OrkUser deletedUser = new OrkUser();
deletedUser.setFirstname("dlt");
//deletedUser.setDeleted(true);
hbnSession.save(deletedUser);
diff --git a/orkbasej/java/net/sf/oreka/test/FillDatabase.java b/orkbasej/java/net/sf/oreka/test/FillDatabase.java
index 43f4d71..b1e1c8c 100644
--- a/orkbasej/java/net/sf/oreka/test/FillDatabase.java
+++ b/orkbasej/java/net/sf/oreka/test/FillDatabase.java
@@ -17,12 +17,12 @@ import java.util.Date;
import net.sf.oreka.Direction;
import net.sf.oreka.HibernateManager;
-import net.sf.oreka.persistent.LoginString;
-import net.sf.oreka.persistent.RecProgram;
-import net.sf.oreka.persistent.RecSegment;
-import net.sf.oreka.persistent.RecTape;
-import net.sf.oreka.persistent.Service;
-import net.sf.oreka.persistent.User;
+import net.sf.oreka.persistent.OrkLoginString;
+import net.sf.oreka.persistent.OrkProgram;
+import net.sf.oreka.persistent.OrkSegment;
+import net.sf.oreka.persistent.OrkTape;
+import net.sf.oreka.persistent.OrkService;
+import net.sf.oreka.persistent.OrkUser;
import org.hibernate.Session;
import org.hibernate.Transaction;
@@ -38,7 +38,7 @@ public class FillDatabase {
Session hbnSession = hibernateManager.getSession();
Transaction tx = hbnSession.beginTransaction();
- Service service = new Service();
+ OrkService service = new OrkService();
service.setFileServePath("");
service.setFileServeProtocol("http");
service.setFileServeTcpPort(8080);
@@ -48,17 +48,17 @@ public class FillDatabase {
hbnSession.save(service);
// user 1
- User user = new User();
+ OrkUser user = new OrkUser();
user.setFirstname("Raymond");
user.setLastname("Stein");
user.setPassword("raymond");
- LoginString ls = new LoginString();
+ OrkLoginString ls = new OrkLoginString();
ls.setUser(user);
ls.setLoginString("2005");
- LoginString lsA = new LoginString();
+ OrkLoginString lsA = new OrkLoginString();
lsA.setUser(user);
lsA.setLoginString("2006");
- LoginString lsB = new LoginString();
+ OrkLoginString lsB = new OrkLoginString();
lsB.setUser(user);
lsB.setLoginString("raymond");
hbnSession.save(user);
@@ -67,17 +67,17 @@ public class FillDatabase {
hbnSession.save(lsB);
// user 2
- User user2 = new User();
+ OrkUser user2 = new OrkUser();
user2.setFirstname("Bert");
user2.setLastname("Nolte");
user2.setPassword("bert");
- LoginString ls2 = new LoginString();
+ OrkLoginString ls2 = new OrkLoginString();
ls2.setUser(user2);
ls2.setLoginString("2000");
- LoginString ls2A = new LoginString();
+ OrkLoginString ls2A = new OrkLoginString();
ls2A.setUser(user2);
ls2A.setLoginString("2001");
- LoginString ls2B = new LoginString();
+ OrkLoginString ls2B = new OrkLoginString();
ls2B.setUser(user2);
ls2B.setLoginString("bert");
hbnSession.save(user2);
@@ -86,7 +86,7 @@ public class FillDatabase {
hbnSession.save(ls2B);
// create program that does not filter anything
- RecProgram prog1 = new RecProgram();
+ OrkProgram prog1 = new OrkProgram();
prog1.setName("Test program");
hbnSession.save(prog1);
@@ -94,8 +94,8 @@ public class FillDatabase {
String lastParty = "123-234-5678";
java.util.Random generator = new java.util.Random();
for(int i=0; i<500; i++) {
- RecSegment seg = new RecSegment();
- RecTape tape = new RecTape();
+ OrkSegment seg = new OrkSegment();
+ OrkTape tape = new OrkTape();
tape.setService(service);
tape.setFilename("f1.mp3");
@@ -142,7 +142,7 @@ public class FillDatabase {
seg.setDuration(duration);
tape.setDuration(duration+1);
- seg.setRecTape(tape);
+ seg.setTape(tape);
hbnSession.save(tape);
hbnSession.save(seg);
}
diff --git a/orkbasej/java/net/sf/oreka/test/FillDatabaseProgram.java b/orkbasej/java/net/sf/oreka/test/FillDatabaseProgram.java
index 8d980bc..b57c26e 100644
--- a/orkbasej/java/net/sf/oreka/test/FillDatabaseProgram.java
+++ b/orkbasej/java/net/sf/oreka/test/FillDatabaseProgram.java
@@ -3,7 +3,7 @@ package net.sf.oreka.test;
import java.util.List;
import net.sf.oreka.HibernateManager;
-import net.sf.oreka.persistent.RecProgram;
+import net.sf.oreka.persistent.OrkProgram;
import org.hibernate.Criteria;
import org.hibernate.Session;
@@ -20,12 +20,12 @@ public class FillDatabaseProgram {
Session hbnSession = hibernateManager.getSession();
Transaction tx = hbnSession.beginTransaction();
- RecProgram prg = new RecProgram();
+ OrkProgram prg = new OrkProgram();
prg.setDescription("my program 1");
prg.setName("myprog1");
hbnSession.save(prg);
- prg = new RecProgram();
+ prg = new OrkProgram();
prg.setDescription("my program 2");
prg.setName("myprog2");
hbnSession.save(prg);
@@ -33,7 +33,7 @@ public class FillDatabaseProgram {
tx.commit();
List recPrograms;
- Criteria crit = hbnSession.createCriteria(RecProgram.class);
+ Criteria crit = hbnSession.createCriteria(OrkProgram.class);
//crit.add( Expression.eq( "color", eg.Color.BLACK ) );
//crit.setMaxResults(10);
recPrograms = crit.list();
diff --git a/orkbasej/java/net/sf/oreka/test/FillDatabaseUser.java b/orkbasej/java/net/sf/oreka/test/FillDatabaseUser.java
index 6942312..6b14114 100644
--- a/orkbasej/java/net/sf/oreka/test/FillDatabaseUser.java
+++ b/orkbasej/java/net/sf/oreka/test/FillDatabaseUser.java
@@ -4,8 +4,8 @@ import java.util.Collection;
import java.util.Iterator;
import net.sf.oreka.HibernateManager;
-import net.sf.oreka.persistent.LoginString;
-import net.sf.oreka.persistent.User;
+import net.sf.oreka.persistent.OrkLoginString;
+import net.sf.oreka.persistent.OrkUser;
import org.apache.log4j.PropertyConfigurator;
import org.hibernate.Session;
@@ -17,7 +17,7 @@ public class FillDatabaseUser {
public static void main(String args[]) throws Exception
{
- User usr = null;
+ OrkUser usr = null;
try {
PropertyConfigurator.configure("c:/oreka/test/log4j.properties");
@@ -28,19 +28,19 @@ public class FillDatabaseUser {
Transaction tx = hbnSession.beginTransaction();
for(int i=0; i<100; i++) {
- User user = new User();
+ OrkUser user = new OrkUser();
user.setFirstname("fn" + i);
user.setLastname("ln" + i);
user.setPassword("password");
hbnSession.save(user);
- LoginString ls = new LoginString();
+ OrkLoginString ls = new OrkLoginString();
ls.setLoginString("ls" + i);
//ls.bidirSetUser(user);
ls.setUser(user);
hbnSession.save(ls);
- LoginString ls2 = new LoginString();
+ OrkLoginString ls2 = new OrkLoginString();
ls2.setLoginString("ls2" + i);
//ls2.bidirSetUser(user);
ls2.setUser(user);