com.univocity.api.entity.custom
Interface CustomDataEntity

All Superinterfaces:
CustomReadableEntity

public interface CustomDataEntity
extends CustomReadableEntity

The CustomDataEntity defines the essential methods that allow data manipulation in a user-managed resource.

Instances of this interface are expected to be provided by CustomDataStore in CustomDataStore.getDataEntities()

Author:
uniVocity Software Pty Ltd - dev@univocity.com
See Also:
CustomDataStore, EntityMapping

Method Summary
 void deleteAll()
          Removes all data contained in this data entity.
 ExclusionProcess prepareToDelete(String[] fieldsToMatch)
          Initializes an exclusion process in this data entity.
 UpdateProcess prepareToUpdate(String[] fieldsToUpdate, String[] fieldsToMatch)
          Initializes a update process in this data entity.
 WritingProcess prepareToWrite(String[] fieldNames)
          Initializes a writing process in this data entity.
 
Methods inherited from interface com.univocity.api.entity.custom.CustomReadableEntity
getEntityName, getFields, preareToRead
 

Method Detail

prepareToWrite

WritingProcess prepareToWrite(String[] fieldNames)
Initializes a writing process in this data entity.

Parameters:
fieldNames - a sequence of names identifying what fields will receive data in each new record created by uniVocity
Returns:
a WritingProcess object that is responsible for inserting new records into this entity.

prepareToUpdate

UpdateProcess prepareToUpdate(String[] fieldsToUpdate,
                              String[] fieldsToMatch)
Initializes a update process in this data entity.

Parameters:
fieldsToUpdate - a sequence of names identifying what fields will have their data updated by uniVocity
fieldsToMatch - identifies which fields will be used to identify updated records.
Returns:
a UpdateProcess object that is responsible for updating existing records in this entity.

prepareToDelete

ExclusionProcess prepareToDelete(String[] fieldsToMatch)
Initializes an exclusion process in this data entity. The field names used to identify records to be deleted will be provided by uniVocity.

Parameters:
fieldsToMatch - the field names used to identify records to be removed
Returns:
an ExclusionProcess object that is responsible for removing records from this entity.

deleteAll

void deleteAll()
Removes all data contained in this data entity. Subsequent reads after executing this method are expected to not return any records.



Copyright © 2015 uniVocity Software Pty Ltd. All rights reserved.