001    package org.nakedobjects.applib.annotation;
002    
003    import java.lang.annotation.ElementType;
004    import java.lang.annotation.Inherited;
005    import java.lang.annotation.Retention;
006    import java.lang.annotation.RetentionPolicy;
007    import java.lang.annotation.Target;
008    
009    
010    /**
011     * Indicates that an instance cannot be persisted by a user, but only programmatically.
012     */
013    @Inherited
014    @Target( { ElementType.TYPE })
015    @Retention(RetentionPolicy.RUNTIME)
016    public @interface NotPersistable {
017    
018        public enum By {
019            USER, USER_OR_PROGRAM
020        }
021    
022        By value() default By.USER_OR_PROGRAM;
023    
024    }
025    
026    // Copyright (c) Naked Objects Group Ltd.