@Override public int hashCode() { if (id != null) { return id.intValue(); } return super.hashCode(); }
@Override public int hashCode() { int result = (id != null) ? id.intValue() : 0; result = 31 * result + (desc != null ? desc.hashCode() : 0); result = 31 * result + (error != null ? error.hashCode() : 0); result = 31 * result + (username != null ? username.hashCode() : 0); result = 31 * result + (createdDate != null ? createdDate.hashCode() : 0); return result; }
public Long getTrial_remain() { if (!trial_terminado) { Calendar cal = Calendar.getInstance(); cal.setTime(fecha_inicio); cal.add(Calendar.DAY_OF_YEAR, trial_tiempo.intValue()); Date today = new Date(); return ((cal.getTime().getTime() - today.getTime()) / (1000 * 60 * 60 * 24)); } return 0L; }
public String toString() { StringBuffer sb = new StringBuffer(); sb.append("StudentCredit--> id: %d Student id: %d IsActive: %x IsConsumed: %x"); sb.append(" creditNote: %s creditDate: %s consumeNote: %s consumeDate: %s credit: %f"); return String.format( sb.toString(), id.intValue(), msdStudentId, isActive, isConsumed, creditNote, null != creditDate ? new SimpleDateFormat("MM/dd/yyyy HH:mm:ss").format(creditDate) : "n/a", consumeNote, null != consumedDate ? new SimpleDateFormat("MM/dd/yyyy HH:mm:ss").format(consumedDate) : "n/a", credit.floatValue()); }
public String toString() { StringBuffer sb = new StringBuffer(); sb.append("StudentFee--> id: %d Student id: %d Object Name: %s Object Id: %d"); sb.append( " IsActive: %x IsPaid: %x IsWaiver: %x PayTime: %s PayType: %s PayNot: %s FeeNot: %s"); return String.format( sb.toString(), id.intValue(), msdStudentId, msdStudentFeeObjectName, msdStudentFeeObjectId, isActive, isPaid, isWaiver, null != payTime ? new SimpleDateFormat("MM/dd/yyyy HH:mm:ss").format(payTime) : "n/a", payType, payNote, feeNote); }