| velosurf.context.DBReference
All known Subclasses: velosurf.web.VelosurfTool, velosurf.Velosurf,
DBReference | public class DBReference extends HashMap (Code) | | A context wrapper for the main database connection object.
The "$db " context variable is assigned a new instance of this class at each velocity parsing.
author: Claude Brisson |
Constructor Summary | |
protected | DBReference() Default constructor for use by derived classes. | public | DBReference(Database db) Constructs a new database reference. |
Method Summary | |
public String | deobfuscate(Object value) De-obfuscate the given value. | public Object | get(Object key) Generic getter, used to access entities or root attributes by their name.
For attributes, the return value depends upon the type of the attribute :
- if the attribute is multivalued, returns an AttributeReference.
- if the attribute is singlevalued, returns an Instance.
- if the attribute is scalar, returns a String.
Parameters: key - the name of the desired entity or root attribute. | public String | getSchema() Get the schema name. | public UserContext | getUserContext() | protected void | init(Database db) Protected initialization method. | public String | obfuscate(Object value) Obfuscate the given value. | public Object | put(String key, Object value) Generic setter used to set external params for children attributes. | public void | setUserContext(UserContext userContext) |
DBReference | protected DBReference()(Code) | | Default constructor for use by derived classes.
|
DBReference | public DBReference(Database db)(Code) | | Constructs a new database reference.
Parameters: db - the wrapped database connection |
deobfuscate | public String deobfuscate(Object value)(Code) | | De-obfuscate the given value.
Parameters: value - value to de-obfuscate obfuscated value |
get | public Object get(Object key)(Code) | | Generic getter, used to access entities or root attributes by their name.
For attributes, the return value depends upon the type of the attribute :
- if the attribute is multivalued, returns an AttributeReference.
- if the attribute is singlevalued, returns an Instance.
- if the attribute is scalar, returns a String.
Parameters: key - the name of the desired entity or root attribute. an entity, an attribute reference, an instance, a string or nullif not found. See See above. |
getSchema | public String getSchema()(Code) | | Get the schema name.
the schema |
getUserContext | public UserContext getUserContext()(Code) | | User context getter
current user context |
init | protected void init(Database db)(Code) | | Protected initialization method.
Parameters: db - database connection |
obfuscate | public String obfuscate(Object value)(Code) | | Obfuscate the given value.
Parameters: value - value to obfuscate obfuscated value |
put | public Object put(String key, Object value)(Code) | | Generic setter used to set external params for children attributes.
Parameters: key - name of the external parameter Parameters: value - value given to the external parameter the previous value, if any |
setUserContext | public void setUserContext(UserContext userContext)(Code) | | User context setter
Parameters: userContext - user context |
|
|