Class TimestampedEntityTransaction
java.lang.Object
es.uvigo.esei.sing.textproc.persistence.TimestampedEntityTransaction
- All Implemented Interfaces:
java.lang.Comparable<TimestampedEntityTransaction>
final class TimestampedEntityTransaction extends java.lang.Object implements java.lang.Comparable<TimestampedEntityTransaction>
Encapsulates a entity transaction with its creation time. Objects of this
class can be sorted by the entity transaction creation order. However,
two timestamped entity transactions are equal if and only if their underlying
entity transaction are equal.
- Author:
- Alejandro González García
-
Constructor Summary
Constructors Constructor Description TimestampedEntityTransaction(@NonNull javax.persistence.EntityTransaction entityTransaction)
Encapsulates the given entity transaction in a timestamped entity transaction. -
Method Summary
Modifier and Type Method Description int
compareTo(TimestampedEntityTransaction o)
boolean
equals(java.lang.Object other)
int
hashCode()
-
Constructor Details
-
TimestampedEntityTransaction
public TimestampedEntityTransaction(@NonNull @NonNull javax.persistence.EntityTransaction entityTransaction)Encapsulates the given entity transaction in a timestamped entity transaction.- Parameters:
entityTransaction
- The entity transaction to encapsulate.- Throws:
java.lang.IllegalArgumentException
- IfentityTransaction
isnull
.
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfacejava.lang.Comparable<TimestampedEntityTransaction>
-
equals
- Overrides:
equals
in classjava.lang.Object
-
hashCode
- Overrides:
hashCode
in classjava.lang.Object
-