| java.lang.Object velosurf.model.Attribute
All known Subclasses: velosurf.model.ImportedKey, velosurf.model.ExportedKey,
Attribute | public class Attribute (Code) | | This class represents an attribute in the object model.
author: Claude Brisson |
Field Summary | |
final public static int | ROW Constant meaning the result is a single row. | final public static int | ROWSET Constant meaning the result is a rowset. | final public static int | SCALAR Constant meaning the result is a scalar. | final public static int | UNDEFINED Constant meaning the return type is undefined. | protected Database | db Database connection. | protected String | query Attribute query. | protected String | resultEntity For row and rowset attributes, the resulting entity (if specified). |
ROW | final public static int ROW(Code) | | Constant meaning the result is a single row.
|
ROWSET | final public static int ROWSET(Code) | | Constant meaning the result is a rowset.
|
SCALAR | final public static int SCALAR(Code) | | Constant meaning the result is a scalar.
|
UNDEFINED | final public static int UNDEFINED(Code) | | Constant meaning the return type is undefined.
|
resultEntity | protected String resultEntity(Code) | | For row and rowset attributes, the resulting entity (if specified).
|
Attribute | public Attribute(String name, Entity entity)(Code) | | Constructor.
Parameters: name - name of this attribute Parameters: entity - parent entity |
addParamName | public void addParamName(String name)(Code) | | Adds a parameter name.
Parameters: name - name of a parameter. |
getCaching | public boolean getCaching()(Code) | | Gets caching state
caching state |
getDB | public Database getDB()(Code) | | Gets the database connection.
database connection |
getEntity | public Entity getEntity()(Code) | | Gets the parent entity
parent entity |
getName | public String getName()(Code) | | Gets the name of this attribute.
name of the attribute |
getResultEntity | public String getResultEntity()(Code) | | Gets the result type.
a string describing the result type. |
getType | public int getType()(Code) | | Get the type of this attribute.
this attribute's type |
query | public RowIterator query(Map<String, Object> source, List refineCriteria, String order) throws SQLException(Code) | | Query the rowset for this attribute.
Parameters: source - source object Parameters: refineCriteria - refine criteria Parameters: order - order clause exception: SQLException - when thrown by the database the resulting row iterator |
setCaching | public void setCaching(boolean c)(Code) | | Sets caching on or off
Parameters: c - caching state |
setForeignKeyColumn | public void setForeignKeyColumn(String col)(Code) | | Declares this attribute as a foreign-key and specifies its foreign-key column.
Parameters: col - the foreign-key column. |
setQuery | public void setQuery(String query)(Code) | | Sets the query.
Parameters: query - this attribute's query |
setResultEntity | public void setResultEntity(String entityName)(Code) | | Sets the result entity.
Parameters: entityName - the name of the result entity. |
setResultType | public void setResultType(int type)(Code) | | Sets the result type.
Parameters: type - |
toString | public String toString()(Code) | | Debug method.
the definition string of this attribute |
|
|