1 19 package org.netbeans.modules.j2ee.common.method; 20 21 import java.util.Collection ; 22 23 29 public final class MethodCustomizerFactory { 30 31 private MethodCustomizerFactory() {} 32 33 public static MethodCustomizer businessMethod(String title, MethodModel method, boolean remote, boolean local, boolean selectLocal, boolean selectRemote, Collection <MethodModel> existingMethods) { 34 return new MethodCustomizer( 35 title, 36 method, 37 local, 38 remote, 39 selectLocal, 40 selectRemote, 41 true, null, false, true, true, null, existingMethods 48 ); 49 } 50 51 public static MethodCustomizer homeMethod(String title, MethodModel method, boolean remote, boolean local, boolean selectLocal, boolean selectRemote, Collection <MethodModel> existingMethods) { 52 return new MethodCustomizer( 53 title, 54 method, 55 local, 56 remote, 57 selectLocal, 58 selectRemote, 59 true, null, false, true, true, null, existingMethods 66 ); 67 } 68 69 public static MethodCustomizer createMethod(String title, MethodModel method, boolean remote, boolean local, boolean selectLocal, boolean selectRemote, Collection <MethodModel> existingMethods) { 70 return new MethodCustomizer( 71 title, 72 method, 73 local, 74 remote, 75 selectLocal, 76 selectRemote, 77 false, null, false, true, true, "create", existingMethods 84 ); 85 } 86 87 public static MethodCustomizer finderMethod(String title, MethodModel method, boolean remote, boolean local, boolean selectLocal, boolean selectRemote, String ejbql, Collection <MethodModel> existingMethods) { 88 return new MethodCustomizer( 89 title, 90 method, 91 local, 92 remote, 93 selectLocal, 94 selectRemote, 95 false, ejbql, true, false, true, "find", existingMethods 102 ); 103 } 104 105 public static MethodCustomizer operationMethod(String title, MethodModel method, Collection <MethodModel> existingMethods) { 106 return new MethodCustomizer( 107 title, 108 method, 109 true, true, true, true, true, null, false, true, false, null, existingMethods 120 ); 121 } 122 123 public static MethodCustomizer selectMethod(String title, MethodModel method, String ejbql, Collection <MethodModel> existingMethods) { 124 return new MethodCustomizer( 125 title, 126 method, 127 false, false, false, false, true, ejbql, false, false, false, "ejbSelect", existingMethods 138 ); 139 } 140 141 } 142 | Popular Tags |