TavernerPOS - Source Code
Clone:
git clone http://www.librarysmith.co.uk/tavernerPOS
package com.floreantpos.model.base;
import java.io.Serializable;
/**
* This is an object that contains data related to the DRAWER_ASSIGNED_HISTORY table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="DRAWER_ASSIGNED_HISTORY"
*/
public abstract class BaseDrawerAssignedHistory implements Comparable, Serializable {
public static String REF = "DrawerAssignedHistory"; //$NON-NLS-1$
public static String PROP_USER = "user"; //$NON-NLS-1$
public static String PROP_OPERATION = "operation"; //$NON-NLS-1$
public static String PROP_TIME = "time"; //$NON-NLS-1$
public static String PROP_ID = "id"; //$NON-NLS-1$
// constructors
public BaseDrawerAssignedHistory () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseDrawerAssignedHistory (java.lang.Integer id) {
this.setId(id);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer id;
// fields
protected java.util.Date time;
protected java.lang.String operation;
// many to one
private com.floreantpos.model.User user;
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="assigned"
* column="ID"
*/
public java.lang.Integer getId () {
return id;
}
/**
* Set the unique identifier of this class
* @param id the new ID
*/
public void setId (java.lang.Integer id) {
this.id = id;
this.hashCode = Integer.MIN_VALUE;
}
/**
* Return the value associated with the column: TIME
*/
public java.util.Date getTime () {
return time;
}
/**
* Set the value related to the column: TIME
* @param time the TIME value
*/
public void setTime (java.util.Date time) {
this.time = time;
}
/**
* Return the value associated with the column: OPERATION
*/
public java.lang.String getOperation () {
return operation;
}
/**
* Set the value related to the column: OPERATION
* @param operation the OPERATION value
*/
public void setOperation (java.lang.String operation) {
this.operation = operation;
}
/**
* Return the value associated with the column: USER
*/
public com.floreantpos.model.User getUser () {
return user;
}
/**
* Set the value related to the column: USER
* @param user the USER value
*/
public void setUser (com.floreantpos.model.User user) {
this.user = user;
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.floreantpos.model.DrawerAssignedHistory)) return false;
else {
com.floreantpos.model.DrawerAssignedHistory drawerAssignedHistory = (com.floreantpos.model.DrawerAssignedHistory) obj;
if (null == this.getId() || null == drawerAssignedHistory.getId()) return false;
else return (this.getId().equals(drawerAssignedHistory.getId()));
}
}
public int hashCode () {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getId()) return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":" + this.getId().hashCode(); //$NON-NLS-1$
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public int compareTo (Object obj) {
if (obj.hashCode() > hashCode()) return 1;
else if (obj.hashCode() < hashCode()) return -1;
else return 0;
}
public String toString () {
return super.toString();
}
}
- Details
- Last Updated: Monday, 04 April 2016 02:04
- Hits: 35590066