com.ibm.as400.access

Class ValidationListAttributeInfo

  • java.lang.Object
    • com.ibm.as400.access.ValidationListAttributeInfo


  • public class ValidationListAttributeInfo
    extends java.lang.Object
    Encapsulates all attribute information assigned to an entry in a validation list. Each validation list entry may contain one or more attributes.
    Author:
    Thomas Johnson (tom.johnson@kingland.com), Kingland Systems Corporation
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      ValidationListAttribute[] getAttributes()
      Returns the attributes assigned to the receiver.
      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.
      int getByteLengthForNativeCall()
      Returns the total length of the corresponding structure when this object is written to IBM i bytes for use by the validation list APIs.
      void setAttributes(ValidationListAttribute[] attributes)
      Sets the attributes assigned to the receiver.
      void setAttributesData(byte[] buffer, int offset)
      Sets the data for assigned attributes from the IBM i bytes in the specified buffer.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ValidationListAttributeInfo

        public ValidationListAttributeInfo()
        Constructs a ValidationListAttributeInfo.
      • ValidationListAttributeInfo

        public ValidationListAttributeInfo(ValidationListAttribute[] attributes)
        Constructs a ValidationListAttributeInfo with the given attributes.
        Parameters:
        attributes - ValidationListAttribute[]
    • Method Detail

      • getAttributes

        public ValidationListAttribute[] getAttributes()
        Returns the attributes assigned to the receiver.
        Returns:
        ValidationListAttribute[]
      • getByteLength

        public 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.
        Returns:
        int
      • getByteLengthForNativeCall

        public int getByteLengthForNativeCall()
        Returns the total length of the corresponding structure when this object is written to IBM i bytes for use by the validation list APIs.
        Returns:
        int
      • setAttributes

        public void setAttributes(ValidationListAttribute[] attributes)
        Sets the attributes assigned to the receiver.
        Parameters:
        attributes - ValidationListAttribute[]
      • setAttributesData

        public void setAttributesData(byte[] buffer,
                             int offset)
        Sets the data for assigned attributes from the IBM i bytes in the specified buffer.

        This method is called when finding an entry with specific attributes. The attribute identifiers are provided as input to the API, and a buffer is returned with the corresponding attribute values. It is expected that this object was also used to specify the attributes to retrieve. That way, the contents and order of attribute values in the buffer should exactly match those assigned to this object.

        Refer to documentation for the QSYFDVLE Security API for a complete description of parameters.

        Parameters:
        buffer - byte[]
        offset - int
      • toBytes

        public byte[] toBytes()
        Returns the byte array resulting from converting this object to a structure usable by the system APIs.
        Returns:
        byte[]
      • toBytes

        public int toBytes(byte[] buffer,
                  int offset)
        Converts this object to a structure usable by the system APIs.

        The IBM i bytes are inserted into the buffer starting at the given offset. The total number of bytes inserted is returned.

        Parameters:
        buffer - byte[]
        offset - int
        Returns:
        int