|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jcorporate.expresso.core.dataobjects.BaseDataObject com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject com.jcorporate.expresso.core.dbobj.DBObject com.jcorporate.expresso.core.dbobj.SecuredDBObject com.jcorporate.expresso.core.dbobj.RowSecuredDBObject com.sri.emo.dbobj.PickList
public class PickList
Provide picklists for any attribute.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jcorporate.expresso.core.dbobj.DBObject |
---|
DBObject.FieldError, DBObject.FieldUpdate |
Field Summary | |
---|---|
static String |
ATTRIBUTE_TYPE
|
static String |
COMMENT
|
static String |
CONTINUOUS_SMV_TYPE
|
static String |
DISPLAY_IN_PICKLIST
|
static String |
DUMMY_NODE_TYPE
string constant to use for custom pick list which is INDEPENDENT of any given node type. |
static String |
FINITE_SMV_TYPE
|
static String |
LIST_ID
|
static String |
NODE_TYPE
|
static String |
NOT_SPECIFIED_DISPLAY
|
static String |
ORDER_NUM
|
static String |
TABLE_NAME
|
static String |
TASK_SPECIFICATION_MENU_VALUE
|
static String |
TEMPLATE_MENU_VALUE
|
Fields inherited from class com.jcorporate.expresso.core.dbobj.RowSecuredDBObject |
---|
DEFAULT_PERMISSION_CODE |
Fields inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject |
---|
ADD, ALL_FUNCTIONS, CACHE_NAME, CACHE_TTY, DELETE, SEARCH, SYSTEM_ACCOUNT_NAME, UPDATE |
Fields inherited from class com.jcorporate.expresso.core.dbobj.DBObject |
---|
ATTRIBUTE_ERROR, ATTRIBUTE_ERROR_MESSAGE, ATTRIBUTE_PAGE_LIMIT, BIG_DECIMAL_ZERO, CACHE_LIMIT_PERCENT, CACHE_LIMIT_TTL, EMAIL_MASK, EVENT_ADD, EVENT_DELETE, EVENT_UPDATE, FLOAT_MASK, INT_MASK, IS_CHECK_RELATIONAL_INTEGRITY, IS_MUTABLE, sCacheStats, UPDATE_CHANGED_ONLY, WHERE_KEYWORD |
Fields inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject |
---|
anyFieldsDistinct, anyFieldsToInput, anyFieldsToRetrieve, appendCustomWhere, caseSensitiveQuery, customWhereClause, dbKey, distinctFields, inputFields, localConnection, LONGBINARY_READ_DEFAULT_SIZE, maxRecords, myClassName, myUpdates, offsetRecord, recordSet, retrieveFields, sMetadataMap, sortKeys |
Fields inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject |
---|
currentStatus, globalMask |
Fields inherited from interface com.jcorporate.expresso.core.dataobjects.Securable |
---|
SYSTEM_ACCOUNT |
Fields inherited from interface com.jcorporate.expresso.core.dataobjects.DataObject |
---|
STATUS_CURRENT, STATUS_DELETED, STATUS_NEW, STATUS_UPDATED |
Constructor Summary | |
---|---|
PickList()
constructor without parameters is required by framework, but if you use this constructor, be sure to setRequestingUid() after instantiation |
|
PickList(ControllerRequest request)
|
|
PickList(ControllerRequest request,
String id)
|
|
PickList(DBConnection theConnection,
int theUser)
Constructor |
|
PickList(ReadOnlyUser theUser)
|
|
PickList(String nodeType,
String attribType)
|
Method Summary | |
---|---|
void |
acceptVisitor(ModelVisitor visitor)
Accepts the visitor and redirects the visitor to the appropriate type we're dealing with. |
int |
compare(Object o1,
Object o2)
implement comparator interface |
int |
compareTo(Object o)
Compares this object with the specified object for order. |
String |
getComment()
|
String |
getDisplayString()
|
String |
getID()
|
int |
getIndexNum()
|
String |
getNodeType()
|
String |
getOrderNum()
|
int |
getOrderNumInt()
|
static String |
getPick(String pickindex)
|
String |
getPickAttribType()
|
static String |
getPickFast(String pickindex,
String dbname)
speedy version that skips permission check (for xml) |
static String |
getPicklistID(String dbName,
String nodeType,
String attribType,
String matchValue)
determine ID for particular items |
Transition |
getViewTrans()
provide a transition for viewing this object, suitable for creating an HTTP link |
void |
isAllowed(String requestedFunction)
OVERRIDE to use node type permissions |
boolean |
isRowAllowed(String requestedFunction)
determine if this function is allowed for this requesting user |
void |
setDisplayValue(String descrip)
|
void |
setID(String id)
|
void |
setNodeType(String type)
|
void |
setOrderNum(int order)
|
void |
setPickAttribType(String type)
|
protected void |
setupFields()
Defines the database table name and fields for this DB object |
Methods inherited from class com.jcorporate.expresso.core.dbobj.RowSecuredDBObject |
---|
add, add, addGroupPerm, canRequesterAdministrate, canRequesterRead, canRequesterWrite, checkDeleteDetailPerm, checkKeyLength, defaultGroup, defaultPermissions, delete, deleteAll, find, getAdministrateGroups, getGroups, getPermissions, getReadGroups, getWriteGroups, isAdminGroup, isReadGroup, isRowAllowed, isWriteGroup, ownerID, removeGroup, retrieve, searchAndRetrieveList, searchAndRetrieveList, setPermissions, setPermissions, update |
Methods inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject |
---|
canRequesterAdd, canRequesterDelete, canRequesterUpdate, checkAllowed, copyAttributes, count, createSecurityCache, delete, getRequestingUid, getRequestingUser, getString, getString, getString, getString, getString, getString, getSystemUid, instantiate, search, setRequestingUid, setRequestingUser |
Methods inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject |
---|
getGlobalMask, getStatus, isGlobalMasked, setFieldsWithDefaults, setGlobalMask, setStatus |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Field Detail |
---|
public static final String TABLE_NAME
public static final String NODE_TYPE
public static final String ATTRIBUTE_TYPE
public static final String LIST_ID
public static final String DISPLAY_IN_PICKLIST
public static final String COMMENT
public static final String ORDER_NUM
public static final String NOT_SPECIFIED_DISPLAY
public static final String CONTINUOUS_SMV_TYPE
public static final String FINITE_SMV_TYPE
public static final String TASK_SPECIFICATION_MENU_VALUE
public static final String TEMPLATE_MENU_VALUE
public static String DUMMY_NODE_TYPE
Constructor Detail |
---|
public PickList(ReadOnlyUser theUser) throws DBException
DBException
public PickList() throws DBException
DBException
- upon error.public PickList(DBConnection theConnection, int theUser) throws DBException
theConnection
- DBConnection to be used to
communicate with the databasetheUser
- User name attempting to access the
object
DBException
- If the user cannot access this
object or the object cannot be initializedpublic PickList(ControllerRequest request) throws DBException
DBException
public PickList(ControllerRequest request, String id) throws DBException
DBException
public PickList(String nodeType, String attribType) throws DBException
DBException
Method Detail |
---|
public static String getPicklistID(String dbName, String nodeType, String attribType, String matchValue) throws DBException
dbName
- The data contextnodeType
- The node type.attribType
- The attribute type.matchValue
- the picklist value.
DBException
- upon error.public String getID() throws DBException
DBException
protected void setupFields() throws DBException
setupFields
in class DBObject
DBException
- if the operation cannot be performedpublic int compare(Object o1, Object o2)
compare
in interface Comparator
Comparator
public String getOrderNum() throws DBException
DBException
public int getOrderNumInt() throws DBException
DBException
public int compareTo(Object o)
The implementor must ensure sgn(x.compareTo(y)) == -sgn(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception iff y.compareTo(x) throws an exception.)
The implementor must also ensure that the relation is transitive: (x.compareTo(y)>0 && y.compareTo(z)>0) implies x.compareTo(z)>0.
Finally, the implementer must ensure that x.compareTo(y)==0 implies that sgn(x.compareTo(z)) == sgn(y.compareTo(z)), for all z.
It is strongly recommended, but not strictly required that (x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any class that implements the Comparable interface and violates this condition should clearly indicate this fact. The recommended language is "Note: this class has a natural ordering that is inconsistent with equals."
compareTo
in interface Comparable
o
- the Object to be compared.
ClassCastException
- if the specified object's type prevents it
from being compared to this Object.public static String getPick(String pickindex) throws DBException
pickindex
-
DBException
- upon error.public static String getPickFast(String pickindex, String dbname) throws DBException
DBException
- upon error.public int getIndexNum() throws DBException
DBException
public String getDisplayString() throws DBException
DBException
public void setID(String id) throws DBException
DBException
public String getPickAttribType() throws DBException
DBException
public void setPickAttribType(String type) throws DBException
DBException
public String getNodeType() throws DBException
DBException
public void setNodeType(String type) throws DBException
DBException
public void setOrderNum(int order) throws DBException
DBException
public String getComment() throws DBException
DBException
public Transition getViewTrans() throws DBException
getViewTrans
in interface IViewable
DBException
- upon database access error.public void acceptVisitor(ModelVisitor visitor)
ModelVisitable
acceptVisitor
in interface ModelVisitable
visitor
- ViewVisitorpublic void isAllowed(String requestedFunction) throws SecurityException, DBException
isAllowed
in interface Securable
isAllowed
in class SecuredDBObject
requestedFunction
- The code of the requested function. The codes are:
DBException
- If the requested operation is not permitted to this user
SecurityException
- if the user is not allowed access to the object.public boolean isRowAllowed(String requestedFunction) throws DBException
isRowAllowed
in class RowSecuredDBObject
requestedFunction
- code for function -- Add, Update, Delete, Search (read)
SecurityException
- (unchecked) if not allowed
DBException
- for other data-related errors.public void setDisplayValue(String descrip) throws DBException
DBException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |