Project: stp

com.ibm.rational.wvcm.stp.cq
Interface CqFieldDefinition

All Superinterfaces:
CqResource, CqUserDb.SearchKey<List<String>>, CqUserDbMember, Resource, StpResource

public interface CqFieldDefinition
extends CqUserDbMember, CqUserDb.SearchKey<List<String>>

A client proxy for a field definition metadata object.

This object defines the characteristics of a field of a record type in a database schema. Since field definitions are schema objects, they cannot be created, modified, or deleted by the client. Any client may assume that a field definition will remain unchanged for the duration of an active session and therefore, the client need only fetch field definitions from the server once per session. Field definitions are usually fetched when the CqRecordType resource of which they are a part is fetched.

An array of CqFieldDefintions is used to define a query field path, used in both CqQuery.DisplayField and CqQuery.FilterLeaf specifications.

CqFieldDefinitions are also used in a CqUserDb.SearchFilter to limit a full-text search to values in specific fields.

The user-friendly specification for the location of a field definition has the form

  cq.field:<record-type>/<field-name>@<db-set>/<user-db>
 


Nested Class Summary
static class CqFieldDefinition.Requiredness
          An enumeration of the possible restrictions on assigning a value to a field.
 
Nested classes/interfaces inherited from interface com.ibm.rational.wvcm.stp.StpResource
StpResource.UnsupportedProperty
 
Nested classes/interfaces inherited from interface javax.wvcm.Resource
Resource.CopyFlag
 
Field Summary
static PropertyNameList.PropertyName<Boolean> CALCULATES_CHOICE_LIST_EACH_ACCESS
          Indicates that the content of the choice list for this field is liable to be recalculated each time it is accessed.
static PropertyNameList.PropertyName<Boolean> CAN_BE_SECURITY_CONTEXT
          Whether or not this field can be a security context field
static PropertyNameList.PropertyName<List<String>> CHOICE_LIST
          A list of possible values for fields of this type.
static PropertyNameList.PropertyName<String> DB_NAME
          The column name for this field in the database table for its record
static PropertyNameList.PropertyName<CqDynamicChoiceList> DYNAMIC_CHOICE_LIST
          Identifies the dynamic choice list used by this field as its choice list Requires SQL-editor permission
static PropertyNameList.PropertyName<CqFieldValue.ValueType> FIELD_TYPE
          The data type of the value of the field defined by this field definition.
static PropertyNameList.PropertyName<Boolean> HAS_OPEN_CHOICE_LIST
          Whether or not values not in the field's choice list are permitted as legal field values.
static PropertyNameList.PropertyName<Boolean> HAS_SCRIPTED_CHOICE_LIST
          Whether or not the content of the field's choice list are computed with the aid of a hook-script.
static PropertyNameList.PropertyName<String> HELP_TEXT
          A short phrase describing the purpose and function of this field.
static PropertyNameList.PropertyName<Boolean> IS_AVAILABLE_FOR_QUERIES
          true if and only if this property may be used in forming queries.
static PropertyNameList.PropertyName<Boolean> IS_SECURITY_CONTEXT
          Whether or not this field is a security context field
static PropertyNameList.PropertyName<Boolean> IS_SYSTEM_OWNED
          Whether or not this field is owned by the system (built-in)
static PropertyNameList.PropertyName<CqQuery.Filter.Operation[]> LEGAL_COMP_OPS
          Returns a list of the comparison operators that may be used with this field in a CqQuery.FilterLeaf construct.
static PropertyNameList.PropertyName<Long> MAXIMUM_STRING_LENGTH
          The maximum length of a string permitted as this field's value.
static PropertyNameList.PropertyName<CqRecordType> RECORD_TYPE
          A CqRecordType proxy for the record-type resource of which this resource defines a field.
static PropertyNameList.PropertyName<CqRecord> REFERENCED_RECORD_TYPE
          Record type of the record referenced by this field
static PropertyNameList.PropertyName<Map<String,CqFieldDefinition.Requiredness>> REQUIREDNESS_BY_STATE
          The schema-defined behavior (read-only, mandatory, or optional) of this field for each state name in the record type's state table.
static PropertyNameList.PropertyName<StpProperty.Type> VALUE_TYPE
          The data type of the values of the field defined by this field definition using the generic StpProperty.Type enumeration.
 
Fields inherited from interface CqUserDbMember
DB_SET, USER_DB
 
Fields inherited from interface com.ibm.rational.wvcm.stp.StpResource
ALL_PROPERTIES, AUTHENTICATION_REALM, CREATOR_GROUP_NAME, CREATOR_LOGIN_NAME, EFFICIENT_LOCATION, INVALID_PROPERTIES, REPOSITORY, STABLE_LOCATION, USER_FRIENDLY_LOCATION
 
Fields inherited from interface javax.wvcm.Resource
ALL_CUSTOM_PROPERTIES, COMMENT, CONTENT_CHARACTER_SET, CONTENT_IDENTIFIER, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_TYPE, CREATION_DATE, CREATOR_DISPLAY_NAME, DISPLAY_NAME, IS_EXECUTABLE, LAST_MODIFIED, PARENT_LIST, PATHNAME_LOCATION, PROVIDER_LIST, RESOURCE_IDENTIFIER, WORKSPACE_FOLDER_LIST
 
Method Summary
 boolean getCalculatesChoiceListEachAccess()
          Returns the value of the CALCULATES_CHOICE_LIST_EACH_ACCESS property as defined by this proxy.
 boolean getCanBeSecurityContext()
          Returns the value of the CAN_BE_SECURITY_CONTEXT property as defined by this proxy.
 List<String> getChoiceList()
          Returns the value of the CHOICE_LIST property as defined by this proxy.
 String getDbName()
          Returns the value of the DB_NAME property as defined by this proxy.
 CqDynamicChoiceList getDynamicChoiceList()
          Returns the value of the DYNAMIC_CHOICE_LIST property as defined by this proxy.
 CqFieldValue.ValueType getFieldType()
          Returns the value of the FIELD_TYPE property as defined by this proxy.
 boolean getHasOpenChoiceList()
          Returns the value of the HAS_OPEN_CHOICE_LIST property as defined by this proxy.
 boolean getHasScriptedChoiceList()
          Returns the value of the HAS_SCRIPTED_CHOICE_LIST property as defined by this proxy.
 String getHelpText()
          Returns the value of the HELP_TEXT property as defined by this proxy.
 boolean getIsAvailableForQueries()
          Returns the value of the IS_AVAILABLE_FOR_QUERIES property as defined by this proxy.
 boolean getIsSecurityContext()
          Returns the value of the IS_SECURITY_CONTEXT property as defined by this proxy.
 boolean getIsSystemOwned()
          Returns the value of the IS_SYSTEM_OWNED property as defined by this proxy.
 CqQuery.Filter.Operation[] getLegalCompOps()
          Returns the value of the LEGAL_COMP_OPS property as defined by this proxy.
 long getMaximumStringLength()
          Returns the value of the MAXIMUM_STRING_LENGTH property as defined by this proxy.
 CqRecordType getRecordType()
          Returns the value of the RECORD_TYPE property as defined by this proxy.
 CqRecordType getReferencedRecordType()
          Returns the value of the REFERENCED_RECORD_TYPE property as defined by this proxy.
 Map<String,CqFieldDefinition.Requiredness> getRequirednessByState()
          Returns the value of the REQUIREDNESS_BY_STATE property as defined by this proxy.
 StpProperty.Type getValueType()
          Returns the value of the VALUE_TYPE property as defined by this proxy.
 
Methods inherited from interface CqUserDbMember
getDbSet, getUserDb
 
Methods inherited from interface CqResource
cqProvider, getComment, getContentCharacterSet, getContentIdentifier, getContentLanguage, getContentLength, getContentType, getCreationDate, getCreatorDisplayName, getCreatorGroupName, getCreatorLoginName, getIsExecutable, getLastModified, getProviderList, getWorkspaceFolderList, setComment, setContentCharacterSet, setContentLanguage, setContentType, setCreatorDisplayName, setIsExecutable
 
Methods inherited from interface com.ibm.rational.wvcm.stp.StpResource
doReadProperties, equals, getAllProperties, getAuthenticationRealm, getCustomProperties, getEfficientLocation, getInvalidProperties, getMetaProperties, getPropertyException, getRepository, getResourceError, getResourceIdentifier, getStableLocation, getUserFriendlyLocation, hashCode, hasProperties, initMetaProperty, proxyType, setPropertyClean, stpLocation, stpProvider
 
Methods inherited from interface javax.wvcm.Resource
doCopy, doFind, doFindAll, doGetPropertyNameList, doGetPropertyNameList, doReadContent, doReadProperties, doUnbindAll, doWriteContent, doWriteProperties, forgetProperty, getDisplayName, getParentList, getPathnameLocation, getProperty, initProperty, location, lookupProperty, modifyLocation, propertyNameList, provider, removeProperty, setDisplayName, setProperty, setProperty, updatedPropertyNameList
 

Field Detail

CALCULATES_CHOICE_LIST_EACH_ACCESS

static final PropertyNameList.PropertyName<Boolean> CALCULATES_CHOICE_LIST_EACH_ACCESS
Indicates that the content of the choice list for this field is liable to be recalculated each time it is accessed. Such choice lists probably should not be cached on the client. Requires SQL-editor permission


CAN_BE_SECURITY_CONTEXT

static final PropertyNameList.PropertyName<Boolean> CAN_BE_SECURITY_CONTEXT
Whether or not this field can be a security context field


CHOICE_LIST

static final PropertyNameList.PropertyName<List<String>> CHOICE_LIST
A list of possible values for fields of this type.

In general, the content of a field's choice list is quite volatile and can depend on the state of the record it is in, the value of other fields of that record or related records, the current user's permissions, and other dynamic aspects of the database environment known only to the schema. So, in general, the choice list must be obtained in the context in which it is to be used at the time it is to be used. In this interface, that very dynamic value is expressed as the value of the CHOICE_LIST meta-property of the CqFieldValue property representing the field of the record that is to be set with a value from the choice list.

CqFieldValue.CHOICE_LIST always returns the choice list for the field based on all factors that could influence its content. The values returned by this property are based only on the current state of the database, but not on the state of any specific record. If the schema is designed such that the choice list for this field does not depend on the value of other fields in the record, then the list returned by this property will be the same as that returned by CqFieldValue.CHOICE_LIST.

Currently, there is no way for a client to interrogate a schema to discover the dynamics of its choice list computations. When presenting choices to a user for the purpose of actually setting a field value into a specific record, CqFieldValue.CHOICE_LIST should always be used. In contexts where no specific record is indicated (as in defining a query, for example) the value of this property would be most appropriate.

If this property is empty, it neither implies that all values are permitted nor that no values are permitted; it just means that the schema designer has not provided any hints about the values permitted in the field.

Choice lists can be voluminous and, so, should be read from the server only when needed. Yet, as explained above, they can also be quite volatile and may easily change during the course of a session and not necessarily in direct response to anything the client is doing.

See Also:
CqFieldValue.CHOICE_LIST

DB_NAME

static final PropertyNameList.PropertyName<String> DB_NAME
The column name for this field in the database table for its record


DYNAMIC_CHOICE_LIST

static final PropertyNameList.PropertyName<CqDynamicChoiceList> DYNAMIC_CHOICE_LIST
Identifies the dynamic choice list used by this field as its choice list Requires SQL-editor permission


FIELD_TYPE

static final PropertyNameList.PropertyName<CqFieldValue.ValueType> FIELD_TYPE
The data type of the value of the field defined by this field definition.


HAS_OPEN_CHOICE_LIST

static final PropertyNameList.PropertyName<Boolean> HAS_OPEN_CHOICE_LIST
Whether or not values not in the field's choice list are permitted as legal field values.

The schema designer specifies whether the legal values for a given field are restricted to the contents of its choice list and that specification is captured by this property. If there is a restriction, specifying a value not in the choice list causes a validation error. If there is no restriction, values not in the choice list may be used. (Note that any values must still be validated by the schema at the time the record is delivered to the database.)


HAS_SCRIPTED_CHOICE_LIST

static final PropertyNameList.PropertyName<Boolean> HAS_SCRIPTED_CHOICE_LIST
Whether or not the content of the field's choice list are computed with the aid of a hook-script. Requires SQL-editor permission


HELP_TEXT

static final PropertyNameList.PropertyName<String> HELP_TEXT
A short phrase describing the purpose and function of this field.


IS_AVAILABLE_FOR_QUERIES

static final PropertyNameList.PropertyName<Boolean> IS_AVAILABLE_FOR_QUERIES
true if and only if this property may be used in forming queries.


IS_SECURITY_CONTEXT

static final PropertyNameList.PropertyName<Boolean> IS_SECURITY_CONTEXT
Whether or not this field is a security context field


IS_SYSTEM_OWNED

static final PropertyNameList.PropertyName<Boolean> IS_SYSTEM_OWNED
Whether or not this field is owned by the system (built-in)


LEGAL_COMP_OPS

static final PropertyNameList.PropertyName<CqQuery.Filter.Operation[]> LEGAL_COMP_OPS
Returns a list of the comparison operators that may be used with this field in a CqQuery.FilterLeaf construct.


MAXIMUM_STRING_LENGTH

static final PropertyNameList.PropertyName<Long> MAXIMUM_STRING_LENGTH
The maximum length of a string permitted as this field's value. This property requires the CQ SQL Editor permission.


RECORD_TYPE

static final PropertyNameList.PropertyName<CqRecordType> RECORD_TYPE
A CqRecordType proxy for the record-type resource of which this resource defines a field.


REFERENCED_RECORD_TYPE

static final PropertyNameList.PropertyName<CqRecord> REFERENCED_RECORD_TYPE
Record type of the record referenced by this field


REQUIREDNESS_BY_STATE

static final PropertyNameList.PropertyName<Map<String,CqFieldDefinition.Requiredness>> REQUIREDNESS_BY_STATE
The schema-defined behavior (read-only, mandatory, or optional) of this field for each state name in the record type's state table. (The schema-defined behavior for a field of a stateless record type is associated with the state name "*".) Also includes the default, system-imposed requiredness for the field as the value associated with the state name "".


VALUE_TYPE

static final PropertyNameList.PropertyName<StpProperty.Type> VALUE_TYPE
The data type of the values of the field defined by this field definition using the generic StpProperty.Type enumeration.

See Also:
FIELD_TYPE
Method Detail

getCalculatesChoiceListEachAccess

boolean getCalculatesChoiceListEachAccess()
                                          throws WvcmException
Returns the value of the CALCULATES_CHOICE_LIST_EACH_ACCESS property as defined by this proxy.

Returns:
True if the choice list for this field is liable to be recalculated each time it is referenced.
Throws:
WvcmException - if this proxy does not define a value for the CALCULATES_CHOICE_LIST_EACH_ACCESS property. Requires SQL-editor permission

getCanBeSecurityContext

boolean getCanBeSecurityContext()
                                throws WvcmException
Returns the value of the CAN_BE_SECURITY_CONTEXT property as defined by this proxy.

Returns:
true if this field can be a security context field
Throws:
WvcmException - if this proxy does not define a value for the CAN_BE_SECURITY_CONTEXT property.

getChoiceList

List<String> getChoiceList()
                           throws WvcmException
Returns the value of the CHOICE_LIST property as defined by this proxy.

Returns:
A List of the values defined statically by the database schema as valid values for fields of this description.
Throws:
WvcmException - if this proxy does not define a value for the CHOICE_LIST property.

getDbName

String getDbName()
                 throws WvcmException
Returns the value of the DB_NAME property as defined by this proxy.

Returns:
A String containing the database column name for this field
Throws:
WvcmException - if this proxy does not define a value for the DB_NAME property.

getDynamicChoiceList

CqDynamicChoiceList getDynamicChoiceList()
                                         throws WvcmException
Returns the value of the DYNAMIC_CHOICE_LIST property as defined by this proxy.

Returns:
A CqDynamcChoiceList proxy for the dynamic choice list used by this field as its choice list; null if this field does not use a dynamic choice list as its choice list.
Throws:
WvcmException - if this proxy does not define a value for the DYNAMIC_CHOICE_LIST property. Requires SQL-editor permission

getFieldType

CqFieldValue.ValueType getFieldType()
                                    throws WvcmException
Returns the value of the FIELD_TYPE property as defined by this proxy.

Returns:
The field value type as a CqFieldValue.ValueType enumerator. Will never be null.
Throws:
WvcmException - if this proxy does not define a value for the FIELD_TYPE property.

getHasOpenChoiceList

boolean getHasOpenChoiceList()
                             throws WvcmException
Returns the value of the HAS_OPEN_CHOICE_LIST property as defined by this proxy. Requires SQL-editor permission.

Returns:
True if legal values for this field are not constrained to those that appear in its choice list.
Throws:
WvcmException - if this proxy does not define a value for the HAS_OPEN_CHOICE_LIST property.

getHasScriptedChoiceList

boolean getHasScriptedChoiceList()
                                 throws WvcmException
Returns the value of the HAS_SCRIPTED_CHOICE_LIST property as defined by this proxy.

Returns:
True the content of the field's choice list are computed with the aid of a hook-script; False if not.
Throws:
WvcmException - if this proxy does not define a value for the HAS_OPEN_CHOICE_LIST property. Requires SQL-editor permission

getHelpText

String getHelpText()
                   throws WvcmException
Returns the value of the HELP_TEXT property as defined by this proxy.

Returns:
A string containing a short description of the role of this field in the schema.
Throws:
WvcmException - if this proxy does not define a value for the HELP_TEXT property.

getIsAvailableForQueries

boolean getIsAvailableForQueries()
                                 throws WvcmException
Returns the value of the IS_AVAILABLE_FOR_QUERIES property as defined by this proxy.

Returns:
true if this property may be used in a query filter.
Throws:
WvcmException - if this proxy does not define a value for the IS_AVAILABLE_FOR_QUERIES property.

getIsSecurityContext

boolean getIsSecurityContext()
                             throws WvcmException
Returns the value of the IS_SECURITY_CONTEXT property as defined by this proxy.

Returns:
True if this field is a security context field
Throws:
WvcmException - if this proxy does not define a value for the IS_SECURITY_CONTEXT property.

getIsSystemOwned

boolean getIsSystemOwned()
                         throws WvcmException
Returns the value of the IS_SYSTEM_OWNED property as defined by this proxy.

Returns:
True if this field is system owned.
Throws:
WvcmException - if this proxy does not define a value for the IS_SYSTEM_OWNED property.

getLegalCompOps

CqQuery.Filter.Operation[] getLegalCompOps()
                                           throws WvcmException
Returns the value of the LEGAL_COMP_OPS property as defined by this proxy.

Returns:
An array of CqQuery.Filter.Operation enumerators, each specifying a comparison operator that can be used with this field. Will never be null.
Throws:
WvcmException - if this proxy does not define a value for the LEGAL_COMP_OPS property.

getMaximumStringLength

long getMaximumStringLength()
                            throws WvcmException
Returns the value of the MAXIMUM_STRING_LENGTH property as defined by this proxy.

Returns:
The maximum string length permitted for the value of this field.
Throws:
WvcmException - if this proxy does not define a value for the MAXIMUM_STRING_LENGTH property. Requires SQL-editor permission

getRecordType

CqRecordType getRecordType()
                           throws WvcmException
Returns the value of the RECORD_TYPE property as defined by this proxy.

Returns:
The CqRecordType proxy for the record-type that contains this field definition.
Throws:
WvcmException - if this proxy does not define a value for the RECORD_TYPE property.

getReferencedRecordType

CqRecordType getReferencedRecordType()
                                     throws WvcmException
Returns the value of the REFERENCED_RECORD_TYPE property as defined by this proxy.

Returns:
A CqRecordType proxy representing the type of record that that is referenced by this field; null if this field is not type CqFieldValue.ValueType.RESOURCE or CqFieldValue.ValueType.RESOURCE_LIST
Throws:
WvcmException - if this proxy does not define a value for the REFERENCED_RECORD_TYPE property.

getRequirednessByState

Map<String,CqFieldDefinition.Requiredness> getRequirednessByState()
                                                                  throws WvcmException
Returns the value of the REQUIREDNESS_BY_STATE property as defined by this proxy.

Returns:
A Map from String to Requiredness objects specifying for each state of the record the Requiredness of this field. For stateless record types, which have no states, the "*" key is mapped to the schema-defined requiredness for the field. In all cases, the empty key ("") is mapped to the default (system-imposed) requiredness for the field.
Throws:
WvcmException - if this proxy does not define a value for the REQUIREDNESS_BY_STATE property.

getValueType

StpProperty.Type getValueType()
                              throws WvcmException
Returns the value of the VALUE_TYPE property as defined by this proxy.

Returns:
The value type. Will never be null.
Throws:
WvcmException - if this proxy does not define a value for the VALUE_TYPE property.
See Also:
getFieldType()

Generated Fri 16-Aug-2013 12:43 PM

Copyright © IBM 2013. All rights reserved.