Fisheye: Tag 78cef6f4ac9e7652bbbce787bd054fca65e0763f refers to a dead (removed) revision in file `lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/Pixlr.hbm.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 78cef6f4ac9e7652bbbce787bd054fca65e0763f refers to a dead (removed) revision in file `lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/PixlrConfigItem.hbm.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 78cef6f4ac9e7652bbbce787bd054fca65e0763f refers to a dead (removed) revision in file `lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/PixlrSession.hbm.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 78cef6f4ac9e7652bbbce787bd054fca65e0763f refers to a dead (removed) revision in file `lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/PixlrUser.hbm.xml'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/Pixlr.java =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r78cef6f4ac9e7652bbbce787bd054fca65e0763f --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/Pixlr.java (.../Pixlr.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/Pixlr.java (.../Pixlr.java) (revision 78cef6f4ac9e7652bbbce787bd054fca65e0763f) @@ -21,102 +21,85 @@ * **************************************************************** */ - package org.lamsfoundation.lams.tool.pixlr.model; import java.util.Date; import java.util.HashSet; import java.util.Set; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; + import org.apache.log4j.Logger; -import org.lamsfoundation.lams.tool.pixlr.service.PixlrService; -/** - * - */ - +@Entity +@Table(name = "tl_lapixl10_pixlr") public class Pixlr implements java.io.Serializable, Cloneable { - - /** - * - */ private static final long serialVersionUID = 579733009969321015L; - static Logger log = Logger.getLogger(PixlrService.class.getName()); + private static Logger log = Logger.getLogger(Pixlr.class.getName()); - // Fields - /** - * - */ + @Id + @Column + @GeneratedValue(strategy = GenerationType.IDENTITY) private Long uid; + @Column(name = "create_date") private Date createDate; + @Column(name = "update_date") private Date updateDate; + @Column(name = "create_by") private Long createBy; + @Column private String title; + @Column private String instructions; + @Column(name = "lock_on_finished") private boolean lockOnFinished; + @Column(name = "reflect_on_activity") private boolean reflectOnActivity; + @Column(name = "allow_view_others_images") private boolean allowViewOthersImages; + @Column(name = "reflect_instructions") private String reflectInstructions; + @Column(name = "content_in_use") private boolean contentInUse; + @Column(name = "define_later") private boolean defineLater; + @Column(name = "tool_content_id") private Long toolContentId; + @Column(name = "image_file_name") private String imageFileName; // Image uploaded for pixlr + @Column(name = "image_width") private Long imageWidth; + @Column(name = "image_height") private Long imageHeight; - private Set pixlrSessions; + @OneToMany(mappedBy = "pixlr") + private Set pixlrSessions = new HashSet(); - // Constructors - - /** default constructor */ public Pixlr() { } - /** full constructor */ - public Pixlr(Date createDate, Date updateDate, Long createBy, String title, String instructions, - boolean lockOnFinished, boolean filteringEnabled, String filterKeywords, String onlineInstructions, - String offlineInstructions, boolean contentInUse, boolean defineLater, Long toolContentId, - String reflectInstructions, Set pixlrSessions, String imageFileName, Long imageWidth, - Long imageHeight, boolean allowViewOthersImages) { - this.createDate = createDate; - this.updateDate = updateDate; - this.createBy = createBy; - this.title = title; - this.instructions = instructions; - this.lockOnFinished = lockOnFinished; - this.contentInUse = contentInUse; - this.defineLater = defineLater; - this.toolContentId = toolContentId; - this.pixlrSessions = pixlrSessions; - this.imageFileName = imageFileName; - this.reflectInstructions = reflectInstructions; - this.imageHeight = imageHeight; - this.imageWidth = imageWidth; - this.allowViewOthersImages = allowViewOthersImages; - } - - // Property accessors - /** - * - * - */ - public Long getUid() { return uid; } @@ -125,11 +108,6 @@ this.uid = uid; } - /** - * - * - */ - public Date getCreateDate() { return createDate; } @@ -138,11 +116,6 @@ this.createDate = createDate; } - /** - * - * - */ - public Date getUpdateDate() { return updateDate; } @@ -151,11 +124,6 @@ this.updateDate = updateDate; } - /** - * - * - */ - public Long getCreateBy() { return createBy; } @@ -164,11 +132,6 @@ this.createBy = createBy; } - /** - * - * - */ - public String getTitle() { return title; } @@ -177,11 +140,6 @@ this.title = title; } - /** - * - * - */ - public String getInstructions() { return instructions; } @@ -190,11 +148,6 @@ this.instructions = instructions; } - /** - * - * - */ - public boolean isLockOnFinished() { return lockOnFinished; } @@ -203,9 +156,6 @@ this.lockOnFinished = lockOnFinished; } - /** - * - */ public boolean isReflectOnActivity() { return reflectOnActivity; } @@ -214,9 +164,6 @@ this.reflectOnActivity = reflectOnActivity; } - /** - * - */ public boolean isAllowViewOthersImages() { return allowViewOthersImages; } @@ -225,11 +172,6 @@ this.allowViewOthersImages = allowViewOthersImages; } - /** - * - * - */ - public boolean isContentInUse() { return contentInUse; } @@ -238,11 +180,6 @@ this.contentInUse = contentInUse; } - /** - * - * - */ - public boolean isDefineLater() { return defineLater; } @@ -251,11 +188,6 @@ this.defineLater = defineLater; } - /** - * - * - */ - public Long getToolContentId() { return toolContentId; } @@ -264,13 +196,6 @@ this.toolContentId = toolContentId; } - /** - * - * - * - * - */ - public Set getPixlrSessions() { return pixlrSessions; } @@ -279,11 +204,6 @@ this.pixlrSessions = pixlrSessions; } - /** - * toString - * - * @return String - */ @Override public String toString() { StringBuffer buffer = new StringBuffer(); @@ -346,11 +266,6 @@ return pixlr; } - /** - * - * - */ - public String getImageFileName() { return imageFileName; } @@ -359,11 +274,6 @@ this.imageFileName = imageFileName; } - /** - * - * - */ - public Long getImageWidth() { return imageWidth; } @@ -372,11 +282,6 @@ this.imageWidth = imageWidth; } - /** - * - * - */ - public Long getImageHeight() { return imageHeight; } @@ -385,15 +290,11 @@ this.imageHeight = imageHeight; } - /** - * - */ public String getReflectInstructions() { return reflectInstructions; } public void setReflectInstructions(String reflectInstructions) { this.reflectInstructions = reflectInstructions; } - -} +} \ No newline at end of file Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrConfigItem.java =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r78cef6f4ac9e7652bbbce787bd054fca65e0763f --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrConfigItem.java (.../PixlrConfigItem.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrConfigItem.java (.../PixlrConfigItem.java) (revision 78cef6f4ac9e7652bbbce787bd054fca65e0763f) @@ -20,29 +20,39 @@ * **************************************************************** */ - package org.lamsfoundation.lams.tool.pixlr.model; -/** - * - */ -public class PixlrConfigItem { +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +@Entity +@Table(name = "tl_lapixl10_configuration") +public class PixlrConfigItem implements Serializable { + private static final long serialVersionUID = 930482766653472636L; public static final String KEY_LANGUAGE_CSV = "LanguageCSV"; + @Id + @Column(name = "uid") + @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; + + @Column(name = "config_key") String configKey; + + @Column(name = "config_value") String configValue; public PixlrConfigItem() { } - /** - * - * - */ public Long getId() { return id; } @@ -51,10 +61,6 @@ this.id = id; } - /** - * - * - */ public String getConfigKey() { return configKey; } @@ -63,15 +69,11 @@ this.configKey = configKey; } - /** - * - */ public String getConfigValue() { return configValue; } public void setConfigValue(String configValue) { this.configValue = configValue; } - -} +} \ No newline at end of file Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrSession.java =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r78cef6f4ac9e7652bbbce787bd054fca65e0763f --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrSession.java (.../PixlrSession.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrSession.java (.../PixlrSession.java) (revision 78cef6f4ac9e7652bbbce787bd054fca65e0763f) @@ -21,71 +21,61 @@ * **************************************************************** */ - package org.lamsfoundation.lams.tool.pixlr.model; import java.util.Date; import java.util.HashSet; import java.util.Set; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.Table; + import org.apache.log4j.Logger; -/** - * - * Represents the tool session. - * - * - */ - +@Entity +@Table(name = "tl_lapixl10_session") public class PixlrSession implements java.io.Serializable { + private static final long serialVersionUID = 4407078136514639026L; private static Logger log = Logger.getLogger(PixlrSession.class); - /** - * - */ - private static final long serialVersionUID = 4407078136514639026L; - // Fields + @Id + @Column + @GeneratedValue(strategy = GenerationType.IDENTITY) private Long uid; + @Column(name = "session_end_date") private Date sessionEndDate; + @Column(name = "session_start_date") private Date sessionStartDate; + @Column private Integer status; + @Column(name = "session_id") private Long sessionId; + @Column(name = "session_name") private String sessionName; + @ManyToOne + @JoinColumn(name = "pixlr_uid") private Pixlr pixlr; - private Set pixlrUsers; + @OneToMany(mappedBy = "pixlrSession") + private Set pixlrUsers = new HashSet(); - // Constructors - - /** default constructor */ public PixlrSession() { } - /** full constructor */ - public PixlrSession(Date sessionEndDate, Date sessionStartDate, Integer status, Long sessionId, String sessionName, - Pixlr pixlr, Set pixlrUsers) { - this.sessionEndDate = sessionEndDate; - this.sessionStartDate = sessionStartDate; - this.status = status; - this.sessionId = sessionId; - this.sessionName = sessionName; - this.pixlr = pixlr; - this.pixlrUsers = pixlrUsers; - } - - // Property accessors - /** - * - * - */ - public Long getUid() { return this.uid; } @@ -94,11 +84,6 @@ this.uid = uid; } - /** - * - * - */ - public Date getSessionEndDate() { return this.sessionEndDate; } @@ -107,11 +92,6 @@ this.sessionEndDate = sessionEndDate; } - /** - * - * - */ - public Date getSessionStartDate() { return this.sessionStartDate; } @@ -120,11 +100,6 @@ this.sessionStartDate = sessionStartDate; } - /** - * - * - */ - public Integer getStatus() { return this.status; } @@ -133,11 +108,6 @@ this.status = status; } - /** - * - * - */ - public Long getSessionId() { return this.sessionId; } @@ -146,11 +116,6 @@ this.sessionId = sessionId; } - /** - * - * - */ - public String getSessionName() { return this.sessionName; } @@ -159,12 +124,6 @@ this.sessionName = sessionName; } - /** - * - * - * - */ - public Pixlr getPixlr() { return this.pixlr; } @@ -173,13 +132,6 @@ this.pixlr = pixlr; } - /** - * - * - * - * - */ - public Set getPixlrUsers() { return this.pixlrUsers; } @@ -188,11 +140,6 @@ this.pixlrUsers = pixlrUsers; } - /** - * toString - * - * @return String - */ @Override public String toString() { StringBuffer buffer = new StringBuffer(); @@ -234,7 +181,6 @@ @Override public Object clone() { - PixlrSession session = null; try { session = (PixlrSession) super.clone(); @@ -244,5 +190,4 @@ } return session; } - -} +} \ No newline at end of file Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrUser.java =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r78cef6f4ac9e7652bbbce787bd054fca65e0763f --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrUser.java (.../PixlrUser.java) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrUser.java (.../PixlrUser.java) (revision 78cef6f4ac9e7652bbbce787bd054fca65e0763f) @@ -21,79 +21,81 @@ * **************************************************************** */ - package org.lamsfoundation.lams.tool.pixlr.model; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + import org.lamsfoundation.lams.usermanagement.dto.UserDTO; /** * * Caches the user details. This allows the tool to be more efficient at * displaying user names but means that when people's names change, they won't * change in the "old" tool data. - * - * */ - +@Entity +@Table(name = "tl_lapixl10_user") public class PixlrUser implements java.io.Serializable { - - /** - * - */ private static final long serialVersionUID = -3701664859818409197L; - // Fields + @Id + @Column + @GeneratedValue(strategy = GenerationType.IDENTITY) private Long uid; + @Column(name = "user_id") private Long userId; + @Column(name = "last_name") private String lastName; + @Column(name = "first_name") private String firstName; + @Column(name = "login_name") private String loginName; + @ManyToOne + @JoinColumn(name = "pixlr_session_uid") private PixlrSession pixlrSession; + @Column private boolean finishedActivity; + @Column(name = "entry_uid") private Long entryUID; + @Column(name = "image_file_name") private String imageFileName; + @Column private Long imageHeight; + @Column private Long imageWidth; + @Column private boolean imageHidden; - // Constructors - - /** default constructor */ public PixlrUser() { } public PixlrUser(UserDTO user, PixlrSession pixlrSession) { - this.userId = new Long(user.getUserID().intValue()); + this.userId = user.getUserID().longValue(); this.firstName = user.getFirstName(); this.lastName = user.getLastName(); this.loginName = user.getLogin(); this.pixlrSession = pixlrSession; this.finishedActivity = false; } - /** full constructor */ - public PixlrUser(Long userId, String lastName, String firstName, PixlrSession pixlrSession) { - this.userId = userId; - this.lastName = lastName; - this.firstName = firstName; - this.pixlrSession = pixlrSession; - } - - // Property accessors - /** - * - */ public Long getUid() { return this.uid; } @@ -102,10 +104,6 @@ this.uid = uid; } - /** - * - * - */ public Long getUserId() { return this.userId; } @@ -114,10 +112,6 @@ this.userId = userId; } - /** - * - * - */ public String getLastName() { return this.lastName; } @@ -126,10 +120,6 @@ this.lastName = lastName; } - /** - * - * - */ public String getLoginName() { return loginName; } @@ -138,10 +128,6 @@ this.loginName = loginName; } - /** - * - * - */ public String getFirstName() { return this.firstName; } @@ -150,9 +136,6 @@ this.firstName = firstName; } - /** - * - */ public boolean isFinishedActivity() { return finishedActivity; } @@ -161,11 +144,6 @@ this.finishedActivity = finishedActivity; } - /** - * - * - * - */ public PixlrSession getPixlrSession() { return this.pixlrSession; } @@ -174,9 +152,6 @@ this.pixlrSession = pixlrSession; } - /** - * - */ public Long getEntryUID() { return entryUID; } @@ -185,11 +160,6 @@ this.entryUID = entryUID; } - /** - * - * - */ - public String getImageFileName() { return imageFileName; } @@ -198,10 +168,6 @@ this.imageFileName = imageFileName; } - /** - * - * - */ public Long getImageHeight() { return imageHeight; } @@ -210,10 +176,6 @@ this.imageHeight = imageHeight; } - /** - * - * - */ public Long getImageWidth() { return imageWidth; } @@ -222,10 +184,6 @@ this.imageWidth = imageWidth; } - /** - * - * - */ public boolean isImageHidden() { return imageHidden; } @@ -234,11 +192,6 @@ this.imageHidden = imageHidden; } - /** - * toString - * - * @return String - */ @Override public String toString() { StringBuffer buffer = new StringBuffer(); @@ -273,4 +226,4 @@ result = 37 * result + (getUid() == null ? 0 : this.getUid().hashCode()); return result; } -} +} \ No newline at end of file