Package africa.absa.inception.security
Class UserAttribute
- java.lang.Object
-
- africa.absa.inception.security.UserAttribute
-
- All Implemented Interfaces:
Serializable
public class UserAttribute extends Object implements Serializable
The UserAttribute class stores a user attribute as a name-value pair.- Author:
- Marcus Portmann
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UserAttribute()Constructs a new UserAttribute.UserAttribute(String name, byte[] value)Constructs a new UserAttribute.UserAttribute(String name, double value)Constructs a new UserAttribute.UserAttribute(String name, long value)Constructs a new UserAttribute.UserAttribute(String name, africa.absa.inception.core.util.BinaryBuffer value)Constructs a new UserAttribute.UserAttribute(String name, String value)Constructs a new UserAttribute.UserAttribute(String name, BigDecimal value)Constructs a new UserAttribute.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleancontains(List<UserAttribute> list, String name)Returns whether the list of user attributes contains a user attribute whose name matches the specified name.byte[]getBinaryValue()Returns the binary value for the user attribute.static byte[]getBinaryValue(List<UserAttribute> list, String name)Returns the binary value for the user attribute with the specified name in the specified list.BigDecimalgetDecimalValue()Returns the BigDecimal value for the user attribute.static BigDecimalgetDecimalValue(List<UserAttribute> list, String name)Returns the BigDecimal value for the user attribute with the specified name in the specified list.doublegetDoubleValue()Returns the double value for the user attribute.static doublegetDoubleValue(List<UserAttribute> list, String name)Returns the double value for the user attribute with the specified name in the specified list.intgetIntegerValue()Returns the int value for the user attribute.static intgetIntegerValue(List<UserAttribute> list, String name)Returns the int value for the user attribute with the specified name in the specified list.longgetLongValue()Returns the long value for the user attribute.static longgetLongValue(List<UserAttribute> list, String name)Returns the long value for the user attribute with the specified name in the specified list.StringgetName()Returns the name of the user attribute.StringgetStringValue()Returns the String value for the user attribute.static StringgetStringValue(List<UserAttribute> list, String name)Returns the String value for the user attribute with the specified name in the specified list.StringgetValue()Returns the String value for the user attribute.voidsetBinaryValue(byte[] value)Set the binary value for the user attribute.voidsetBinaryValue(africa.absa.inception.core.util.BinaryBuffer value)Set the binary value for the user attribute.static voidsetBinaryValue(List<UserAttribute> list, String name, byte[] value)Set the binary value for the user attribute with the specified name in the specified list.static voidsetBinaryValue(List<UserAttribute> list, String name, africa.absa.inception.core.util.BinaryBuffer value)Set the binary value for the user attribute with the specified name in the specified list.voidsetDecimalValue(BigDecimal value)Set the BigDecimal value for the user attribute.static voidsetDecimalValue(List<UserAttribute> list, String name, BigDecimal value)Set the BigDecimal value for the user attribute with the specified name in the specified list.voidsetDoubleValue(double value)Set the double value for the user attribute.static voidsetDoubleValue(List<UserAttribute> list, String name, double value)Set the double value for the user attribute with the specified name in the specified list.voidsetIntegerValue(int value)Set the int value for the user attribute.static voidsetIntegerValue(List<UserAttribute> list, String name, int value)Set the int value for the user attribute with the specified name in the specified list.voidsetLongValue(long value)Set the long value for the user attribute.static voidsetLongValue(List<UserAttribute> list, String name, long value)Set the long value for the user attribute with the specified name in the specified list.voidsetName(String name)Set the name of the user attribute.voidsetStringValue(String value)Set the String value for the user attribute.static voidsetStringValue(List<UserAttribute> list, String name, String value)Set the String value for the user attribute with the specified name in the specified list.
-
-
-
Constructor Detail
-
UserAttribute
public UserAttribute()
Constructs a new UserAttribute.
-
UserAttribute
public UserAttribute(String name, BigDecimal value)
Constructs a new UserAttribute.- Parameters:
name- the name of the user attributevalue- the BigDecimal value for the user attribute
-
UserAttribute
public UserAttribute(String name, africa.absa.inception.core.util.BinaryBuffer value)
Constructs a new UserAttribute.- Parameters:
name- the name of the user attributevalue- the binary value for the user attribute
-
UserAttribute
public UserAttribute(String name, byte[] value)
Constructs a new UserAttribute.- Parameters:
name- the name of the user attributevalue- the binary value for the user attribute
-
UserAttribute
public UserAttribute(String name, double value)
Constructs a new UserAttribute.- Parameters:
name- the name of the user attributevalue- the double value for the user attribute
-
UserAttribute
public UserAttribute(String name, long value)
Constructs a new UserAttribute.- Parameters:
name- the name of the user attributevalue- the long value for the user attribute
-
-
Method Detail
-
contains
public static boolean contains(List<UserAttribute> list, String name)
Returns whether the list of user attributes contains a user attribute whose name matches the specified name.- Parameters:
list- the user attributes to searchname- the name of the attribute- Returns:
- true if the list of user attributes contains a user attribute whose name matches the specified name or false otherwise
-
getBinaryValue
public static byte[] getBinaryValue(List<UserAttribute> list, String name) throws UserAttributeException
Returns the binary value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attribute- Returns:
- the binary value for the user attribute with the specified name in the specified list
- Throws:
UserAttributeException- if the binary value could not be retrieved for the user attribute
-
getDecimalValue
public static BigDecimal getDecimalValue(List<UserAttribute> list, String name) throws UserAttributeException
Returns the BigDecimal value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attribute- Returns:
- the BigDecimal value for the user attribute with the specified name in the specified list
- Throws:
UserAttributeException- if the decimal value could not be retrieved for the user attribute
-
getDoubleValue
public static double getDoubleValue(List<UserAttribute> list, String name) throws UserAttributeException
Returns the double value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attribute- Returns:
- the double value for the user attribute with the specified name in the specified list
- Throws:
UserAttributeException- if the double value could not be retrieved for the user attribute
-
getIntegerValue
public static int getIntegerValue(List<UserAttribute> list, String name) throws UserAttributeException
Returns the int value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attribute- Returns:
- the int value for the user attribute with the specified name in the specified list
- Throws:
UserAttributeException- if the integer value could not be retrieved for the user attribute
-
getLongValue
public static long getLongValue(List<UserAttribute> list, String name) throws UserAttributeException
Returns the long value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attribute- Returns:
- the long value for the user attribute with the specified name in the specified list
- Throws:
UserAttributeException- if the long value could not be retrieved for the user attribute
-
getStringValue
public static String getStringValue(List<UserAttribute> list, String name) throws UserAttributeException
Returns the String value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attribute- Returns:
- the String value for the user attribute with the specified name in the specified list
- Throws:
UserAttributeException- if the string value could not be retrieved for the user attribute
-
setBinaryValue
public static void setBinaryValue(List<UserAttribute> list, String name, africa.absa.inception.core.util.BinaryBuffer value) throws UserAttributeException
Set the binary value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attributevalue- the binary value for the user attribute- Throws:
UserAttributeException- if the binary value could not be set for the user attribute
-
setBinaryValue
public static void setBinaryValue(List<UserAttribute> list, String name, byte[] value) throws UserAttributeException
Set the binary value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attributevalue- the binary value for the user attribute- Throws:
UserAttributeException- if the binary value could not be set for the user attribute
-
setDecimalValue
public static void setDecimalValue(List<UserAttribute> list, String name, BigDecimal value) throws UserAttributeException
Set the BigDecimal value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attributevalue- the BigDecimal value for the user attribute- Throws:
UserAttributeException- if the decimal value could not be set for the user attribute
-
setDoubleValue
public static void setDoubleValue(List<UserAttribute> list, String name, double value) throws UserAttributeException
Set the double value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attributevalue- the double value for the user attribute- Throws:
UserAttributeException- if the double value could not be set for the user attribute
-
setIntegerValue
public static void setIntegerValue(List<UserAttribute> list, String name, int value) throws UserAttributeException
Set the int value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attributevalue- the int value for the user attribute- Throws:
UserAttributeException- if the integer value could not be set for the user attribute
-
setLongValue
public static void setLongValue(List<UserAttribute> list, String name, long value) throws UserAttributeException
Set the long value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attributevalue- the long value for the user attribute- Throws:
UserAttributeException- if the long value could not be set for the user attribute
-
setStringValue
public static void setStringValue(List<UserAttribute> list, String name, String value) throws UserAttributeException
Set the String value for the user attribute with the specified name in the specified list.- Parameters:
list- the user attributes to searchname- the name of the attributevalue- the String value for the user attribute- Throws:
UserAttributeException- if the string value could not be set for the user attribute
-
getBinaryValue
public byte[] getBinaryValue() throws UserAttributeExceptionReturns the binary value for the user attribute.- Returns:
- the binary value for the user attribute
- Throws:
UserAttributeException- if the binary value could not be retrieved for the user attribute
-
getDecimalValue
public BigDecimal getDecimalValue() throws UserAttributeException
Returns the BigDecimal value for the user attribute.- Returns:
- the BigDecimal value for the user attribute
- Throws:
UserAttributeException- if the decimal value could not be retrieved for the user attribute
-
getDoubleValue
public double getDoubleValue() throws UserAttributeExceptionReturns the double value for the user attribute.- Returns:
- the double value for the user attribute
- Throws:
UserAttributeException- if the double value could not be retrieved for the user attribute
-
getIntegerValue
public int getIntegerValue() throws UserAttributeExceptionReturns the int value for the user attribute.- Returns:
- the int value for the user attribute
- Throws:
UserAttributeException- if the integer value could not be retrieved for the user attribute
-
getLongValue
public long getLongValue() throws UserAttributeExceptionReturns the long value for the user attribute.- Returns:
- the long value for the user attribute
- Throws:
UserAttributeException- if the long value could not be retrieved for the user attribute
-
getName
public String getName()
Returns the name of the user attribute.- Returns:
- the name of the user attribute
-
getStringValue
public String getStringValue()
Returns the String value for the user attribute.- Returns:
- the String value for the user attribute
-
getValue
public String getValue()
Returns the String value for the user attribute.- Returns:
- the String value for the user attribute
-
setBinaryValue
public void setBinaryValue(africa.absa.inception.core.util.BinaryBuffer value)
Set the binary value for the user attribute.- Parameters:
value- the binary value for the user attribute
-
setBinaryValue
public void setBinaryValue(byte[] value)
Set the binary value for the user attribute.- Parameters:
value- the binary value for the user attribute
-
setDecimalValue
public void setDecimalValue(BigDecimal value)
Set the BigDecimal value for the user attribute.- Parameters:
value- the BigDecimal value for the user attribute
-
setDoubleValue
public void setDoubleValue(double value)
Set the double value for the user attribute.- Parameters:
value- the double value for the user attribute
-
setIntegerValue
public void setIntegerValue(int value)
Set the int value for the user attribute.- Parameters:
value- the int value for the user attribute
-
setLongValue
public void setLongValue(long value)
Set the long value for the user attribute.- Parameters:
value- the long value for the user attribute
-
setName
public void setName(String name)
Set the name of the user attribute.- Parameters:
name- the name of the user attribute
-
setStringValue
public void setStringValue(String value)
Set the String value for the user attribute.- Parameters:
value- the String value for the user attribute
-
-