use of jakarta.persistence.PrePersist in project wildfly by wildfly.
the class LastUpdateListener method setLastUpdate.
@PreUpdate
@PrePersist
public void setLastUpdate(Cat o) {
o.setLastUpdate(new Date());
o.setManualVersion(o.getManualVersion() + 1);
}
use of jakarta.persistence.PrePersist in project hibernate-orm by hibernate.
the class LastUpdateListener method setLastUpdate.
@PreUpdate
@PrePersist
public void setLastUpdate(Cat o) {
o.setLastUpdate(new Date());
o.setManualVersion(o.getManualVersion() + 1);
}
use of jakarta.persistence.PrePersist in project tessera by ConsenSys.
the class EncryptedTransactionListener method onSave.
@PrePersist
public void onSave(EncryptedTransaction encryptedTransaction) {
LOGGER.debug("onSave {}", encryptedTransaction);
final EncodedPayload encodedPayload = encryptedTransaction.getPayload();
final EncodedPayloadCodec encodedPayloadCodec = EncodedPayloadCodec.current();
final PayloadEncoder payloadEncoder = PayloadEncoder.create(encodedPayloadCodec);
final byte[] encodedPayloadData = payloadEncoder.encode(encodedPayload);
encryptedTransaction.setEncodedPayloadCodec(encodedPayloadCodec);
encryptedTransaction.setEncodedPayload(encodedPayloadData);
}
Aggregations