com.groupdocs.annotation.data.constructor
Class SessionConstructor<T extends ISession>

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

public class SessionConstructor<T extends ISession>
extends Object

Constructor for create Session object

Author:
Aleksey Permyakov (02.11.2014)

Method Summary
static SessionConstructor create()
          Create empty constructor with entity object
static
<P extends ISession>
SessionConstructor<ISession>
create(P entity)
          Create entity constructor with provided entity object
 ISession end()
          Get created entity object
 SessionConstructor insert()
          Inset entity to database
 ISession select()
          Select entity from database by guid
static void setConstructor(IConstructor<ISession> constructor)
          Setter for property 'constructor'.
 SessionConstructor withCallbackUrl(String callbackUrl)
          Set callback url to entity object
 SessionConstructor withDocumentId(int documentId)
          Set Document id to entity object
 SessionConstructor withGuid(String guid)
          Set Guid to entity object
 SessionConstructor withId(int id)
          Set ID to entity object
 SessionConstructor withSharedLinkAccessRights(int sharedLinkAccessRights)
          Set shared link access rights to entity object
 SessionConstructor withStartedOn(Date startedOn)
          Set started on date to entity object
 SessionConstructor withUserId(int userId)
          Set user id 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 SessionConstructor create()
Create empty constructor with entity object

Returns:
entity constructor

create

public static <P extends ISession> SessionConstructor<ISession> create(P entity)
Create entity constructor with provided entity object

Returns:
Session constructor

setConstructor

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

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

withId

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

Parameters:
id - ID to set
Returns:
entity constructor

withUserId

public SessionConstructor withUserId(int userId)
Set user id to entity object

Parameters:
userId - user id
Returns:
entity constructor

withCallbackUrl

public SessionConstructor withCallbackUrl(String callbackUrl)
Set callback url to entity object

Parameters:
callbackUrl - callback url
Returns:
entity constructor

withDocumentId

public SessionConstructor withDocumentId(int documentId)
Set Document id to entity object

Parameters:
documentId - document id
Returns:
entity constructor

withGuid

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

Parameters:
guid - guid
Returns:
entity constructor

withSharedLinkAccessRights

public SessionConstructor withSharedLinkAccessRights(int sharedLinkAccessRights)
Set shared link access rights to entity object

Parameters:
sharedLinkAccessRights - shared link access rights
Returns:
entity constructor

withStartedOn

public SessionConstructor withStartedOn(Date startedOn)
Set started on date to entity object

Parameters:
startedOn - started on date
Returns:
entity constructor

end

public ISession end()
Get created entity object

Returns:
entity object

insert

public SessionConstructor insert()
                          throws AnnotationException
Inset entity to database

Returns:
entity constructor
Throws:
AnnotationException

select

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

Returns:
selected entity
Throws:
AnnotationException


Copyright © 2014. All rights reserved.