Add a debugging method
authorChristos KK Loverdos <loverdos@gmail.com>
Mon, 19 Mar 2012 13:38:05 +0000 (15:38 +0200)
committerChristos KK Loverdos <loverdos@gmail.com>
Mon, 19 Mar 2012 13:38:05 +0000 (15:38 +0200)
src/main/scala/gr/grnet/aquarium/logic/events/NewWalletEntry.scala

index 93a2115..99b6188 100644 (file)
@@ -73,6 +73,20 @@ case class NewWalletEntry(userId: String,
   def instanceId = currentResourceEvent.instanceId
   def chargslotCount = chargeslots.length
   def isOutOfSync = currentResourceEvent.isOutOfSyncForBillingMonth(yearOfBillingMonth, billingMonth)
+
+  def toDebugString = "%s(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)".format(
+    gr.grnet.aquarium.util.shortClassNameOf(this),
+    userId,
+    referenceTimeslot,
+    entryCredits,
+    oldTotalCredits,
+    newTotalCredits,
+    new MutableDateCalc(whenComputedMillis).toYYYYMMDDHHMMSSSSS,
+    yearOfBillingMonth,
+    billingMonth,
+    resourceEvents,
+    chargeslots,
+    resourceDef)
 }
 
 object NewWalletEntry {