Interface DocumentMapper<T>
-
public interface DocumentMapper<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
from(ContentQueryRow row)
Load from ContentQueryRow.T
from(ContentQueryRow row, Object... autowireObjects)
Returns a view of this ContentQueryRow as a prototype bean with the given typeT
from(ContentQueryRow row, BiConsumer<ContentQueryRow,T> contentQueryRowBeanBiConsumer)
Returns a view of this ContentQueryRow as a prototype bean with the given typeT
fromDocumentAttributes(DocumentAttributes from)
Converts document attributes into a new instance of the beanvoid
fromDocumentAttributes(DocumentAttributes from, T target)
Converts document attributes into an existing instance of a beanDocumentReference
getDocumentReference(T bean)
Returns the DocumentReference for the bean, as specified by annotations.DocumentAttributes
toDocumentAttributes(T bean, boolean newDocument)
Converts a bean to iKnowBase document attributes
-
-
-
Method Detail
-
from
T from(ContentQueryRow row)
Load from ContentQueryRow.
-
from
T from(ContentQueryRow row, Object... autowireObjects)
Returns a view of this ContentQueryRow as a prototype bean with the given type- Parameters:
row
- ContentQueryRow to map fromautowireObjects
- add any additional objects you wish to autowire. ContentQueryRow is always available for autowiring.- Returns:
- ContentQueryRow mapped into new instance of clazz T
-
from
T from(ContentQueryRow row, BiConsumer<ContentQueryRow,T> contentQueryRowBeanBiConsumer)
Returns a view of this ContentQueryRow as a prototype bean with the given type- Parameters:
row
- ContentQueryRow to map fromcontentQueryRowBeanBiConsumer
- allowing further processing for each row with access to ContentQueryRow and the new bean.- Returns:
- ContentQueryRow mapped into new instance of clazz T
-
fromDocumentAttributes
T fromDocumentAttributes(DocumentAttributes from)
Converts document attributes into a new instance of the bean- Parameters:
from
- attributes to convert- Returns:
- the converted bean
-
fromDocumentAttributes
void fromDocumentAttributes(DocumentAttributes from, T target)
Converts document attributes into an existing instance of a bean- Parameters:
from
- attributes to converttarget
- bean to populate
-
toDocumentAttributes
DocumentAttributes toDocumentAttributes(T bean, boolean newDocument)
Converts a bean to iKnowBase document attributes- Parameters:
bean
- bean to savenewDocument
- whether to map properties mapped as "insertable", vs "updatable"- Returns:
- mapped document attributes
-
getDocumentReference
DocumentReference getDocumentReference(T bean)
Returns the DocumentReference for the bean, as specified by annotations.- Parameters:
bean
- bean to extract reference for- Returns:
- reference to iKnowBase document
-
-