|
Compoze Software, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compoze.collab.Key
A key for properties that are set on an item. Keys can represent normal, calculated or read-only properties. Normal properties may be read from and written to the provider. Read-only properties may not be written to the provider. Calculated properties are always read-only, and are not even retrieved from the provider.
Field Summary | |
static int |
BASE_TYPE_MASK
|
static Key[] |
EMPTY_KEY_ARRAY
A Key[0] array, for when needed |
static java.lang.String |
EMPTY_STRING
|
protected static java.util.HashMap |
s_keyMap
|
static int |
VALUE_ARRAY
When ORed with another value type (for example VALUE_STRING | VALUE_ARRAY ) represents an array of that value type. |
static int |
VALUE_BINARY
The key represents binary data (a byte array). |
static int |
VALUE_BOOLEAN
The key represents a boolean (true/false). |
static int |
VALUE_DATE
The key represents a date and time. |
static int |
VALUE_DOUBLE
The key represents a 64 bit floating point value. |
static int |
VALUE_ENUMELEMENT
The key represents an enumeration value. |
static int |
VALUE_FLOAT
The key represents a 32 bit floating point value. |
static int |
VALUE_INTEGER
The key represents a 32 bit signed value. |
static int |
VALUE_ITEM
The key represents another item. |
static int |
VALUE_LONG
The key represents a 64 bit signed value. |
static int |
VALUE_SERIALIZABLE
The key represents a serializable java object. |
static int |
VALUE_SHORT
The key represents is a 16 bit signed value. |
static int |
VALUE_STRING
The key represents a unicode string. |
static int |
VALUE_UNKNOWN
The key represents a unknown data type. |
Constructor Summary | |
Key(java.lang.String sID,
int iValueType)
Constructor (read-write key). |
|
Key(java.lang.String sID,
int iValueType,
boolean bReadOnly)
Constructor. |
|
Key(java.lang.String sID,
int iValueType,
boolean bReadOnly,
boolean bCalculated,
int iID)
Constructor. |
|
Key(java.lang.String sID,
int iValueType,
boolean bReadOnly,
int iID)
Constructor. |
|
Key(java.lang.String sID,
int iValueType,
int iID)
Constructor (read-write key). |
Method Summary | |
static Key[] |
combine(Key[] keys1,
Key[] keys2)
Combines two key arrays, removing duplicates. |
boolean |
equals(java.lang.Object obj)
Two keys are equal if they share IDs. |
static Key |
get(java.lang.String sID)
Gets a key by its ID. |
java.lang.String |
getID()
Gets an ID for the key that is unique across VM invocations. |
int |
getIntID()
Get the integer ID |
int |
getValueType()
Gets the type of values associated with this key. |
java.lang.String |
getValueTypeName()
Gets the name of the value type of a Key. |
int |
hashCode()
|
boolean |
isCalculated()
Determines if the key is for a calculated property. |
boolean |
isReadOnly()
Determines if the key is for a read-only property. |
static java.lang.String |
staticValueTypeName(int iValueType)
Gets the name of a value type. |
java.lang.String |
toString()
|
void |
updateDigest(java.security.MessageDigest digest)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String EMPTY_STRING
protected static final java.util.HashMap s_keyMap
public static final int VALUE_STRING
public static final int VALUE_SHORT
public static final int VALUE_INTEGER
public static final int VALUE_LONG
public static final int VALUE_BOOLEAN
public static final int VALUE_FLOAT
public static final int VALUE_DOUBLE
public static final int VALUE_BINARY
public static final int VALUE_DATE
public static final int VALUE_ITEM
public static final int VALUE_ENUMELEMENT
public static final int VALUE_UNKNOWN
public static final int VALUE_SERIALIZABLE
public static final int VALUE_ARRAY
VALUE_STRING | VALUE_ARRAY
) represents an array of that value type.
Note that arrays of some types (VALUE_SHORT, VALUE_INTEGER, VALUE_LONG,
VALUE_FLOAT, VALUE_DOUBLE, VALUE_BOOLEAN) represent arrays of the
Java base type, not the Java class wrapper type, so
VALUE_INTEGER | VALUE_ARRAY
represents
int[]
, NOT as Integer[]
, even though
VALUE_INTEGER
represents Integer
.
VALUE_ITEM | VALUE_ARRAY
represents
IItem
[]
--an array of a subclass of IItem
can be saved in an item array property (for example,
IRecipient
[]
) but it will be retrieved as an
IItem[]
.
public static final int BASE_TYPE_MASK
public static final Key[] EMPTY_KEY_ARRAY
Constructor Detail |
public Key(java.lang.String sID, int iValueType)
sID
- the key IDiValueType
- the type for values associated with this keypublic Key(java.lang.String sID, int iValueType, int iID)
sID
- the key IDiValueType
- the type for values associated with this keyiID
- the key integer IDpublic Key(java.lang.String sID, int iValueType, boolean bReadOnly)
sID
- the key IDiValueType
- the type for values associated with this keybReadOnly
- if true
then the key is for
a read-only propertypublic Key(java.lang.String sID, int iValueType, boolean bReadOnly, int iID)
sID
- the key IDiValueType
- the type for values associated with this keybReadOnly
- if true
then the key is for
a read-only propertyiID
- an internal integer ID for this key
InvalidArgumentException
- if the specified int key ID
has already been addedpublic Key(java.lang.String sID, int iValueType, boolean bReadOnly, boolean bCalculated, int iID)
sID
- the key IDiValueType
- the type for values associated with this keybReadOnly
- if true
then the key is for
a read-only propertybCalculated
- if true
then the key is for
a calculated propertyiID
- an internal integer ID for this key
InvalidArgumentException
- if the specified int key ID
has already been addedMethod Detail |
public static Key[] combine(Key[] keys1, Key[] keys2)
keys1
- the first key array (not null
)keys2
- the second key array (not null
)
null
)public int getIntID()
public static Key get(java.lang.String sID)
public java.lang.String getID()
public int getValueType()
VALUE_
constants)public boolean isReadOnly()
true
if the key is for a read-only propertypublic boolean isCalculated()
true
if the key is for a calculated propertypublic boolean equals(java.lang.Object obj)
obj
- the Object to test equality against
true
if the objects are equalpublic int hashCode()
Object.hashCode()
public java.lang.String toString()
Object.toString()
public java.lang.String getValueTypeName()
public static java.lang.String staticValueTypeName(int iValueType)
iValueType
- the value type
public void updateDigest(java.security.MessageDigest digest)
updateDigest
in interface com.compoze.collab.util.IDigestSupport
|
Compoze Software, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |