|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PersistenceError
A PersistenceError
describes an error which could happen
during the loading or saving of jpalo subjects like
s or Subset
s. This class
provides methods and constants to get detailed information about what went
wrong...
CubeView
The example below shows how to receive more information on an
UNKNOWN_ELEMENT
error during cube view loading:
if(error.getType() == PersistenceError.UNKNOWN_ELEMNT) { CubeView view = (CubeView)error.getSource(); String missingElementID = error.getCause(); //get error cause Dimension dimension = (Dimension)error.getLocation(); //at location System.err.println("Error during loading of cube view: "+view.getName()); System.err.println("Could not find element with id '"+missingElementID+"' in dimension '"+dimension.getName()+"'!!"); if(error.getTargetType() == PersistenceError.TARGET_EXPANDED_PATH) { System.err.println("Element was part of expanded path!"); Object section = error.getSection(); if(section instanceof Axis) System.err.println("\tof axis: "+((Axis)section).getId(); } }
Field Summary | |
---|---|
static int[] |
ALL_ERROR_TYPES
|
static int |
LOADING_FAILED
|
static int |
TARGET_EXPANDED_PATH
|
static int |
TARGET_GENERAL
|
static int |
TARGET_HIDDEN_PATH
|
static int |
TARGET_SELECTED
|
static int |
TARGET_SUBSET
|
static int |
TARGET_UNKNOWN
|
static int |
UNKNOWN_AXIS
|
static int |
UNKNOWN_CUBE_VIEW
|
static int |
UNKNOWN_DIMENSION
|
static int |
UNKNOWN_ELEMENT
|
static int |
UNKNOWN_ERROR
|
static int |
UNKNOWN_PATH
|
static int |
UNKNOWN_SUBSET
|
Method Summary | |
---|---|
java.lang.String |
getCause()
Returns the cause of this error depending on the type of error. |
java.lang.Object |
getLocation()
Returns the location where this error was initiated, e.g. if a dimension could not be found this will return its containing database |
java.lang.String |
getMessage()
Returns the error message |
java.lang.Object |
getSection()
Returns the section where the error occurs, e.g. if the error source is a the section could be an
. |
java.lang.Object |
getSource()
Returns the source which causes this error, e.g. a or a
If no source was determined null is returned |
java.lang.String |
getSourceId()
Returns the id of the source which causes this error, e.g. the id of a . |
int |
getTargetType()
Returns one of the defined target constants which describes the target at which the error occurred, e.g. if the error is of type UNKNOWN_ELEMENT the target type could be a TARGET_EXPANDED_PATH meaning that the unknown element was detected at an expanded path. |
int |
getType()
Returns one of the defined error constants to describe the kind of error |
Field Detail |
---|
static final int UNKNOWN_ERROR
static final int UNKNOWN_DIMENSION
static final int UNKNOWN_ELEMENT
static final int UNKNOWN_CUBE_VIEW
static final int UNKNOWN_AXIS
static final int UNKNOWN_SUBSET
static final int UNKNOWN_PATH
static final int LOADING_FAILED
static final int TARGET_UNKNOWN
static final int TARGET_GENERAL
static final int TARGET_SELECTED
static final int TARGET_EXPANDED_PATH
static final int TARGET_HIDDEN_PATH
static final int TARGET_SUBSET
static final int[] ALL_ERROR_TYPES
Method Detail |
---|
java.lang.Object getSource()
CubeView
or a Subset
If no source was determined null
is returned
null
java.lang.String getSourceId()
CubeView
. Note that if getSource()
returns null
that does not automatically mean that this
method returns null
too!
null
java.lang.Object getLocation()
null
if
none could be determinedjava.lang.String getCause()
null
if it could not be
determinedjava.lang.Object getSection()
CubeView
the section could be an
Axis
. If no section could be determined
null
is returned.
null
int getTargetType()
int getType()
java.lang.String getMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |