public class ExportEntityVisitor<T extends TopiaEntityEnum> extends Object implements TopiaEntityVisitor, Closeable
| Modifier and Type | Field and Description |
|---|---|
protected Map<T,TopiaCsvExports.EntityExportContext<T>> |
entityExporters
Export for simple entity.
|
protected TopiaEntityEnumProvider<T> |
persistenceHelper |
static org.nuiton.util.TimeLog |
TIME_LOG |
| Constructor and Description |
|---|
ExportEntityVisitor(TopiaEntityEnumProvider<T> persistenceHelper,
Map<T,TopiaCsvExports.EntityExportContext<T>> entityExporters) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
close() |
void |
end(TopiaEntity entity) |
<E extends TopiaEntity> |
export(Iterable<E> entities) |
void |
export(TopiaEntity entity) |
protected TopiaCsvExports.EntityExportContext |
getEntityContext(Class<? extends TopiaEntity> entityType) |
static <T extends TopiaEntityEnum> |
newVisitor(TopiaEntityEnumProvider<T> persistenceHelper,
Map<T,TopiaCsvExports.EntityExportContext<T>> entityExporters) |
void |
start(TopiaEntity entity) |
void |
visit(TopiaEntity entity,
String propertyName,
Class<?> collectionType,
Class<?> type,
int index,
Object value) |
void |
visit(TopiaEntity entity,
String propertyName,
Class<?> collectionType,
Class<?> type,
Object value) |
void |
visit(TopiaEntity entity,
String propertyName,
Class<?> type,
Object value) |
protected void |
visitEntityCollection(TopiaEntity entity,
String propertyName,
Class<?> collectionType,
Class<?> type,
Collection<?> cValue) |
public static final org.nuiton.util.TimeLog TIME_LOG
protected final Map<T extends TopiaEntityEnum,TopiaCsvExports.EntityExportContext<T extends TopiaEntityEnum>> entityExporters
protected final TopiaEntityEnumProvider<T extends TopiaEntityEnum> persistenceHelper
public ExportEntityVisitor(TopiaEntityEnumProvider<T> persistenceHelper, Map<T,TopiaCsvExports.EntityExportContext<T>> entityExporters)
public static <T extends TopiaEntityEnum> ExportEntityVisitor<T> newVisitor(TopiaEntityEnumProvider<T> persistenceHelper, Map<T,TopiaCsvExports.EntityExportContext<T>> entityExporters)
public <E extends TopiaEntity> void export(Iterable<E> entities)
public void export(TopiaEntity entity)
public void start(TopiaEntity entity)
start in interface TopiaEntityVisitorpublic void end(TopiaEntity entity)
end in interface TopiaEntityVisitorpublic void visit(TopiaEntity entity, String propertyName, Class<?> type, Object value)
visit in interface TopiaEntityVisitorpublic void visit(TopiaEntity entity, String propertyName, Class<?> collectionType, Class<?> type, Object value)
visit in interface TopiaEntityVisitorprotected void visitEntityCollection(TopiaEntity entity, String propertyName, Class<?> collectionType, Class<?> type, Collection<?> cValue)
public void visit(TopiaEntity entity, String propertyName, Class<?> collectionType, Class<?> type, int index, Object value)
visit in interface TopiaEntityVisitorpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void clear()
clear in interface TopiaEntityVisitorprotected TopiaCsvExports.EntityExportContext getEntityContext(Class<? extends TopiaEntity> entityType)
Copyright © 2004–2015 CodeLutin. All rights reserved.