com.arsdigita.acs.ug
Class SingleGroupDataSource
java.lang.Object
|
+--com.arsdigita.acs.Selection
|
+--com.arsdigita.acs.ug.GroupDataSource
|
+--com.arsdigita.acs.ug.SingleGroupDataSource
- All Implemented Interfaces:
- DataSource
- public class SingleGroupDataSource
- extends GroupDataSource
Represents a single user group.
Method Summary |
boolean |
contains(String key)
Returns true if this contains a column named
column . |
String |
get(String key)
Generic get-property accessor. |
String[] |
keys()
Returns a list of available keys (column names) in the Selection. |
boolean |
next()
Advances to the next row in the data source, if there is one. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
props
Hashtable props
SingleGroupDataSource
public SingleGroupDataSource(ResultSet rs)
throws SQLException
SingleGroupDataSource
public SingleGroupDataSource(Integer groupId)
SingleGroupDataSource
public SingleGroupDataSource(String module,
String submodule)
throws ACSException
- Given the module and submodule of an administration group, looks up
the group_id. The returned selection only has one key, group_id.
- Parameters:
module
- Which module to look upsubmodule
- An optional submodule to look up.- Throws:
Throws
- ACSException if there is no group.
SingleGroupDataSource
public SingleGroupDataSource(String module)
throws ACSException
- Same as SingleGroupDataSource(module, null).
get
public String get(String key)
throws DataSourceException
- Description copied from class:
Selection
- Generic get-property accessor. Returns the value of the column
named by
key
; if it's a CLOB column, still returns the
text from the CLOB. If it's a DATE column, returns an ANSI date
string (yyyy-mm-dd). Returns an empty string if the column is null
(a perhaps unnecessary evil to prevent the string "null" from popping
up in JSP pages--probably should get rid of this with more consistent
use of ad:sub tag!).
- Overrides:
get
in class Selection
- Following copied from class:
com.arsdigita.acs.Selection
- Throws:
InvalidKeyException
- if key is not found.
next
public boolean next()
- Description copied from class:
Selection
- Advances to the next row in the data source, if there is one.
- Overrides:
next
in class Selection
- Following copied from class:
com.arsdigita.acs.Selection
- Returns:
- true; or false if there are no more elements.
keys
public String[] keys()
- Description copied from class:
Selection
- Returns a list of available keys (column names) in the Selection.
- Overrides:
keys
in class Selection
contains
public boolean contains(String key)
- Description copied from class:
Selection
- Returns
true
if this contains a column named
column
.
- Overrides:
contains
in class Selection