diff options
| author | Tobias Spitzer | 2014-08-12 08:04:02 +0200 |
|---|---|---|
| committer | Tobias Spitzer | 2014-08-12 08:04:02 +0200 |
| commit | 9aa8f3ad08e71350d0478eec63bf786085883c50 (patch) | |
| tree | aa45205e406f623afae46938d5d9352143d2541b /Dozentenmodulserver/src/sql/SQL.java | |
| parent | Benutzername speichern nun möglich (diff) | |
| download | tutor-module-9aa8f3ad08e71350d0478eec63bf786085883c50.tar.gz tutor-module-9aa8f3ad08e71350d0478eec63bf786085883c50.tar.xz tutor-module-9aa8f3ad08e71350d0478eec63bf786085883c50.zip | |
Erste Tabelle und Datum angepasst
Diffstat (limited to 'Dozentenmodulserver/src/sql/SQL.java')
| -rw-r--r-- | Dozentenmodulserver/src/sql/SQL.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Dozentenmodulserver/src/sql/SQL.java b/Dozentenmodulserver/src/sql/SQL.java index 8622b06b..a642dd22 100644 --- a/Dozentenmodulserver/src/sql/SQL.java +++ b/Dozentenmodulserver/src/sql/SQL.java @@ -3,8 +3,10 @@ package sql; import java.sql.*;
import java.text.DateFormat;
+import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
+import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@@ -296,15 +298,16 @@ public class SQL { Statement stm;
List<Image> list = new ArrayList<Image>();
try {
+
stm = con.createStatement();
ResultSet res=stm
.executeQuery("SELECT vl.GUID_imageID, vl.imageVersion,vl.image_name, vl.cond_hasLicenseRestriction, os.name,os.architecture, '' as lecture,vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user, vl.image_isTemplate FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and vl.image_owner=u.userID and vl.image_name not in (SELECT vl.image_name FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_VLData_lecture lect, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and lect.imageID=vl.GUID_imageID and vl.image_owner=u.userID) union SELECT vl.GUID_imageID, vl.imageVersion,vl.image_name, vl.cond_hasLicenseRestriction, os.name,os.architecture, lect.name as lecture, vl.image_update_time, Concat(u.Nachname,' ',u.Vorname) as user, vl.image_isTemplate FROM bwLehrpool.m_VLData_imageInfo vl, bwLehrpool.m_operatingSystem os, bwLehrpool.m_VLData_lecture lect, bwLehrpool.m_user u Where vl.content_operatingSystem=os.operatingSystemID and lect.imageID=vl.GUID_imageID and vl.image_owner=u.userID;");
-
-
+
while (res.next()) {
-
+
+
list.add(new Image(res.getString("GUID_imageID"), res
.getString("imageVersion"),
res.getString("image_name"), res
@@ -319,7 +322,7 @@ public class SQL { } catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
- }
+ }
return list;
|
