Пример #1
0
 public <T> T enhance(
     Object target,
     Class<? extends Interceptor> injectIntersClass1,
     Class<? extends Interceptor> injectIntersClass2,
     Class<? extends Interceptor> injectIntersClass3) {
   return (T) Enhancer.enhance(target, injectIntersClass1, injectIntersClass2, injectIntersClass3);
 }
Пример #2
0
public class UploadService extends BaseService {

  @SuppressWarnings("unused")
  private static Logger log = Logger.getLogger(UploadService.class);

  public static final UploadService service = Enhancer.enhance(UploadService.class);

  public List<Map<String, String>> upload(String pathType, List<UploadFile> files) {
    List<Map<String, String>> list = new ArrayList<Map<String, String>>();
    for (UploadFile uploadFile : files) {
      String parameterName = uploadFile.getParameterName();
      String fileName = uploadFile.getFileName();
      String contentType = uploadFile.getContentType();
      String originalFileName = uploadFile.getOriginalFileName();

      Upload upload = new Upload();
      upload.set(Upload.column_parametername, parameterName);
      upload.set(Upload.column_filename, fileName);
      upload.set(Upload.column_contenttype, contentType);
      upload.set(Upload.column_originalfilename, originalFileName);
      upload.set(Upload.column_path, pathType);
      upload.save();

      Map<String, String> map = new HashMap<String, String>();
      map.put("ids", upload.getPKValue());
      map.put("fileName", fileName);
      map.put("pathType", pathType);
      list.add(map);
    }
    return list;
  }
}
Пример #3
0
 public <T> T enhance(
     String singletonKey, Object target, Class<? extends Interceptor>... injectIntersClasses) {
   return (T) Enhancer.enhance(singletonKey, target, injectIntersClasses);
 }
Пример #4
0
 public <T> T enhance(String singletonKey, Object target, Interceptor... injectInters) {
   return (T) Enhancer.enhance(singletonKey, target, injectInters);
 }
Пример #5
0
 public <T> T enhance(String singletonKey, Object target) {
   return (T) Enhancer.enhance(singletonKey, target);
 }
Пример #6
0
 public <T> T enhance(Object target, Class<? extends Interceptor>... injectIntersClasses) {
   return (T) Enhancer.enhance(target, injectIntersClasses);
 }
Пример #7
0
 public <T> T enhance(Object target) {
   return (T) Enhancer.enhance(target);
 }
Пример #8
0
 public <T> T enhance(Object target, Interceptor... injectInters) {
   return (T) Enhancer.enhance(target, injectInters);
 }
Пример #9
0
 public <T> T enhance(String singletonKey, Class<T> targetClass, Interceptor... injectInters) {
   return (T) Enhancer.enhance(singletonKey, (Object) targetClass, injectInters);
 }
Пример #10
0
 public <T> T enhance(String singletonKey, Class<T> targetClass) {
   return (T) Enhancer.enhance(singletonKey, targetClass);
 }
Пример #11
0
 public <T> T enhance(
     Class<T> targetClass,
     Class<? extends Interceptor> injectIntersClass1,
     Class<? extends Interceptor> injectIntersClass2) {
   return (T) Enhancer.enhance(targetClass, injectIntersClass1, injectIntersClass2);
 }
Пример #12
0
 public <T> T enhance(Class<T> targetClass, Interceptor... injectInters) {
   return (T) Enhancer.enhance((Object) targetClass, injectInters);
 }
Пример #13
0
 public <T> T enhance(Class<T> targetClass) {
   return (T) Enhancer.enhance(targetClass);
 }