public class Path
extends java.lang.Object
|
|
|
|
|
| Type | Syntax |
| outbound to object | class:link link class:link.key_field |
| put to a field | class:link.field link.field |
| simple field | field |
| inward link | [class:link#*] [class:link] [link] |
| chained | [class:link#*].link.field |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DISPLAY_CLASS_NAME
Display type Class Name
|
static java.lang.String |
DISPLAY_GLOBAL_KEY
Display type Global Key
|
static java.lang.String |
DISPLAY_ROW_UID
Display type Row UID
|
static java.lang.String |
PARAM_DISPLAY
The PARAMETER DISPLAY
|
static java.lang.String |
PARAMS_OPTION_ENCODE
encode
|
static java.lang.String |
PARAMS_OPTION_HIDE
hide
|
static int |
RESULTS_ALL
all results
|
static int |
RESULTS_MEMORY_ONLY
Only in memory results
|
| Modifier | Constructor and Description |
|---|---|
protected |
Path(DataSource ds)
Creates a new Path without an actual supplied path.
|
|
Path(DataSource ds,
java.lang.String thePath)
Creates a new Path.
|
|
Path(DataSource ds,
java.lang.String thePath,
DBClassConcrete baseClass)
Creates a new Path.
|
| Modifier and Type | Method and Description |
|---|---|
DBObject |
createInwardTarget(DBObject base)
Short hand method to create a inward linked object if missing.
|
protected Link |
createLink(java.lang.String thePath,
VirtualDB layer,
DBClassConcrete baseClass)
LookUpPath add behaviour
|
DBField |
findTargetField()
The field that this path points to.
|
java.lang.String |
getAsciiDescription()
The ASCII description of this path.
|
java.lang.String |
getAsciiDescription(boolean longFormat)
The ASCII description of this path.
|
java.lang.String |
getAsciiDescription(boolean longFormat,
DBObject base)
The ASCII description of this path.
|
java.lang.String |
getAsciiDescription(boolean longFormat,
DBObject base,
java.lang.String paramProcOption)
The ASCII description of this path.
|
DBClassConcrete |
getBaseClassConcrete()
The DBClass that is the base of this path.
|
java.lang.String |
getBinaryDescription()
A "binary" version of the path.
|
java.lang.String |
getBinaryDescription(boolean longFormat)
A "binary" version of the path.
|
java.lang.String |
getBinaryDescription(boolean longFormat,
DBObject base) |
DBResult |
getResult(DBObject base,
HintField hint)
Returns a record set for all inward linked records.
|
DBResult |
getResult(DBObject base,
HintField hint,
int type)
Returns a record set for all inward linked records.
|
Link[] |
getSteps()
Returns a list of links that make up this path.
|
DBObject |
getTarget(DBObject base)
Returns the object that this path points to, start for the base object.
|
DBObject |
getTarget(DBObject base,
boolean createMissingObjects)
Walks to the last object.
|
DBClassConcrete |
getTargetClassConcrete()
The DBClass that this path points to.
|
DBField |
getTargetField()
The field that this path points to.
|
FldParams |
getTargetParams() |
GlobalKey |
getTargetRow()
A short hand method to returns the RowId of the target object.
|
java.lang.Object |
getValue(DBObject base)
Returns the value for the target field from the target object and also is language aware
|
boolean |
hasInwardLink()
does this path have an inward link ?
|
boolean |
isRuntimeEval()
Is this path runtime evaluated.
|
boolean |
isSimpleField()
Does this path just point to a field within this class.
|
protected void |
parse(java.lang.String thePath,
DBClassConcrete baseClass) |
java.lang.String |
toString()
Return the ascii version of the path.
|
public static final int RESULTS_MEMORY_ONLY
public static final int RESULTS_ALL
public static final java.lang.String PARAMS_OPTION_HIDE
public static final java.lang.String PARAMS_OPTION_ENCODE
public static final java.lang.String PARAM_DISPLAY
public static final java.lang.String DISPLAY_ROW_UID
public static final java.lang.String DISPLAY_GLOBAL_KEY
public static final java.lang.String DISPLAY_CLASS_NAME
public Path(@Nonnull
DataSource ds,
@Nonnull
java.lang.String thePath)
throws InvalidPathException
ds - The data source for this path.thePath - The actual pathInvalidPathException - The syntax for the path is wrong or contains missing classes or fields.public Path(@Nonnull
DataSource ds,
@Nonnull
java.lang.String thePath,
@Nullable
DBClassConcrete baseClass)
throws InvalidPathException
ds - The data source for this path.thePath - The actual pathbaseClass - The base class to be used for this path.InvalidPathException - The syntax for the path is wrong or contains missing classes or fields.protected Path(@Nonnull
DataSource ds)
ds - The data source for this path.@CheckReturnValue @Nonnull public java.lang.String getAsciiDescription()
@CheckReturnValue @Nonnull public java.lang.String getAsciiDescription(boolean longFormat)
longFormat - @CheckReturnValue
@Nonnull
public java.lang.String getAsciiDescription(boolean longFormat,
@Nullable
DBObject base)
base - the base objectlongFormat - A flag to get the format@CheckReturnValue
@Nonnull
public java.lang.String getAsciiDescription(boolean longFormat,
@Nullable
DBObject base,
@Nullable
java.lang.String paramProcOption)
base - the base objectparamProcOption - longFormat - A flag to get the format@CheckReturnValue public boolean hasInwardLink()
@CheckReturnValue public boolean isSimpleField()
@CheckReturnValue public boolean isRuntimeEval()
@CheckReturnValue @Nonnull public java.lang.String toString()
toString in class java.lang.Object@CheckReturnValue @Nonnull public java.lang.String getBinaryDescription()
@CheckReturnValue @Nonnull public java.lang.String getBinaryDescription(boolean longFormat)
longFormat - @CheckReturnValue
@Nonnull
public java.lang.String getBinaryDescription(boolean longFormat,
@Nullable
DBObject base)
longFormat - base - the base object@Nullable @CheckReturnValue public DBField getTargetField()
@Nonnull @CheckReturnValue public DBField findTargetField() throws java.lang.NoSuchFieldException
java.lang.NoSuchFieldException - no target field for path@CheckReturnValue @Nullable public DBClassConcrete getTargetClassConcrete()
@CheckReturnValue
@Nullable
public java.lang.Object getValue(@Nullable
DBObject base)
throws java.lang.Exception
base - the base objectjava.lang.Exception - a serious problem@CheckReturnValue @Nullable public DBObject getTarget(@Nullable DBObject base) throws java.lang.Exception
base - The object to start our journeyjava.lang.Exception - a serious problem.@CheckReturnValue @Nullable public DBObject getTarget(@Nullable DBObject base, boolean createMissingObjects) throws java.lang.Exception
base - The object to start our journeycreateMissingObjects - Is the target object doesn't exist should we create it.java.lang.Exception - A serious problem occurred.@CheckReturnValue @Nullable public FldParams getTargetParams()
@CheckReturnValue @Nullable public GlobalKey getTargetRow() throws java.lang.Exception
java.lang.Exception - A serious problem occurred@Nullable public DBObject createInwardTarget(@Nullable DBObject base) throws java.lang.Exception
base - The base object to start our journey.java.lang.Exception - A serious problem occurred.@CheckReturnValue @Nonnull public final DBResult getResult(@Nullable DBObject base, @Nullable HintField hint) throws java.lang.Exception
hint - the hint of the next records.base - The base object to start our journeyjava.lang.Exception - A serious problem occurred.@CheckReturnValue @Nonnull public final DBResult getResult(@Nullable DBObject base, @Nullable HintField hint, int type) throws java.lang.Exception
hint - the hint of the next records.base - The base object to start our journeytype - the typejava.lang.Exception - A serious problem occurred.@CheckReturnValue @Nonnull public Link[] getSteps()
@CheckReturnValue @Nullable public DBClassConcrete getBaseClassConcrete()
protected void parse(@Nonnull
java.lang.String thePath,
DBClassConcrete baseClass)
throws InvalidPathException
thePath - baseClass - The base classInvalidPathExceptionprotected Link createLink(java.lang.String thePath, VirtualDB layer, DBClassConcrete baseClass) throws InvalidLink
thePath - layer - the layerbaseClass - The base classInvalidLinkstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.