BEA Systems, Inc.

ALES Entitlement Query API Reference

com.bea.ales.EntitlementQuery.common
Interface AttributeElement


public interface AttributeElement

AttributeElement represents an attribute name value pair. You may use any Java type as the value of an attribute. The Java type will be mapped into the appropriate ALES type. Collections and arrays will automatically be converted into ALES lists. The following Java to ALES type mappings are used: java.lang.String=ALES string, java.lang.Integer=ALES integer, java.lang.Boolean=ALES boolean, java.util.Date=ALES date, java.net.InetAddress=ALES ip, com.bea.ales.EntitlementQuery.common.Time=ALES time, com.bea.ales.EntitlementQuery.common.CustomEnumerationValue=ALES enum. Any other Java type will be converted to an ALES string, using the Object's toString() method. To create an instance of an AttributeElement use the AttributeElementFactory

Author:
Copyright © 2007 BEA Systems, Inc. All Rights Reserved.
See Also:
AttributeElementFactory, Time, CustomEnumerationValue

Method Summary
 java.lang.String getASIType()
          Gets the ASI type name.
 java.lang.String getName()
          Gets the attribute Name.
 java.lang.Object getValue()
          Gets the attribute Value.
 boolean isList()
          Determines if this is a multi-valued attribute.
 void setName(java.lang.String name)
          Set the attribute name.
 void setValue(java.lang.Object value)
          Set the attribute value.
 

Method Detail

setName

public void setName(java.lang.String name)
             throws QueryException
Set the attribute name.

Throws:
QueryException -  

setValue

public void setValue(java.lang.Object value)
              throws QueryException
Set the attribute value. Multi-valued attributes may be stored using either arrays of Java objects, or using a java.util.Collection. All elements in a multi-value attribute must be of the same Java type.

Parameters:
value - value of the attribute. The Java type will be used to determine the proper ALES type.
Throws:
QueryException -  

getName

public java.lang.String getName()
Gets the attribute Name.

getValue

public java.lang.Object getValue()
Gets the attribute Value. If this is a multi-valued attribute, then value will be returned as a java.util.Collection.

See Also:
getASIType()

isList

public boolean isList()
Determines if this is a multi-valued attribute.

getASIType

public java.lang.String getASIType()
Gets the ASI type name.

Returns:
Return a string value indicating the attribute value type. Possible values are listed below.
java.lang.String "string"
java.lang.Integer "integer"
java.lang.Boolean "boolean"
java.net.InetAddress "ip"
java.lang.Date "date"
com.bea.ales.EntitlementQuery.common.Time "time"
com.bea.ales.EntitlementQuery.common.CustomEnumerationValue "CustomEnumerationValue"
Object "string"
See Also:
getValue()

Documentation is available at
http://edocs.bea.com/ales/docs30