com.univocity.api.entity.custom
Interface CustomReadableEntity

All Known Subinterfaces:
CustomDataEntity, CustomQuery

public interface CustomReadableEntity

The CustomReadableEntity is the most basic data entity a user can define. It provides the essential methods to allow data extraction from 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
 String getEntityName()
          Returns this entity name.
 Set<? extends DefaultEntityField> getFields()
          Informs uniVocity of what fields are available from this data entity.
 ReadingProcess preareToRead(String[] fieldNames)
          Initializes a reading process in this data entity.
 

Method Detail

getEntityName

String getEntityName()
Returns this entity name. uniVocity refers to entities of a data store by their name (most importantly in DataStoreMapping.map(String, String)).

Returns:
the entity name.

preareToRead

ReadingProcess preareToRead(String[] fieldNames)
Initializes a reading process in this data entity. A list of field names of interest are provided by uniVocity. Subsequent calls to ReadingProcess.readNext() must return rows with values for the requested fields.

Parameters:
fieldNames - the fields selected by uniVocity that identify what values to extract from each record in the ReadingProcess.
Returns:
a ReadingProcess object is responsible for reading values for the selected fields in each record contained by this entity.

getFields

Set<? extends DefaultEntityField> getFields()
Informs uniVocity of what fields are available from this data entity.

Returns:
a set of instances of DefaultEntityField which contain details about each field in the records stored by this data entity.


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