Package | Description |
---|---|
org.nuiton.topia.persistence |
This package contains interfaces and abstract classes for entities and daos.
|
org.nuiton.topia.persistence.csv |
Base package for csv import and export of entities.
|
org.nuiton.topia.persistence.csv.in |
Package for csv import of entities.
|
org.nuiton.topia.persistence.csv.out |
Package for csv export of entities.
|
org.nuiton.topia.persistence.metadata |
Package to define metadatas over
TopiaEntity . |
org.nuiton.topia.persistence.util |
Modifier and Type | Interface and Description |
---|---|
interface |
TopiaPersistenceHelper<T extends TopiaEntityEnum>
Object which helps to wrap some static generated code
(dao helper, entityEnum).
|
Modifier and Type | Method and Description |
---|---|
TopiaEntityEnum |
TopiaDAOImpl.getTopiaEntityEnum() |
TopiaEntityEnum |
TopiaDAO.getTopiaEntityEnum()
Get the entityEnum of the type of entity managed by this DAO.
|
Modifier and Type | Class and Description |
---|---|
class |
EntityCsvModel<T extends TopiaEntityEnum,E extends TopiaEntity>
A model to import / export entities into csv files.
|
Modifier and Type | Method and Description |
---|---|
static <T extends TopiaEntityEnum,E extends TopiaEntity> |
EntityCsvModel.newModel(char separator,
TableMeta<T> tableMeta) |
static <T extends TopiaEntityEnum,E extends TopiaEntity> |
EntityCsvModel.newModel(char separator,
TableMeta<T> tableMeta,
String idHeader) |
Modifier and Type | Class and Description |
---|---|
class |
CsvFileImportResult<T extends TopiaEntityEnum>
To keep result of the import of a file.
|
class |
CsvImportResult<T extends TopiaEntityEnum>
A simple csv result bean just to keep the number of created or
updated entities.
|
class |
EntityAssociationImportModel<T extends TopiaEntityEnum>
A model to import associations of entities from csv files.
|
interface |
ImportModelFactory<T extends TopiaEntityEnum>
To produce import model.
|
interface |
ImportStrategy<T extends TopiaEntityEnum>
Strategy to import some stuff.
|
Modifier and Type | Field and Description |
---|---|
protected T |
CsvImportResult.entityType
type of entity to import csv datas.
|
Modifier and Type | Method and Description |
---|---|
static <T extends TopiaEntityEnum,M extends MetaFilenameAware<T>> |
TopiaCsvImports.discoverEntries(Iterable<M> possibleMetas,
File directory,
List<String> missingEntries)
Discover all files that can be imported (as a table or an association) from a directory.
|
static <T extends TopiaEntityEnum,M extends MetaFilenameAware<T>> |
TopiaCsvImports.discoverEntries(String entryPrefix,
Iterable<M> possibleMetas,
ZipFile zipFile,
List<String> missingEntries)
Discover all files that can be imported (as a table or an association) from a zipfile.
|
static <T extends TopiaEntityEnum,E extends TopiaEntity> |
TopiaCsvImports.importAllEntities(TopiaDAO<E> dao,
TableMeta<T> meta,
org.nuiton.csv.Import<E> importer,
CsvImportResult<T> csvResult) |
static <T extends TopiaEntityEnum,E extends TopiaEntity> |
TopiaCsvImports.importAllEntities(TopiaDAO<E> dao,
TableMeta<T> meta,
org.nuiton.csv.Import<E> importer,
CsvImportResult<T> csvResult,
int nbRowBuffer) |
static <T extends TopiaEntityEnum,E extends TopiaEntity> |
TopiaCsvImports.importAllEntitiesAndReturnThem(TopiaDAO<E> dao,
TableMeta<T> meta,
org.nuiton.csv.Import<E> importer,
CsvImportResult<T> csvResult) |
static <T extends TopiaEntityEnum> |
TopiaCsvImports.importAssociation(Reader reader,
ImportStrategy<T> importStrategy,
AssociationMeta<T> meta,
CsvImportResult<T> csvResult)
To import a association (given by his
meta ) from a reader and a strategy. |
static <T extends TopiaEntityEnum> |
TopiaCsvImports.importAssociation(TopiaContext tx,
AssociationMeta<T> meta,
org.nuiton.csv.ImportToMap importer,
CsvImportResult<T> csvResult,
int nbRowBuffer) |
static <T extends TopiaEntityEnum> |
TopiaCsvImports.importAssociation(TopiaContext tx,
AssociationMeta<T> meta,
Map<String,TopiaEntity> universe,
org.nuiton.csv.ImportToMap importer,
CsvImportResult<T> csvResult,
int nbRowBuffer) |
static <T extends TopiaEntityEnum> |
TopiaCsvImports.importNMAssociation(TopiaContext tx,
AssociationMeta<T> meta,
org.nuiton.csv.ImportToMap importer,
CsvImportResult<T> csvResult,
int nbRowBuffer) |
static <T extends TopiaEntityEnum> |
TopiaCsvImports.importNMAssociation(TopiaContext tx,
AssociationMeta<T> meta,
Map<String,TopiaEntity> universe,
org.nuiton.csv.ImportToMap importer,
CsvImportResult<T> csvResult,
int nbRowBuffer) |
static <T extends TopiaEntityEnum,E extends TopiaEntity> |
TopiaCsvImports.importNotExistingEntities(TopiaDAO<E> dao,
TableMeta<T> meta,
Map<String,TopiaEntity> universe,
org.nuiton.csv.Import<E> importer,
CsvImportResult<T> csvResult) |
static <T extends TopiaEntityEnum,E extends TopiaEntity> |
TopiaCsvImports.importTable(Reader reader,
ImportStrategy<T> importStrategy,
TableMeta<T> meta,
CsvImportResult<T> csvResult)
To import a table (given by his
meta ) from a reader and a strategy. |
static <T extends TopiaEntityEnum,E extends TopiaEntity> |
TopiaCsvImports.importTableAndReturn(Reader reader,
ImportStrategy<T> importStrategy,
TableMeta<T> meta,
CsvImportResult<T> csvResult)
To import a table (given by his
meta ) from a reader and a strategy. |
static <T extends TopiaEntityEnum> |
EntityAssociationImportModel.newImportModel(char separator,
AssociationMeta<T> meta) |
static <T extends TopiaEntityEnum> |
CsvFileImportResult.newResult(String importFileName,
T... universe) |
static <T extends TopiaEntityEnum> |
CsvImportResult.newResult(T entityType,
String importFileName,
boolean createIfNotFound) |
static <T extends TopiaEntityEnum> |
CsvImportResult.newResult(T entityType,
String importFileName,
boolean createIfNotFound,
CsvProgressModel progressModel) |
Modifier and Type | Method and Description |
---|---|
static <T extends TopiaEntityEnum> |
CsvFileImportResult.newResult(String importFileName,
T... universe) |
Constructor and Description |
---|
CsvFileImportResult(String importFileName,
T... universe) |
Modifier and Type | Class and Description |
---|---|
class |
EntityAssociationExportModel<T extends TopiaEntityEnum,E extends TopiaEntity>
A model to export associations of entities into csv files.
|
class |
ExportEntityVisitor<T extends TopiaEntityEnum>
Entity visitor to export data to csv files.
|
interface |
ExportModelFactory<T extends TopiaEntityEnum>
To produce export model.
|
interface |
PrepareDataForExport<T extends TopiaEntityEnum>
Prepare data to export.
|
static class |
TopiaCsvExports.AssociationExportContext<T extends TopiaEntityEnum>
To export associations as csv files.
|
static class |
TopiaCsvExports.EntityExportContext<T extends TopiaEntityEnum>
to export entity as csv files.
|
Modifier and Type | Method and Description |
---|---|
static <T extends TopiaEntityEnum> |
TopiaCsvExports.createReplicateEntityVisitorContexts(ExportModelFactory<T> modelFactory,
Iterable<TableMeta<T>> entityMetas,
Iterable<AssociationMeta<T>> associationMetas,
File container) |
static <T extends TopiaEntityEnum> |
TopiaCsvExports.createReplicateEntityVisitorContexts(ExportModelFactory<T> modelFactory,
MetaFilenameAware<T>[] entityMetas,
com.google.common.collect.Multimap<T,MetaFilenameAware<T>> associations,
File container) |
static <T extends TopiaEntityEnum> |
TopiaCsvExports.exportData(AssociationMeta<T> associationMeta,
ExportModelFactory<T> modelFactory,
PrepareDataForExport<T> prepareDataForExport,
File file) |
static <T extends TopiaEntityEnum> |
TopiaCsvExports.exportData(TableMeta<T> tableMeta,
ExportModelFactory<T> modelFactory,
PrepareDataForExport<T> prepareDataForExport) |
static <T extends TopiaEntityEnum> |
TopiaCsvExports.exportData(TableMeta<T> tableMeta,
ExportModelFactory<T> modelFactory,
PrepareDataForExport<T> prepareDataForExport,
File file) |
static <T extends TopiaEntityEnum> |
TopiaCsvExports.EntityExportContext.newExportContext(org.nuiton.csv.ExportModel<TopiaEntity> model,
TableMeta<T> meta,
File container) |
static <T extends TopiaEntityEnum,E extends TopiaEntity> |
EntityAssociationExportModel.newExportModel(char separator,
AssociationMeta<T> meta) |
static <T extends TopiaEntityEnum> |
ExportEntityVisitor.newVisitor(TopiaPersistenceHelper<T> persistenceHelper,
Map<T,TopiaCsvExports.EntityExportContext<T>> entityExporters) |
static <T extends TopiaEntityEnum,E extends TopiaEntity> |
TopiaCsvExports.prepareExport(AssociationMeta<T> associationMeta,
ExportModelFactory<T> modelFactory,
PrepareDataForExport<T> prepareDataForExport) |
static <T extends TopiaEntityEnum,E extends TopiaEntity> |
TopiaCsvExports.prepareExport(TableMeta<T> tableMeta,
ExportModelFactory<T> modelFactory,
PrepareDataForExport<T> prepareDataForExport) |
Modifier and Type | Class and Description |
---|---|
class |
AssociationMeta<T extends TopiaEntityEnum>
Define the meta data of a entity association field.
|
class |
DbMeta<T extends TopiaEntityEnum>
Define metas about a db.
|
interface |
MetaFilenameAware<T extends TopiaEntityEnum>
Contract to import or export some metas.
|
class |
TableMeta<T extends TopiaEntityEnum>
Define metas of a given db table.
|
Modifier and Type | Field and Description |
---|---|
protected T |
AssociationMeta.source
Association source entity type.
|
protected T |
TableMeta.source
Type of the entity.
|
protected T |
AssociationMeta.target
Association target entity type.
|
Modifier and Type | Method and Description |
---|---|
static <T extends TopiaEntityEnum> |
DbMeta.newDbMeta(TopiaPersistenceHelper<T> typeProvider,
T[] universe,
T... nonEditables) |
static <T extends TopiaEntityEnum> |
TableMeta.newMeta(T entityEnum,
TopiaPersistenceHelper<T> typeProvider) |
protected static <T extends TopiaEntityEnum> |
AssociationMeta.newMeta(T source,
T target,
String name) |
protected static <T extends TopiaEntityEnum,M extends MetaFilenameAware<T>> |
Metadatas.newMetaBySourcefunction() |
static <T extends TopiaEntityEnum,M extends MetaFilenameAware<T>> |
Metadatas.split(Iterable<M> metas) |
static <T extends TopiaEntityEnum,M extends MetaFilenameAware<T>> |
Metadatas.uniqueIndex(Iterable<M> metas) |
Modifier and Type | Method and Description |
---|---|
static <T extends TopiaEntityEnum> |
DbMeta.newDbMeta(TopiaPersistenceHelper<T> typeProvider,
T[] universe,
T... nonEditables) |
static <T extends TopiaEntityEnum> |
DbMeta.newDbMeta(TopiaPersistenceHelper<T> typeProvider,
T[] universe,
T... nonEditables) |
Constructor and Description |
---|
DbMeta(TopiaPersistenceHelper<T> persistenceHelper,
T[] entityTypes,
T... nonEditableTypes) |
DbMeta(TopiaPersistenceHelper<T> persistenceHelper,
T[] entityTypes,
T... nonEditableTypes) |
Modifier and Type | Class and Description |
---|---|
class |
TopiaEntityMap<K extends TopiaEntityEnum,V extends TopiaEntity>
A dictionnary of
TopiaEntity associated to a TopiaEntityEnum . |
Modifier and Type | Field and Description |
---|---|
protected TopiaEntityEnum |
EntityOperator.contract
the constant of the entity
|
protected TopiaEntityEnum[] |
Collector.contracts
la liste des contracts des entites connues.
|
Modifier and Type | Field and Description |
---|---|
protected Map<TopiaEntityEnum,EntityOperator<?>> |
EntityOperatorStore.store
le cache d'operateurs
|
Modifier and Type | Method and Description |
---|---|
static TopiaEntityEnum |
TopiaEntityHelper.getEntityEnum(Class<? extends TopiaEntity> klass,
TopiaEntityEnum... contracts) |
Modifier and Type | Method and Description |
---|---|
static Map<Class<? extends TopiaEntity>,List<TopiaEntity>> |
TopiaEntityHelper.detectEntities(TopiaEntityEnum[] contracts,
Set<Class<? extends TopiaEntity>> types,
TopiaEntity... entities)
Collecte l'ensemble des entites (via un parcours en profondeur) avec un
filtrage sur les types d'entites a retourner.
|
static TopiaEntityIdsMap |
TopiaEntityHelper.detectEntityIds(TopiaEntityEnum[] contracts,
Set<Class<? extends TopiaEntity>> types,
TopiaEntity... entities)
Collecte l'ensemble des ids d'entites (via un parcours en profondeur)
avec un filtrage sur les types d'entites a retourner.
|
static SortedMap<TopiaEntity,List<TopiaEntityRef>> |
TopiaEntityHelper.detectReferences(TopiaEntityEnum[] contracts,
String[] expressions,
Collection<? extends TopiaEntity> entities)
Collecte toutes les references d'un ensemble d'entites donnees par leur
topiaId sur un ensemble d'entites donne.
|
static SortedMap<TopiaEntity,List<TopiaEntityRef>> |
TopiaEntityHelper.detectReferences(TopiaEntityEnum[] contracts,
String[] expressions,
TopiaEntity entities)
Collecte toutes les references d'un ensemble d'entites donnees par leur
topiaId sur un ensemble d'entites donne.
|
static Set<Class<? extends TopiaEntity>> |
TopiaEntityHelper.detectTypes(TopiaEntityEnum[] contracts,
TopiaEntity... entities)
Collecte l'ensemble des types d'entites (via un parcours en profondeur).
|
static Class<? extends TopiaEntity> |
TopiaEntityHelper.getContractClass(TopiaEntityEnum[] contracts,
Class<? extends TopiaEntity> klass) |
static Set<Class<? extends TopiaEntity>> |
TopiaEntityHelper.getContractClasses(TopiaEntityEnum[] contracts,
Iterable<Class<? extends TopiaEntity>> klasses) |
static Class<? extends TopiaEntity>[] |
TopiaEntityHelper.getContracts(TopiaEntityEnum[] contracts)
Ontenir l'ensemble des contrats d'entites a partir des descriptions
d'entites.
|
static TopiaEntityEnum |
TopiaEntityHelper.getEntityEnum(Class<? extends TopiaEntity> klass,
TopiaEntityEnum... contracts) |
static <E extends TopiaEntity> |
EntityOperatorStore.getOperator(TopiaEntityEnum contract) |
static Set<Class<? extends TopiaEntity>> |
TopiaEntityHelper.retainContracts(TopiaEntityEnum[] contracts,
Set<Class<? extends TopiaEntity>> classes)
Filtre un ensemble de classes d'entites en ne conservant que les contrats
des entites.
|
Constructor and Description |
---|
Collector(Collector.CollectorVisitor visitor,
TopiaEntityEnum[] contracts) |
Collector(TopiaEntityEnum[] contracts) |
EntityOperator(TopiaEntityEnum contract) |
Copyright © 2004–2022 Code Lutin. All rights reserved.