|
SAP NetWeaver 7.30 (SP05) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sap.netweaver.bc.uwl.Attribute
public final class Attribute
The Attribute represents grouping around items attribute type and value.
Some of the attributes of Item may be unique to the instance of Item in question.
Such attributes will be described with the help of this class. These generic Attributes are accessible
through item.getAttributes() method. Various types of attributes including arrays are supported.
| Field Summary | |
|---|---|
static char |
TYPE_BOOL
The character b stands for a boolean attribute. |
static char |
TYPE_DATE
The character t stands for a date attribute. |
static char |
TYPE_DOUBLE
The character d stands for a double precision floating-point number attribute. |
static char |
TYPE_INT
The character i stands for an integer attribute. |
static char |
TYPE_LONG
The character l stands for a Long attribute. |
static char |
TYPE_STRING
The character s stands for a string attribute. |
static char |
TYPE_USER
The character u stands for a user attribute. |
| Method Summary | |
|---|---|
static Attribute |
createAttribute(String name,
boolean value)
This static method creates a boolean attribute. |
static Attribute |
createAttribute(String name,
Boolean value)
This static method creates a boolean attribute. |
static Attribute |
createAttribute(String name,
boolean[] values)
This static method creates a boolean attribute. |
static Attribute |
createAttribute(String name,
Boolean[] values)
This static method creates a boolean attribute. |
static Attribute |
createAttribute(String name,
char type)
This static method creates an attribute of the given type. |
static Attribute |
createAttribute(String name,
Date value)
This static method creates a date attribute. |
static Attribute |
createAttribute(String name,
Date[] values)
This static method creates a date attribute. |
static Attribute |
createAttribute(String name,
double value)
This static method creates a double precision floating-point number attribute. |
static Attribute |
createAttribute(String name,
Double value)
This static method creates a double precision floating-point number attribute. |
static Attribute |
createAttribute(String name,
double[] values)
This static method creates a double attributes. |
static Attribute |
createAttribute(String name,
Double[] values)
This static method creates a double precision floating-point number attribute. |
static Attribute |
createAttribute(String name,
int value)
This static method creates an integer attribute. |
static Attribute |
createAttribute(String name,
int[] values)
This static method creates an integer attribute. |
static Attribute |
createAttribute(String name,
Integer value)
This static method creates an integer attribute. |
static Attribute |
createAttribute(String name,
Integer[] values)
This static method creates an integer attribute. |
static Attribute |
createAttribute(String name,
com.sap.security.api.IUser value)
This static method creates a User attribute. |
static Attribute |
createAttribute(String name,
com.sap.security.api.IUser[] values)
This static method creates a User attribute. |
static Attribute |
createAttribute(String name,
long value)
This static method creates a Long attribute. |
static Attribute |
createAttribute(String name,
Long value)
This static method creates a long attribute. |
static Attribute |
createAttribute(String name,
long[] values)
This static method creates a long attribute. |
static Attribute |
createAttribute(String name,
Long[] values)
This static method creates a long attribute. |
static Attribute |
createAttribute(String name,
Object value)
This method takes an instance of Object as the value. |
static Attribute |
createAttribute(String name,
Object[] values)
This method takes an instance of Object as the value. |
static Attribute |
createAttribute(String name,
String value)
This static method creates a string attribute. |
static Attribute |
createAttribute(String name,
String[] values)
This static method creates a string attribute. |
static Attribute |
createAttribute(String name,
String[] values,
boolean isUserID)
This static method creates a string or a user attribute. |
static Attribute |
createAttribute(String name,
String value,
boolean isUserID)
This static method creates a string or a user attribute. |
boolean |
equals(Object obj)
|
String |
getName()
|
String |
getStringValue()
This is similar to getValue()
except for the fact it returns the string value instead of the object itself. |
char |
getType()
|
Object |
getValue()
|
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final char TYPE_STRING
s stands for a string attribute.
This is one of the attribute types stored in the database. these types should not exceed two bytes.
public static final char TYPE_INT
i stands for an integer attribute.
This is one of the attribute types stored in the database.
public static final char TYPE_LONG
l stands for a Long attribute.
This is one of the attribute types stored in the database.
public static final char TYPE_DATE
t stands for a date attribute.
This is one of the attribute types stored in the database.
public static final char TYPE_DOUBLE
d stands for a double precision floating-point number attribute.
This is one of the attribute types stored in the database.
public static final char TYPE_BOOL
b stands for a boolean attribute.
This is one of the attribute types stored in the database. these types should not exceed two bytes.
public static final char TYPE_USER
u stands for a user attribute.
This is one of the attribute types stored in the database. these types should not exceed two bytes.
| Method Detail |
|---|
public String getName()
public Object getValue()
public String getStringValue()
getValue()
except for the fact it returns the string value instead of the object itself.
public String toString()
toString in class ObjectgetStringValue().Object.toString(),
getValue()public char getType()
public static Attribute createAttribute(String name,
int value)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.value - the value of the attribute. Be careful when it equals 0
since there exists no way of passing a null value. If the value equals null, it is better to use createAttribute(String, char).
- Returns:
- Attribute a new attribute with type equal to
TYPE_INT. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
long value)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.value - the value of the attribute. Be careful when it equals 0
since there exists no way of passing a null value. If the value equals null, it is better to use
createAttribute(java.lang.String, char).
- Returns:
- Attribute a new attribute with type equal to
TYPE_LONG. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
int[] values)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.values - the values of the attribute. This is an array of integers (ints).
The length of the array can be zero. Be careful when any element of this array equals 0
since there exists no way of passing a null value.
TYPE_INT.
public static Attribute createAttribute(String name,
long[] values)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.values - the values of the attribute. This is an array of longs.
The length of the array can be zero. Be careful when any element of this array equals 0
since there exists no way of passing a null value.
TYPE_LONG.
public static Attribute createAttribute(String name,
Integer value)
createAttribute(java.lang.String, int) is that it takes the wrapper object of int Integer.
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.value - the value of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char).
- Returns:
- Attribute a new attribute with type equal to
TYPE_INT. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
Long value)
createAttribute(java.lang.String, long) is that it takes the wrapper object of long Long.
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.value - the value of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char).
- Returns:
- Attribute a new attribute with type equal to
TYPE_LONG. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
Integer[] values)
createAttribute(java.lang.String, int) is that it takes the wrapper object of int Integer.
In addition to that, the value of this attribute represents an array of integers.
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.values - the values of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char). Even if it does not equal null,
the length of the array can equal zero.
- Returns:
- Attribute a new attribute with type equal to
TYPE_INT. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
Long[] values)
createAttribute(java.lang.String, long) is that it takes the wrapper object of long Long.
In addition to that, the value of this attribute represents an array of longs.
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.values - the values of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char). Even if it does not equal null,
the length of the array can equal zero.
- Returns:
- Attribute a new attribute with type equal to
TYPE_INT. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
String value)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.value - the value of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char).
- Returns:
- Attribute a new attribute with type equal to
TYPE_STRING. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
String[] values)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.values - the values of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char). The length of the array can be zero.
- Returns:
- Attribute a new attribute with type equal to
TYPE_STRING. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
Date value)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.value - the value of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char).
- Returns:
- Attribute a new attribute with type equal to
TYPE_DATE. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
Date[] values)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.values - the values of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char). The length of the array can be zero.
- Returns:
- Attribute a new attribute with type equal to
TYPE_DATE. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
double value)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.value - the value of the attribute. Be careful when it equals 0
since there exists no way of passing a null value. If the value equals null, it is better to use
createAttribute(java.lang.String, char).
- Returns:
- Attribute a new attribute with type equal to
TYPE_DOUBLE. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
double[] values)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.values - the values of the attribute. This is an array of doubles
The length of the array can be zero. Be careful when any element of this array equals 0
since there exists no way of passing a null value.
TYPE_DOUBLE.
public static Attribute createAttribute(String name,
Double value)
createAttribute(java.lang.String, double)
except for the fact that it expects an instance of the wrapper object of double.
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.value - the value of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char).
- Returns:
- Attribute a new attribute with type equal to
TYPE_DOUBLE. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
Double[] values)
createAttribute(java.lang.String, double)
except for the fact that it expects an instance of the wrapper object of double.
In addition to that, this instance can possibly have more than one value.
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.values - the values of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char). Even if it does not equal null,
the length of the array can equal zero.
- Returns:
- Attribute a new attribute with type equal to
TYPE_DOUBLE. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
boolean value)
value - the value of the attribute. Be careful when it equals false
since there exists no way of passing a null value. If the value equals null, it is better to use
createAttribute(java.lang.String, char).
- Returns:
- Attribute a new attribute with type equal to
TYPE_BOOL. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
boolean[] values)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.values - the values of the attribute. This is an array of booleans
The length of the array can be zero. Be careful when any element of this array equals false
since there exists no way of passing a null value.
TYPE_BOOL.
public static Attribute createAttribute(String name,
Boolean value)
createAttribute(java.lang.String, boolean)
except for the fact that it expects an instance of the wrapper object of boolean.
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.value - the value of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char).
- Returns:
- Attribute a new attribute with type equal to
TYPE_BOOL. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
Boolean[] values)
createAttribute(java.lang.String, boolean)
except for the fact that it expects an instance of the wrapper object of boolean.
In addition to that, this instance can possibly have more than one value.
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.values - the values of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char). Even if it does not equal null,
the length of the array can equal zero.
- Returns:
- Attribute a new attribute with type equal to
TYPE_BOOL. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
Object value)
Object as the value.
It tries to see whether this value is an instance of
Integer, Double, Boolean, String, etc.
If it cannot figure it out, it will take the string representation of this value.
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.value - the value of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char).
- Returns:
- Attribute the type depends on the type of the value.
It can be null if the value is null.
public static Attribute createAttribute(String name,
Object[] values)
Object as the value.
This attribute can have more than one value.
It tries to see whether this value is an instance of
Integer, Double, Boolean, String, etc.
If it cannot figure it out, it will take the string representation of this value.
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.values - the values of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char). Even if it does not equal null,
the length of the array can equal zero.
- Returns:
- Attribute the type depends on the type of the value.
It can be null if the value is null.
- See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
com.sap.security.api.IUser value)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.value - the value of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char).
- Returns:
- Attribute a new attribute with type equal to
TYPE_USER. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
com.sap.security.api.IUser[] values)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.values - the values of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char). Even if it does not equal null,
the length of the array can equal zero.
- Returns:
- Attribute a new attribute with type equal to
TYPE_USER. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
String value,
boolean isUserID)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.value - the value of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char).isUserID - If it is false, a string attribute will be created.
- Returns:
- Attribute a new attribute with type equal to
TYPE_USER
if isUserID is true. Otherwise, the type will be TYPE_STRING. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
String[] values,
boolean isUserID)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.values - the values of the attribute. Could be null. If the value equals null, it is better to use
createAttribute(String, char). Even if it does not equal null,
the length of the array can equal zero.isUserID - If it is false, a string attribute will be created.
- Returns:
- Attribute a new attribute with type equal to
TYPE_USER
if isUserID is true. Otherwise, the type will be TYPE_STRING. - See Also:
createAttribute(java.lang.String, char)
public static Attribute createAttribute(String name,
char type)
name - the name of the attribute. Accepts null even though it it is not advisable to pass a null value.type - any one of the types like integer, double, boolean, ETC.
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] UWLJWF
|
[sap.com] tc/kmc/bc.uwl/api
|
default
|
EP-BC-UWL
|
[sap.com] UWLJWF
|
[sap.com] tc/kmc/bc.uwl/api
|
-
|
EP-BC-UWL
|
|
SAP NetWeaver 7.30 (SP05) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||