All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jsimpledb.annotation.OnDelete Maven / Gradle / Ivy

There is a newer version: 3.6.1
Show newest version

/*
 * Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
 */

package org.jsimpledb.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotates JSimpleDB model class methods that are to be invoked whenever an object is about to be deleted.
 *
 * 

* Notifications are delivered in the same thread that deletes the object, before the delete actually occurs. * At most one delete notification will ever be delivered for any object deletion event. * *

* The annotated method must be an instance method (i.e., not static), return void, and take zero parameters. * It may have any level of access, including {@code private}. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @Documented public @interface OnDelete { /** * Determines whether this annotation should also be enabled for * {@linkplain org.jsimpledb.SnapshotJTransaction snapshot transaction} objects. * If unset, notifications will only be delivered to non-snapshot (i.e., normal) database instances. * * @return whether enabled for snapshot transactions * @see org.jsimpledb.SnapshotJTransaction */ boolean snapshotTransactions() default false; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy