|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecter.rest.entityDelegates.ERXRestKey
public class ERXRestKey
ERXRestKey represents the keypath that was embodied in the request URL. This differs from a normal keypath in that it can contain object IDs. An ERXRestKey is basically a doubly-linked list of keypath entries.
Constructor Summary | |
---|---|
protected |
ERXRestKey()
|
|
ERXRestKey(ERXRestContext context,
com.webobjects.eoaccess.EOEntity entity,
java.lang.String keyAlias)
Constructs an ERXRestKey. |
|
ERXRestKey(ERXRestContext context,
com.webobjects.eoaccess.EOEntity entity,
java.lang.String keyAlias,
java.lang.Object value)
Constructs an ERXRestKey. |
Method Summary | |
---|---|
protected void |
_extend(ERXRestKey nextKey,
boolean clone)
Extends this key to the next key (optionally cloning). |
protected ERXRestKey |
_extendWithoutClone(java.lang.String key)
Extends this key "in-place" to the next key in the path. |
protected java.lang.Object |
_value(boolean checkToOnePermissions)
Returns (possibly fetching) the destination value of this key. |
protected void |
appendKey(java.lang.StringBuffer pathBuffer,
boolean skipGID)
Appends this key to the given keypath buffer. |
protected ERXRestKey |
cloneKey(boolean clonePrevious,
boolean cloneNext)
Returns a clone of this key, optionally also cloning back up the keypath. |
protected ERXRestKey |
cloneKeyWithNewEntity(com.webobjects.eoaccess.EOEntity entity,
boolean clonePrevious,
boolean cloneNext)
Returns a clone of this key, optionally also cloning back up the keypath. |
ERXRestContext |
context()
Returns the rest context that was used to create this key. |
com.webobjects.eoaccess.EOEntity |
entity()
Returns the entity that contains this key. |
ERXRestKey |
extend(java.lang.String key)
Clones and extends this key to the next key in a path. |
ERXRestKey |
extend(java.lang.String key,
java.lang.Object value)
Clones and extends this key to the next key in a path with the given cached value. |
ERXRestKey |
firstKey()
Returns the first key in this path (can be this). |
boolean |
isKeyAll()
Returns whether or not this key requests a query against all the values of an Entity (/Site.xml = all Sites). |
boolean |
isKeyGID()
Returns whether or not this key requests a primary key. |
java.lang.String |
key()
Returns the actual key property name for this key. |
java.lang.String |
keyAlias()
Returns the key alias property name for this key. |
ERXRestKey |
lastKey()
Returns the last key in this path (can be this). |
com.webobjects.eoaccess.EOEntity |
nextEntity()
Returns the next entity in this key path (i.e. |
ERXRestKey |
nextKey()
Returns the next key in this path (can be null). |
static ERXRestKey |
parse(ERXRestContext context,
ERXRestRequestNode node,
java.lang.String path)
|
static ERXRestKey |
parse(ERXRestContext context,
java.lang.String path)
Parse the given URL path and return an ERXRestKey that represents it. |
java.lang.String |
path(boolean skipGID)
Returns the key path from this key to the end of the path. |
ERXRestKey |
previousKey()
Returns the previous key in the path (or null if this is the first key). |
java.lang.String |
toString()
|
ERXRestKey |
trimPrevious()
Returns a new ERXRestKey with the previous key path removed, so it appears that this key is the start of the path. |
java.lang.Object |
value()
Returns (possibly fetching) the destination value of this key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ERXRestKey()
public ERXRestKey(ERXRestContext context, com.webobjects.eoaccess.EOEntity entity, java.lang.String keyAlias) throws ERXRestException
context
- the contextentity
- the entity that this key is inkeyAlias
- the alias of the key
ERXRestException
public ERXRestKey(ERXRestContext context, com.webobjects.eoaccess.EOEntity entity, java.lang.String keyAlias, java.lang.Object value) throws ERXRestException
context
- the contextentity
- the entity that this key is inkeyAlias
- the alias of the keyvalue
- the cached value of the key at this point in the path
ERXRestException
Method Detail |
---|
public ERXRestKey trimPrevious() throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException
ERXRestException
- if a general exception occurs
ERXRestSecurityException
- if a security error occurs
ERXRestNotFoundException
- if an object is not found in the kaypathprotected ERXRestKey cloneKeyWithNewEntity(com.webobjects.eoaccess.EOEntity entity, boolean clonePrevious, boolean cloneNext) throws ERXRestException
entity
- the new entity to clone with (typically a superentity)clonePrevious
- if true, the previous key is also cloned
ERXRestException
- if a general exception occursprotected ERXRestKey cloneKey(boolean clonePrevious, boolean cloneNext) throws ERXRestException
clonePrevious
- if true, the previous key is also clonedcloneNext
- if true, the next key is also cloned
ERXRestException
- if a general exception occurspublic ERXRestContext context()
public ERXRestKey extend(java.lang.String key, java.lang.Object value) throws ERXRestException
key
- the next keyvalue
- the current cached value
ERXRestException
- if a general failure occurspublic ERXRestKey extend(java.lang.String key) throws ERXRestException
key
- the next key
ERXRestException
- if a general failure occursprotected ERXRestKey _extendWithoutClone(java.lang.String key) throws ERXRestException
key
- the next key
ERXRestException
- if a general failure occursprotected void _extend(ERXRestKey nextKey, boolean clone) throws ERXRestException
nextKey
- the next keyclone
- if true, clone ourselves
ERXRestException
- if a general failure occurspublic com.webobjects.eoaccess.EOEntity entity()
public java.lang.String keyAlias()
public java.lang.String key()
public ERXRestKey previousKey()
public ERXRestKey firstKey()
public ERXRestKey lastKey()
public java.lang.String path(boolean skipGID)
skipGID
- if true, global ids will be skipped in the generated path
protected void appendKey(java.lang.StringBuffer pathBuffer, boolean skipGID)
pathBuffer
- the current key path bufferskipGID
- if true, global ids will be skipped in the generated pathpublic ERXRestKey nextKey()
public com.webobjects.eoaccess.EOEntity nextEntity() throws ERXRestException
ERXRestException
- if a general error occurspublic java.lang.Object value() throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException
ERXRestException
- if a general error occurs
ERXRestSecurityException
- if fetching the value triggers a security violation
ERXRestNotFoundException
- if the referenced value does not existprotected java.lang.Object _value(boolean checkToOnePermissions) throws ERXRestException, ERXRestSecurityException, ERXRestNotFoundException
checkToOnePermissions
- if false, this will not check permissions on a to-one call (this is necessary under certain
circumstances to provide a more appropriate error messaga).
ERXRestException
- if a general error occurs
ERXRestSecurityException
- if fetching the value triggers a security violation
ERXRestNotFoundException
- if the referenced value does not existpublic boolean isKeyAll()
public boolean isKeyGID()
public java.lang.String toString()
toString
in class java.lang.Object
public static ERXRestKey parse(ERXRestContext context, ERXRestRequestNode node, java.lang.String path) throws ERXRestException, ERXRestNotFoundException
ERXRestException
ERXRestNotFoundException
public static ERXRestKey parse(ERXRestContext context, java.lang.String path) throws ERXRestException, ERXRestNotFoundException
context
- the rest contextpath
- the path to parse
ERXRestException
- if a general exception occurs
ERXRestNotFoundException
- if an object can not be found in the path
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |