com.groupdocs.annotation.data.constructor
Class DocumentConstructor<T extends IDocument>

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

public class DocumentConstructor<T extends IDocument>
extends Object

Constructor for create Document object

Author:
Aleksey Permyakov (08.10.2014)

Method Summary
static DocumentConstructor create()
          Create empty constructor with entity object
static
<P extends IDocument>
DocumentConstructor<IDocument>
create(P entity)
          Create entity constructor with provided entity object
 T end()
          Get created document object
 DocumentConstructor insert()
          Inset entity to database
 IDocument select()
          Select entity from database by guid
static void setConstructor(IConstructor<IDocument> constructor)
          Setter for property 'constructor'.
 DocumentConstructor withDocumentName(String documentName)
          Set document name to document object
 DocumentConstructor withGuid(String guid)
          Set guid to document object
 DocumentConstructor withId(int id)
          Set id to document object
 DocumentConstructor withSessionId(int sessionId)
          Set session id to document object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

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

Returns:
entity constructor

create

public static <P extends IDocument> DocumentConstructor<IDocument> create(P entity)
Create entity constructor with provided entity object

Returns:
reply constructor

setConstructor

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

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

withId

public DocumentConstructor withId(int id)
Set id to document object

Parameters:
id - ID to set
Returns:
document constructor

withDocumentName

public DocumentConstructor withDocumentName(String documentName)
Set document name to document object

Parameters:
documentName - document name
Returns:
document constructor

withSessionId

public DocumentConstructor withSessionId(int sessionId)
Set session id to document object

Parameters:
sessionId - session id
Returns:
document constructor

withGuid

public DocumentConstructor withGuid(String guid)
Set guid to document object

Parameters:
guid - document guid
Returns:
document constructor

end

public T end()
Get created document object

Returns:
document object

insert

public DocumentConstructor insert()
                           throws AnnotationException
Inset entity to database

Returns:
entity constructor
Throws:
AnnotationException

select

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

Returns:
selected entity
Throws:
AnnotationException


Copyright © 2014. All rights reserved.