org.apache.lucene.gdata.storage.lucenestorage
Class StorageAccountWrapper

java.lang.Object
  extended by org.apache.lucene.gdata.storage.lucenestorage.StorageAccountWrapper
All Implemented Interfaces:
StorageWrapper

public class StorageAccountWrapper
extends Object
implements StorageWrapper

Wrapps a User Object. The wrapper provides also a Lucene repesentation of the user; User Objects will not be Buffered in the lucene storage component. Each User will be written imidialtely.

Author:
Simon Willnauer

Field Summary
static String FIELD_ACCOUNTNAME
          Lucene field for the username
static String FIELD_AUTHORHREF
          Lucene field for the author link
static String FIELD_AUTHORMAIL
          Lucene field for the author mail address
static String FIELD_AUTHORNAME
          Lucene field for the author name
static String FIELD_PASSWORD
          Lucene field for the password
static String FIELD_ROLES
          Lucene field fot the userroles
 
Constructor Summary
StorageAccountWrapper(GDataAccount user)
           
 
Method Summary
static GDataAccount buildEntity(Document doc)
           
 Document getLuceneDocument()
          Returns a Lucene document representing the Wrapped Entry
 GDataAccount getUser()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIELD_ACCOUNTNAME

public static final String FIELD_ACCOUNTNAME
Lucene field for the username

See Also:
Constant Field Values

FIELD_PASSWORD

public static final String FIELD_PASSWORD
Lucene field for the password

See Also:
Constant Field Values

FIELD_AUTHORNAME

public static final String FIELD_AUTHORNAME
Lucene field for the author name

See Also:
Constant Field Values

FIELD_AUTHORMAIL

public static final String FIELD_AUTHORMAIL
Lucene field for the author mail address

See Also:
Constant Field Values

FIELD_AUTHORHREF

public static final String FIELD_AUTHORHREF
Lucene field for the author link

See Also:
Constant Field Values

FIELD_ROLES

public static final String FIELD_ROLES
Lucene field fot the userroles

See Also:
Constant Field Values
Constructor Detail

StorageAccountWrapper

public StorageAccountWrapper(GDataAccount user)
Parameters:
user - - the user to be wrapped
Method Detail

getLuceneDocument

public Document getLuceneDocument()
Description copied from interface: StorageWrapper
Returns a Lucene document representing the Wrapped Entry

Specified by:
getLuceneDocument in interface StorageWrapper
Returns:
a Lucene Document
See Also:
StorageWrapper.getLuceneDocument()

buildEntity

public static GDataAccount buildEntity(Document doc)
Parameters:
doc - - a lucene document representation of an user
Returns:
- the user to build from the document. or null if the document is null

getUser

public GDataAccount getUser()
Returns:
- the wrapped user


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.