Package de.xima.fc.logic.transfer
Class EntityTransferConfig<Entity>
- java.lang.Object
-
- de.xima.fc.logic.transfer.EntityTransferConfig<Entity>
-
- Type Parameters:
Entity
- The type of entity.
public final class EntityTransferConfig<Entity> extends Object
Holds the custom import / export configuration for a specific entity class, seeEntityTransferDetails
. UseforEntity
orforEntityType
to get a configuration for a specific entity or entity type.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
- See Also:
EntityTransferDetails
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <Entity> EntityTransferConfig<Entity>
forEntity(Entity entity)
Get aEntityTransferConfig
for the type of the given entity.static <Entity> EntityTransferConfig<Entity>
forEntityType(Class<Entity> entityType)
Gets a newEntityTransferConfig
for the given type of entity.IEntityDeserializationExtension
getDeserializationExtension()
Gets theIEntityDeserializationExtension
that was configured for this type of entity.Class<Entity>
getEntityClass()
Gets the class of the entity this configuration is for.IEntityExportNameProvider<Entity>
getExportNameProvider()
Gets theIEntityExportNameProvider
configured for this type of entity.
-
-
-
Method Detail
-
getDeserializationExtension
public IEntityDeserializationExtension getDeserializationExtension()
Gets theIEntityDeserializationExtension
that was configured for this type of entity. Returns a no-op implementation if no extension was configured.- Returns:
- The deserialization extension configured for this type of entity, never null.
-
getEntityClass
public Class<Entity> getEntityClass()
Gets the class of the entity this configuration is for.- Returns:
- The entity class of this configuration.
-
getExportNameProvider
public IEntityExportNameProvider<Entity> getExportNameProvider()
Gets theIEntityExportNameProvider
configured for this type of entity. Returns either a custom one configured viaEntityTransferDetails.exportNameProvider()
or a default implementation based on the entity type.- Returns:
- The configured entity export name provider, never null.
- Throws:
IllegalStateException
- If no export name provider is available for this entity type.
-
forEntity
public static <Entity> EntityTransferConfig<Entity> forEntity(Entity entity)
Get aEntityTransferConfig
for the type of the given entity.- Type Parameters:
Entity
- The type of entity.- Parameters:
entity
- The entity to create a configuration for.- Returns:
- A new
EntityTransferConfig
for the type of the given entity.
-
forEntityType
public static <Entity> EntityTransferConfig<Entity> forEntityType(Class<Entity> entityType)
Gets a newEntityTransferConfig
for the given type of entity.- Type Parameters:
Entity
- The type of entity.- Parameters:
entityType
- The type of entity to create a configuration for.- Returns:
- A new
EntityTransferConfig
for the given type of entity.
-
-