1 package org.bsf.smartValueObject; 2 3 9 public class VersionableFilters { 10 13 public static final VersionableFilter ALL = 14 new VersionableFilter() { 15 public boolean accept(Versionable v) { 16 return true; 17 } 18 }; 19 20 23 public static final VersionableFilter DELETED = 24 new VersionableFilter() { 25 public boolean accept(Versionable v) { 26 return v.isDeleted(); 27 } 28 }; 29 30 33 public static final VersionableFilter CREATED = 34 new VersionableFilter() { 35 public boolean accept(Versionable v) { 36 return v.isCreated() && !v.isDeleted(); 37 } 38 }; 39 40 43 public static final VersionableFilter EXISTING = 44 new VersionableFilter() { 45 public boolean accept(Versionable v) { 46 return !v.isDeleted(); 47 } 48 }; 49 50 53 public static final VersionableFilter DIRTY = 54 new VersionableFilter() { 55 public boolean accept(Versionable v) { 56 return v.isDirty(); 57 } 58 }; 59 60 63 public static final VersionableFilter SMARTCONTAINER = 64 new VersionableFilter() { 65 public boolean accept(Versionable v) { 66 return SmartAccess.isSmartContainer(v); 67 } 68 }; 69 } 70 | Popular Tags |