public class COSAR extends java.lang.Object implements IAttrSource, DCFieldContainer
Modifier and Type | Class and Description |
---|---|
class |
COSAR.COSAREnum
Deprecated.
This class is used to enumerate the attributes
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_RECORD_TYPE
Deprecated.
This constant represents the default record type name.
|
protected int |
m_attrCount
Deprecated.
This member represents the current attribute count.
|
protected COSARAttr[] |
m_attrs
Deprecated.
This member is used to store the attributes in the right order.
|
protected java.util.HashMap |
m_map
Deprecated.
This member is used to store the OSAR attributes.
|
protected java.lang.String |
m_recordType
Deprecated.
This member represents the record type.
|
static java.lang.String |
RECORD_TYPE_ID
Deprecated.
This constant represents the field id in OSARs reserved
for the record type.
|
static java.lang.String |
RECORD_TYPE_NAME
Deprecated.
This constant represents the field id in OSARs reserved
for the record type.
|
Constructor and Description |
---|
COSAR()
Deprecated.
|
COSAR(java.lang.String recordType)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addAttr(COSARAttr attr)
Deprecated.
|
boolean |
append(COSAR osar)
Deprecated.
This function is used to append another COSAR.
|
java.lang.Object |
clone()
Deprecated.
|
COSARAttr |
getAttr(java.lang.String key)
Deprecated.
|
COSAR.COSAREnum |
getEnum()
Deprecated.
|
DCField |
getField(FieldKey key)
Deprecated.
|
DCField |
getField(java.lang.String attrId)
Deprecated.
Retrieves field value with the specified id
|
byte[] |
getFieldValue(FieldKey key)
Deprecated.
|
byte[] |
getFieldValue(java.lang.String attrId)
Deprecated.
Retrieves field value with the specified id
|
OSAR |
getOSAR()
Deprecated.
This function returns the equivalent OSAR.
|
java.lang.String |
getRecordType()
Deprecated.
|
int |
getType(java.lang.String attrId)
Deprecated.
Retrieves the type of the value stored at the specified id
|
static COSARAttr |
newOSARAttr(OSARecAttr recAttr)
Deprecated.
This function builds a new COSARAttr based on a OSARecAttr
and returns it.
|
static COSARAttr |
newOSARAttr(java.lang.String id,
int type)
Deprecated.
This function builds a new COSARAttr based on the type
and returns it.
|
void |
removeAllAttrs()
Deprecated.
This function removes all attributes from the OSAR.
|
void |
setField(DCField field)
Deprecated.
Stores a given value at the specified id
|
void |
setField(FieldKey attrId,
int type,
byte[] value)
Deprecated.
|
void |
setField(int attrId,
int type,
byte[] value)
Deprecated.
Stores a given value at the specified id
|
void |
setField(java.lang.String attrId,
int type,
byte[] value)
Deprecated.
Stores a given value at the specified id
|
void |
setFromOSAR(OSAR osar)
Deprecated.
This function is used to set the COSAR based on the
contents of the OSAR.
|
void |
setRecordType(java.lang.String recordType)
Deprecated.
|
byte[] |
toByteArray()
Deprecated.
Converts the data contained in this object to a byte array
|
java.lang.String |
toString()
Deprecated.
Converts the data contained in this object to a String
|
public static final java.lang.String DEFAULT_RECORD_TYPE
public static final java.lang.String RECORD_TYPE_ID
public static final java.lang.String RECORD_TYPE_NAME
protected java.lang.String m_recordType
protected java.util.HashMap m_map
protected COSARAttr[] m_attrs
protected int m_attrCount
public COSAR(java.lang.String recordType) throws java.lang.Exception
java.lang.Exception
public COSAR() throws java.lang.Exception
java.lang.Exception
public final java.lang.String getRecordType()
public final COSAR.COSAREnum getEnum()
public final void setRecordType(java.lang.String recordType)
public COSARAttr getAttr(java.lang.String key)
getAttr
in interface IAttrSource
public boolean addAttr(COSARAttr attr)
public void setFromOSAR(OSAR osar) throws java.lang.Exception
java.lang.Exception
public boolean append(COSAR osar)
public OSAR getOSAR()
public void removeAllAttrs()
public static COSARAttr newOSARAttr(java.lang.String id, int type) throws java.lang.Exception
java.lang.Exception
public static COSARAttr newOSARAttr(OSARecAttr recAttr) throws java.lang.Exception
java.lang.Exception
public java.lang.String toString()
DCFieldContainer
toString
in interface DCFieldContainer
toString
in class java.lang.Object
public final DCField getField(java.lang.String attrId)
DCFieldContainer
getField
in interface DCFieldContainer
attrId
- Identifier of the desired fieldpublic DCField getField(FieldKey key)
getField
in interface DCFieldContainer
public final byte[] getFieldValue(java.lang.String attrId)
DCFieldContainer
getFieldValue
in interface DCFieldContainer
attrId
- Identifier of the desired fieldpublic byte[] getFieldValue(FieldKey key)
getFieldValue
in interface DCFieldContainer
public final void setField(int attrId, int type, byte[] value)
DCFieldContainer
setField
in interface DCFieldContainer
attrId
- Numeric identifier for the fieldtype
- Data type for the fieldvalue
- Value to be stored in the given fieldpublic final void setField(java.lang.String attrId, int type, byte[] value)
DCFieldContainer
setField
in interface DCFieldContainer
attrId
- Identifier for the fieldtype
- Data type for the fieldvalue
- Value to be stored in the given fieldpublic void setField(FieldKey attrId, int type, byte[] value)
setField
in interface DCFieldContainer
public final void setField(DCField field)
DCFieldContainer
setField
in interface DCFieldContainer
field
- The DCField object representing the field.public final int getType(java.lang.String attrId)
DCFieldContainer
getType
in interface DCFieldContainer
attrId
- Identifier of the fieldpublic final byte[] toByteArray()
DCFieldContainer
toByteArray
in interface DCFieldContainer
public java.lang.Object clone()
clone
in interface DCFieldContainer
clone
in class java.lang.Object