public class DbImportExtensionCreationMapper extends DbImportSupplementCreationMapperBase<Extension,IdentifiableEntity,DbImportStateBase<?,?>,ExtensionType>
addOriginalSourceId, dbSupplementedObjectAttribute, dbSupplementValueAttribute, supplementType
dbIdAttribute, objectToCreateNamespace
importMapperHelper
singleMappers
Modifier | Constructor and Description |
---|---|
protected |
DbImportExtensionCreationMapper(java.lang.String dbSupplementedObjectAttribute,
java.lang.String supplementedObjectNamespace,
java.lang.String dbSupplementValueAttribute,
java.lang.String dbIdAttribute,
ExtensionType supplementType) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
addSupplement(Extension extension,
IdentifiableEntity identifiableEntity,
java.lang.String id)
Adds the supplement to the supplementable entity.
|
protected Extension |
createObject(java.sql.ResultSet rs)
This method creates the object to be created.
|
static DbImportExtensionCreationMapper |
NewInstance(java.lang.String dbExtendedObjectAttribute,
java.lang.String extendedObjectNamespace)
Creates an extension mapper which creates an empty extension.
|
static DbImportExtensionCreationMapper |
NewInstance(java.lang.String dbExtendedObjectAttribute,
java.lang.String extendedObjectNamespace,
java.lang.String dbExtensionValueAttribute,
java.lang.String dbIdAttribute,
ExtensionType extensionType)
Creates an extension mapper which creates an extension and sets the extension value,
the extension type and adds an annotation holding the original source id
|
protected void |
setSupplementValue(java.sql.ResultSet rs,
Extension extension) |
addOriginalSource, doInvoke
getTransformer, invoke
getForeignKey, getRelatedObject, getRelatedObject, getState, initialize
getDestinationAttributeList, getDestinationAttributes, getSourceAttributeList, getSourceAttributes, getStringDbValue
toString
protected DbImportExtensionCreationMapper(java.lang.String dbSupplementedObjectAttribute, java.lang.String supplementedObjectNamespace, java.lang.String dbSupplementValueAttribute, java.lang.String dbIdAttribute, ExtensionType supplementType)
public static DbImportExtensionCreationMapper NewInstance(java.lang.String dbExtendedObjectAttribute, java.lang.String extendedObjectNamespace)
dbExtendedObjectAttribute
- the database column that holds the foreign key for the extended object - obligatoryextendedObjectNamespace
- the namespace under which the extended object has been saved previously - obligatorypublic static DbImportExtensionCreationMapper NewInstance(java.lang.String dbExtendedObjectAttribute, java.lang.String extendedObjectNamespace, java.lang.String dbExtensionValueAttribute, java.lang.String dbIdAttribute, ExtensionType extensionType)
dbExtendedObjectAttribute
- the database column that holds the foreign key for the extended object - obligatoryextendedObjectNamespace
- the namespace under which the extended object has been saved previously - obligatorydbExtensionValueAttribute
- if null no extension value is setdbIdAttribute
- if null not original source id annotation is addedextensionType
- if null no extension type is setprotected boolean addSupplement(Extension extension, IdentifiableEntity identifiableEntity, java.lang.String id)
DbImportSupplementCreationMapperBase
null
addSupplement
in class DbImportSupplementCreationMapperBase<Extension,IdentifiableEntity,DbImportStateBase<?,?>,ExtensionType>
extension
- the supplement (e.g. an instance of class Extension)identifiableEntity
- the supplementable entity (e.g. an IdentifiableEntity
in case of a
supplement of type Extension
id
- the supplementableEntity original source id (needed for verbose logging)protected void setSupplementValue(java.sql.ResultSet rs, Extension extension) throws java.sql.SQLException
setSupplementValue
in class DbImportSupplementCreationMapperBase<Extension,IdentifiableEntity,DbImportStateBase<?,?>,ExtensionType>
java.sql.SQLException
protected Extension createObject(java.sql.ResultSet rs) throws java.sql.SQLException
DbImportObjectCreationMapperBase
createObject
in class DbImportObjectCreationMapperBase<Extension,DbImportStateBase<?,?>>
rs
- The result setjava.sql.SQLException
Copyright © 2007-2020 EDIT. All Rights Reserved.