com.groupdocs.annotation.data.constructor
Class UserConstructor<T extends IUser>

java.lang.Object
  extended by com.groupdocs.annotation.data.constructor.UserConstructor<T>

public class UserConstructor<T extends IUser>
extends Object

Constructor for create User object

Author:
Aleksey Permyakov (08.10.2014)

Method Summary
static UserConstructor create()
          Create empty constructor with entity object
static
<P extends IUser>
UserConstructor<IUser>
create(P entity)
          Create entity constructor with provided entity object
 IUser end()
          Get created User object
 UserConstructor insert()
          Inset entity to database
 IUser select()
          Select entity from database by guid
static void setConstructor(IConstructor<IUser> constructor)
          Setter for property 'constructor'.
 UserConstructor withAccountId(int accountId)
          Set account id to entity object
 UserConstructor withFirstName(String firstName)
          Set FirstName to entity object
 UserConstructor withGuid(String guid)
          Set Guid to entity object
 UserConstructor withId(int id)
          Set ID to entity object
 UserConstructor withIsActivated(Boolean isActivated)
          Set IsActivated to entity object
 UserConstructor withIsPrimary(Boolean isPrimary)
          Set IsPrimary to entity object
 UserConstructor withLastName(String lastName)
          Set LastName to entity object
 UserConstructor withNewsletterEnabled(Boolean newsletterEnabled)
          Set NewsletterEnabled to entity object
 UserConstructor withPassword(String password)
          Set Password to entity object
 UserConstructor withPhoto(byte[] photo)
          Set Photo to entity object (bytes of png image)
 UserConstructor withPswdResetToken(String pswdResetToken)
          Set PswdResetToken to entity object
 UserConstructor withSigninCount(int signinCount)
          Set SigninCount to entity object
 UserConstructor withSigninDate(Date signinDate)
          Set SigninDate to entity object
 UserConstructor withSignupDate(Date signupDate)
          Set SignupDate to entity object
 UserConstructor withUserName(String userName)
          Set UserName to entity object
 UserConstructor withVerificationToken(String verificationToken)
          Set VerificationToken to entity object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static UserConstructor create()
Create empty constructor with entity object

Returns:
entity constructor

create

public static <P extends IUser> UserConstructor<IUser> create(P entity)
Create entity constructor with provided entity object

Returns:
User constructor

setConstructor

public static void setConstructor(IConstructor<IUser> constructor)
Setter for property 'constructor'.

Parameters:
constructor - Value to set for property 'constructor'.

withId

public UserConstructor withId(int id)
Set ID to entity object

Parameters:
id - ID to set
Returns:
entity constructor

withGuid

public UserConstructor withGuid(String guid)
Set Guid to entity object

Parameters:
guid - Guid
Returns:
entity constructor

withAccountId

public UserConstructor withAccountId(int accountId)
Set account id to entity object

Parameters:
accountId - account id
Returns:
entity constructor

withFirstName

public UserConstructor withFirstName(String firstName)
Set FirstName to entity object

Parameters:
firstName - first name
Returns:
entity constructor

withIsActivated

public UserConstructor withIsActivated(Boolean isActivated)
Set IsActivated to entity object

Parameters:
isActivated - is activated
Returns:
entity constructor

withIsPrimary

public UserConstructor withIsPrimary(Boolean isPrimary)
Set IsPrimary to entity object

Parameters:
isPrimary - is primary
Returns:
entity constructor

withLastName

public UserConstructor withLastName(String lastName)
Set LastName to entity object

Parameters:
lastName - last name
Returns:
entity constructor

withNewsletterEnabled

public UserConstructor withNewsletterEnabled(Boolean newsletterEnabled)
Set NewsletterEnabled to entity object

Parameters:
newsletterEnabled - newsletter enabled
Returns:
entity constructor

withPassword

public UserConstructor withPassword(String password)
Set Password to entity object

Parameters:
password - password
Returns:
entity constructor

withPhoto

public UserConstructor withPhoto(byte[] photo)
Set Photo to entity object (bytes of png image)

Parameters:
photo - photo
Returns:
entity constructor

withPswdResetToken

public UserConstructor withPswdResetToken(String pswdResetToken)
Set PswdResetToken to entity object

Parameters:
pswdResetToken - pswd reset token
Returns:
entity constructor

withSigninCount

public UserConstructor withSigninCount(int signinCount)
Set SigninCount to entity object

Parameters:
signinCount - signin count
Returns:
entity constructor

withSigninDate

public UserConstructor withSigninDate(Date signinDate)
Set SigninDate to entity object

Parameters:
signinDate - signin date
Returns:
entity constructor

withSignupDate

public UserConstructor withSignupDate(Date signupDate)
Set SignupDate to entity object

Parameters:
signupDate - signup date
Returns:
entity constructor

withUserName

public UserConstructor withUserName(String userName)
Set UserName to entity object

Parameters:
userName - user name
Returns:
entity constructor

withVerificationToken

public UserConstructor withVerificationToken(String verificationToken)
Set VerificationToken to entity object

Parameters:
verificationToken - verification token
Returns:
entity constructor

end

public IUser end()
Get created User object

Returns:
User object

insert

public UserConstructor insert()
                       throws AnnotationException
Inset entity to database

Returns:
entity constructor
Throws:
AnnotationException

select

public IUser select()
             throws AnnotationException
Select entity from database by guid

Returns:
selected entity
Throws:
AnnotationException


Copyright © 2014. All rights reserved.