• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/db-4.8.30/java/src/com/sleepycat/persist/model/
1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 2002-2009 Oracle.  All rights reserved.
5 *
6 * $Id$
7 */
8
9package com.sleepycat.persist.model;
10
11import static java.lang.annotation.ElementType.FIELD;
12import static java.lang.annotation.RetentionPolicy.RUNTIME;
13
14import java.lang.annotation.Documented;
15import java.lang.annotation.Retention;
16import java.lang.annotation.Target;
17
18/**
19 * Overrides the default rules for field persistence and defines a field as
20 * being non-persistent even when it is not declared with the
21 * <code>transient</code> keyword.
22 *
23 * <p>By default, the persistent fields of a class are all declared instance
24 * fields that are non-transient (are not declared with the
25 * <code>transient</code> keyword).  The default rules may be overridden by
26 * specifying the {@link NotPersistent} or {@link NotTransient} annotation.</p>
27 *
28 * <p>For example, the following field is non-transient (persistent) with
29 * respect to Java serialization but is transient with respect to the DPL.</p>
30 *
31 * <pre style="code">
32 *      {@code @NotPersistent}
33 *      int myField;
34 * }
35 * </pre>
36 *
37 * @see NotTransient
38 * @author Mark Hayes
39 */
40@Documented @Retention(RUNTIME) @Target(FIELD)
41public @interface NotPersistent {
42}
43