Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Access Management Mobile and Social


oracle.security.idaas.common.data
Class AttrConst<T,M>

java.lang.Object
  extended by oracle.security.idaas.common.data.AttrConst<T,M>


public class AttrConst<T,M>
extends java.lang.Object

This class is used as input argument to store or retrieve an attribute value via LiteAttrMap.get(AttrConst) and LiteAttrMap.put(AttrConst,T) method.

By leveraging Java Generic facility, a strong-type contract is provided at Java compilation time through an AttrConst and the two methods at LiteAttrMap.

AttrConst is an immutable object.

Attr Const contains the name of the attribute, its attribute type. The attribute type exists as: EITHER a Java type OR and a metadata object.

T is Java type for this attribute (e.g. java.lang.String, java.lang.Integer, java.lang.Iterable and etc)

Alternative to passing in a Java Type <>T>, a metadata object (based on Java Generic <M>) can be used to construct an AttrConst object. The metadata object <M> can further describes the nature of this attribute value (e.g. what is inside java.lang.Iterable).

metadata object <M> comes from metadata facilities defined under oracle.security.idaas.common.data.metadata package.

Examples:

  AttrConst<String,BasicMetaData> UID_CONST = new AttrConst<String,BasicMetaData>("uid",String.class);
  
  AttrConst<Long,BasicMetaData> LAST_LOGIN_CONST = new AttrConst<Long,BasicMetaData>("lastLogin",Long.class);
  
  AttrConst<Iterable,BasicMetaData> FRIEND_LIST_CONST = 
       new AttrConst<Iterable,BasicMetaData> (  
         "friendList",       
         Iterable.class);    
         
  

Constructor Summary
AttrConst(java.lang.String name, java.lang.Class<T> attrClass)
           
AttrConst(java.lang.String name, M extraMetadata)
           

 

Method Summary
 java.lang.Class<T> getAttrJavaType()
           
 M getAttrMetadata()
           
 java.lang.String getAttrName()
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

AttrConst

public AttrConst(java.lang.String name,
                 java.lang.Class<T> attrClass)

AttrConst

public AttrConst(java.lang.String name,
                 M extraMetadata)

Method Detail

getAttrName

public java.lang.String getAttrName()

getAttrJavaType

public java.lang.Class<T> getAttrJavaType()

getAttrMetadata

public M getAttrMetadata()

Skip navigation links

Copyright (c) 2012,
Oracle All Rights Reserved.
Built 06/05/2012 17:18:07 PDT