1 19 20 package org.apache.cayenne.project.validator; 21 22 import org.apache.cayenne.project.ProjectPath; 23 24 30 public class ValidationInfo { 31 public static final int VALID = 0; 32 public static final int WARNING = 1; 33 public static final int ERROR = 2; 34 35 protected ProjectPath path; 36 protected String message; 37 protected int severity; 38 39 42 public ValidationInfo(int severity, String message, ProjectPath path) { 43 this.severity = severity; 44 this.message = message; 45 this.path = path; 46 } 47 48 public Object getValidatedObject() { 49 return path.getObject(); 50 } 51 52 public Object getValidatedObjectParent() { 53 return path.getObjectParent(); 54 } 55 56 public String toString() { 57 return getMessage(); 58 } 59 60 64 public String getMessage() { 65 return message; 66 } 67 68 72 public int getSeverity() { 73 return severity; 74 } 75 76 80 public ProjectPath getPath() { 81 return path; 82 } 83 } 84 | Popular Tags |