public class ValidationListAttribute
extends java.lang.Object
Constructor and Description |
---|
ValidationListAttribute()
Constructs a validation list attribute.
|
ValidationListAttribute(AS400 as400)
Constructs a validation list attribute.
|
Modifier and Type | Method and Description |
---|---|
AS400 |
getAS400()
Returns the system assigned to the attribute.
|
int |
getByteLength()
Returns the total length of the corresponding structure when this object is
written to IBM i bytes for use by the validation list APIs.
|
ValidationListAttributeData |
getData()
Returns the data associated with the attribute.
|
java.lang.String |
getIdentifier()
Returns the identifier of the attribute.
|
int |
getLocation()
Indicates where the attribute should be stored.
|
int |
getMaximumValueLength()
Returns the maximum length of the value associated with the attribute.
|
int |
getType()
Returns the attribute type.
|
void |
setAS400(AS400 as400)
Sets the system assigned to the attribute.
|
void |
setData(ValidationListAttributeData data)
Sets the data associated with the attribute.
|
void |
setIdentifier(java.lang.String s)
Sets the identifier of the attribute.
|
void |
setLocation(int location)
Indicates where the attribute should be stored.
|
void |
setMaximumValueLength(int length)
Sets the maximum length of the value associated with the attribute.
|
void |
setType(int type)
Returns the attribute type.
|
byte[] |
toBytes()
Returns the byte array resulting from converting this object to a structure
usable by the system APIs.
|
int |
toBytes(byte[] buffer,
int offset)
Converts this object to a structure usable by the system APIs.
|
public ValidationListAttribute()
public ValidationListAttribute(AS400 as400)
The as400 is used to translate the assigned identifier when converted to IBM i bytes.
as400
- com.ibm.as400.access.AS400public AS400 getAS400()
Used to translate the assigned identifier when converted to IBM i bytes.
public int getByteLength()
The size varies based on usage of the receiver. If there is no associated data, it is assumed that the structure being written is to identify an attribute to be retrieved (eg. find an entry). If there is associated data, it is assumed the structure will be used when adding a new entry or changing an existing entry.
public ValidationListAttributeData getData()
This value is required when the attribute is referenced to add a new entry or change an existing entry. It should not be set when the attribute is used to identify values to retrieve (eg. when finding an entry).
public java.lang.String getIdentifier()
For system-defined attributes, the allowed values are:
If the QsyEncryptData attribute is set to 0, the data to be encrypted can only be used to verify an entry and cannot be retrieved later. This is the default.
If the attribute is set to 1, the data to be encrypted can be used to verify an entry and can potentially be returned on a find operation. The system value QRETSVRSEC (Retain system security data) has the final say in determining if the data can be retrieved from the entry. If the system value is set to 0 (Do not retain data), the entry will be added, but the data to be encrypted will not be stored with the entry and cannot be retrieved. If the system value is set to 1 (Retain data), then the data to be encrypted will be stored (in encrypted form) with the entry and can be retrieved.
public int getLocation()
public int getMaximumValueLength()
This value is referenced when invoking APIs that need to indicate a length for the buffer used to retrieve the attribute value.
public int getType()
public void setAS400(AS400 as400)
Used to translate the assigned identifier when converted to IBM i bytes.
as400
- com.ibm.as400.access.AS400public void setData(ValidationListAttributeData data)
This value is required when the attribute is referenced to add a new entry or change an existing entry. It should not be set when the attribute is used to identify values to retrieve (eg. when finding an entry).
data
- ValidationListAttributeDatapublic void setIdentifier(java.lang.String s)
For system-defined attributes, the allowed values are:
If the QsyEncryptData attribute is set to 0, the data to be encrypted can only be used to verify an entry and cannot be retrieved later. This is the default.
If the attribute was set to 1, the data to be encrypted can be used to verify an entry and can potentially be returned on a find operation. The system value QRETSVRSEC (Retain system security data) has the final say in determining if the data can be retrieved from the entry. If the system value is set to 0 (Do not retain data), the entry will be added, but the data to be encrypted will not be stored with the entry and cannot be retrieved. If the system value is set to 1 (Retain data), then the data to be encrypted will be stored (in encrypted form) with the entry and can be retrieved.
s
- java.lang.Stringpublic void setLocation(int location)
location
- intpublic void setMaximumValueLength(int length)
This value is referenced when invoking APIs that need to indicate a length for the buffer used to retrieve the attribute value.
length
- intpublic void setType(int type)
type
- intpublic byte[] toBytes()
public int toBytes(byte[] buffer, int offset)
The IBM i bytes are inserted into the buffer starting at the given offset. The total number of bytes inserted is returned.
buffer
- byte[]offset
- int